Architecture :: Looking For Better Way To Design, To Use Object's Properties With The Object Data Source?

May 10, 2010

I've posted the same question in the Object Data Source forum. This is a link to it http://forums.asp.net/t/1554083.aspx. Maybe I should've posted here to begin with. There seemed to be some overlap so I wasn't sure which was the best on to post the question in.

I'm trying to get a better understanding of how I could've designed my app so that the Object Data Source could work with the properties of my business objects. Please read the other post to see how it's currently being done. Sorry for the link to the other page. I didn't want to post a bunch of duplicate information. I would love to get some suggestions for alternative ways of doing this.

View 1 Replies


Similar Messages:

Architecture :: Design System With Pure Object Oriented?

Aug 4, 2010

Analysis and design C# application with pure object orineted feature .

for example

I get all the requirement for the user, How to analysis the system , keeping future changes in mind , design and system with pure object oriented feature .

in Short : design system with pure object oriented feature so that it flexible so that in future new version can be launch easily

View 1 Replies

Architecture :: Business Object Design In Master Details?

Aug 19, 2010

I have the following scenario,There is a master business object containing 40 fields2 separate child business objectsIf I update a child record, I have to update master's 'Last modify by' status along with 3 or more fields in masterFor this purpose, I don't want to initialize a separate Master class object (as most of the fields are unused/wasted)The 'last modify by' also gets updated if the records in master get updated themselvesCurrently I have separate business objects for master table, Child 1, Child 2 etc.

How do I control this in my business object design ? Do I break up my master object ? Say I extract last 'modify by ' into a new class, through inheritance or some other way ?Is there a way that whenever child gets updated I use a 'small' class to update Master status only and whenever the master itself gets updated I do the same.Problem is that I am having redundancy in my small class (Master class also contains 'Last Modify By ',

View 5 Replies

Architecture :: What Is Role Of Object Properties When Using Client Side Validations

Aug 24, 2010

I have been using properties and have idea that using properties with private fields we can implement validations and buisness rules in them.

But I am just thinking asp.net client side validation controls provide good strength and they provide good user experience as well. They can be used for any type of validation (using regular expression) on client side and their re-use is possible on server side. When validation controls are a must and they are powerful; is making properties not just wastage of time ?

Is there still some use of properties ?

View 6 Replies

DataSource Controls :: Get Child Properties Using Parent Object Error / Cannot Access A Disposed Object

Feb 17, 2010

On DBML I have two entities as Parent, Child. I am trying to assign Child class properites in a Parent.

[code]....

I am getting the following Error:

Cannot access a disposed object.

Object name: 'DataContext accessed after Dispose.'.

View 2 Replies

DataSource Controls :: Is It Possible To Use A Property Of An Object Instance Property For Object Data Source

May 3, 2010

Traditionally with an Object Data Source, the wired up class will have its public properties available for binding (i.e. Gridview columns, etc.) which works well. But what if one of my wired up business objects has a property that is an object itself; can I drill down to a property on that object property and still use it?

So in additiona to the traditional:MyBusniessObject.OrderID...I want to use:MyBusniessObject.Customer.NameID
Your 1st response might be to just wire up the 'Customer' class, but I need properties both on 'MyBusinessObject'and 'Customer'. I do not think this can be done, as the ODS will not display properties on an object instance property. I have tried manually typing in the drilled down value as well, but that wasn't a success either.

View 4 Replies

Architecture :: Store ID Or Object In DTO Object?

Jun 15, 2010

I'm currently creating a Class Library for DTOs and was wondering if I should store an ID or an Object

For example:

ProductDTO (class)
ID (Int32)
Code (String)
Description (String)

[Code]....

View 1 Replies

Using Object Data Source In 4 ReportViewer?

Nov 22, 2010

I think I'm getting mad here...I thought this should be super simple, but I just can't figure out how to do that.This is what I'm trying to do:I want to create an rdlc report using the ReportViewer control in ASP.NET 4 (VS 2010), and, as its datasource, use a class with some properties.I tried everything I can think of, but I just can't figure this out. All the docs I found state that the object should appear in the DataSource pane of the website, but I can't make it appear there.I would like the fields of the class to appear in the report desiger so I can use them - but I can't do that either.Using the designer, I can only define new dataset - I don't want to use dataset, but business objects!So - how can I do that? Do I have to use some kind of DataSource control? How can I make the report designer know about the business object?

View 2 Replies

Working With Object Data Source In .net?

Aug 20, 2010

I am writting a website using .net in some of my pages I need to use datagrid for showing some datas and for binding my data to datagrid I use object datasource something like below :

//this is
public class userData
{
private long userid = 0;
private string username = null;[code]....

and then in my apsx file I put an objectdatasource and bind the select statement to the GetUsersAmount() and then bind obejctdatasource to my datagrid but I think the way I've chosen is not efficient I just want to hear about your way of doing such these things.

View 3 Replies

Object Data Source Is Stuck In First

Jun 21, 2013

I set up a DAL layer in a dll. This had a couple poorly named methods such as GetData(), which is the default name offered up in the tableAdapter wizard. I also added a few other methods for various reasons, all with better names. I then built the dll and referenced it in an ASP project. On one page, I added an ObjectDataSource, and set it to that tableAdapter (which isn't what I wanted to do, but that's a different story). Under the Select tab, I see the GetData and the other methods. Under the Update tab I see a variety of Update methods. Under the Insert and Delete tabs....I see the same methods as I saw under the Update tab. The Insert and Delete methods that exist for the tableAdapter were not available.

I figured that I did something wrong, and I didn't like that GetData name, so I went back to the dll and changed some things around (I think I added an Insert and Delete method, but by now I can't remember, except to say that I wasn't all that surprised not to see those two methods the first time). I also changed the GetData name to something else, then rebuilt the dll.

Since that time, I have yet to be able to change what shows up in the Object Data Source configuration. The Select adamantly insists on the GetData method, which no longer exists under that name, while the other three tabs all show a variety of Update methods, but neither Insert nor Delete. I noticed that just adding a reference didn't have any impact until the ASP project was built, which moved the dll to the bin folder where it needs to be for the Object Data Source configuration wizard to see it. Therefore, I deleted the dll from the bin folder, then rebuilt. I've also removed the reference, deleted the dll from the bin folder, rebuilt, added the reference, rebuilt again to get the dll back into the bin folder, and anything else I can think of. It still seems to be retaining the original schema from the tableadapter without ever updating to the new name for the GetData. Since that hasn't updated, the rest doesn't surprise me.

View 25 Replies

DataSource Controls :: How To Get Object Source Data

Jun 22, 2010

I am developing on application in that i have taken one list box and getting data to it using an object source.up to this stage it is fine.I need to compare these value what i get into list box and need to represent data in to a report viewer ..how to get these values from objectsource.i m new to c# i placing the code.

[Code]....

View 1 Replies

Two Way Sorting In GridView Using Object Data Source?

Feb 2, 2011

I am using Object Data Source to bind data in the gridview. I haveset the property AllowSorting=true. While running the application, Icould sort the data only in ascending order. Is there any way toachieve two way sorting in gridview ie. both ascending and descendingon successive clicks ?.

View 1 Replies

Forms Data Controls :: Assigning Repeater Value Using Object Properties?

Dec 25, 2010

I have a repeater control which looks like so: (Trimed it to show the essentials)

[Code]....

And i have a class which looks like so:

[Code]....

Is there anyways i can use the class properties to populate the repeater control? Probably modify the class or something?

View 1 Replies

DataSource Controls :: Getting Rows From Object Data Source?

Jan 7, 2010

I have an object data source that is being used by an rdlc report, and the object data source uses a filter that is built from session variables passed to the page.

The report displays correctly, with the filter applied; however, I want to mark each of the rows as "printed" in a bit field in the database table.

In the table adapter, I have the following Update command that is used by the object data source:

UPDATE dbo.WorkOrder
SET boolWorkOrderPrinted = 'True'
WHERE (WorkOrderID = @Original_WorkOrderID)

And in the Page Load event, I run:

ObjectDataSource1.Update();

However, no records are updated.

View 1 Replies

How To Configure Update Method For Object Data Source

Jun 26, 2010

I have a gridview with all columns read only except one. I want to configure the update method for the object data source to update only one column. The code i have written works when i make all columns editable but fails when i try to make only one column editable.

View 1 Replies

Binding Programmatically Vs Object Data Source For Performance?

Nov 16, 2010

I used bind all GridViews, DetailViews etc. on my page using an ObjectDataSource (unless it wasn't possible to do so). Recently, I've started binding all my contols programatically. I find this a lot cleaner and easier, though some may disagree. Binding with a ObjectDataSource obviously has it advantages and disadvantages, as does doing it programatically.Say I bind a GridView programatically (e.g. GridView1.DataSource = SomeList), when I change page on the GridView, I have to also code this. Each time the page changes I have to call GridView1.DataSource = SomeList again. Obviously with a ObjectDataSource I don't need to do this. I normally stick my SomeList object into the ViewState so when I change page I don't need to hit the database each and every time.

My question is: Is this how the ObjectDataSource works? Does it store it's data in the ViewState and not hit the database again unless you call the .Select method? I like to try and get the best performance out of my applications and hit the database as few times as possible but I don't really like the idea of storing a huge list in the ViewState. Is there a better way of doing this? Is caching per user a good idea (or possible)? Shall I just hit the database everytime instead of storing my huge list in the ViewState? Is it sometimes better to hit the database than to use ViewState?

View 1 Replies

Architecture :: Insert Data With Business Object?

May 29, 2010

I do not know how to create a business object for inserting data into the database.

View 2 Replies

Pass Key Of Grid To Business Class Via Object Data Source?

Sep 15, 2010

In ASP.NET Webforms have an ASP.NET GridView connected to a C# class via an object data source

I have an ID set up as a DataKeyName in the grid. How do I pass this to the C# class when I update the grid?

View 15 Replies

DataSource Controls :: How To Create It ,Object Data Source ,Linq And Sql Or Other Any Way?

Sep 20, 2010

my query is SELECT a.HD, a.HEAD, a.SH, a.SUBHEAD, a.TRK, a.TRACK, a.TGT, a.TARGET, a.PDC, a.DT_RELEASE, a.STATUS, a.CO
FROM V_HIERARCHY1 a

my data is ,HR HR Rec Records Leave Leave Records HRL.0001 Policy and Process for leave record. 27.06.2010 30.06.2010 WIP Edlink
HR HR Rec Records Leave Leave Records HRL.0002 Quarterly Review 01.07.2010 04.07.2010 Planned Edlink
HR HR DB Database SAL Salary DDS.0001 Calculation of Monthly salary 08.08.2010 09.08.2010 WIP Edlink
HR HR Rec Records Ind Induction Records HRI.0001 Completion of dossiers. 08.07.2010 10.07.2010 WIP Edlink
HR HR DB Database Emp Employee HDE.0001 Offer letter 06.07.2010 09.07.2010 WIP Edlink

my outout is ,HR

REC
LEAVE
HR1
REC1
LEAVE1

View 1 Replies

Object Data Source With Reporting Services In Visual Studio?

Oct 12, 2010

I'm working on a site where we want to include a pie chart on a page. Right now I'm working on implementing that through Reporting Services (RDLC file) with an object data source.The SelectMethod of my object data source is a method that returns a list of business objects; lets say a List<Alpha> and Alpha has a sub object Beta with a Name property. In my report definition I have set the Category groups to be: =Fields!Beta.Value.Name this means that Alpha.Beta.Name are my pie slices. I got the following error:

An error has occurred during report processing. The Group expression for the rouping 'chart1_CategoryGroup1' contains an error: Object variable or With block variable not set.I was able to confirm this is because Beta is nullable and was able to fix the issue by updating the object Alpha to return a new Beta() if the Beta property is null. This solution is not ideal though because there are other places in my code where I need Beta to be null if it doesn't have a value yet.Is there a way to update the report definition to accept a null property as valid? Ideally I would like to specify the value as "Not Set" if Beta is null.

View 1 Replies

Pass Key Of Grid To Business Class Via Object Data Source

Jan 21, 2011

In ASP.NET Webforms have an ASP.NET GridView connected to a C# class via an object data source

I have an ID set up as a DataKeyName in the grid. How do I pass this to the C# class when I update the grid?

View 2 Replies

DataSource Controls :: What Is The DB Type With The Parameters Of The Object Data Source

Mar 24, 2010

I was looking at the options in Intellisense for the properties used with a parameter for the Object Data Source. There is one that I don't understand how it would be used. explain, or recommend an article, about the DB Type is for and how it would be used?

View 2 Replies

DataSource Controls :: Use The Direction Property Of The Parameters For The Object Data Source?

Apr 20, 2010

I have an insert that uses an object data source with out the direction property set and it works fine. I noticed the direction property though and wondered if I should use it.Should the direction property for the parameters of an object data source be used with a simple CRUD operations?

View 3 Replies

DataSource Controls :: When Should Use The Type Property Or Dbtype With Object Data Source

Apr 24, 2010

I'm trying to understand when to use the type property and when to use the dbtype property. I looked online but couldn't find a good article that said when and why.

View 3 Replies

Is Is Possible To Force Grid View Edit Mode Without Using Object Data Source

Aug 27, 2010

Is is possible to force Grid view edit mode without using object data source, I set EditIndex, but the Edit template is never shown till I change the binding to ObjectDataSource

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved