Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
GeneralDatabinding on ComboBox Pin
guidoursus14-Mar-08 4:43
guidoursus14-Mar-08 4:43 
GeneralRe: Databinding on ComboBox Pin
Rob Philpott14-Mar-08 4:49
Rob Philpott14-Mar-08 4:49 
GeneralRe: Databinding on ComboBox Pin
Gareth H14-Mar-08 5:24
Gareth H14-Mar-08 5:24 
GeneralRe: Databinding on ComboBox Pin
guidoursus14-Mar-08 5:29
guidoursus14-Mar-08 5:29 
QuestionConsole application with args: Is there a way to pass args from VS when debugging? Pin
Frankidoze14-Mar-08 4:37
Frankidoze14-Mar-08 4:37 
AnswerRe: Console application with args: Is there a way to pass args from VS when debugging? Pin
laserbaronen14-Mar-08 4:39
laserbaronen14-Mar-08 4:39 
AnswerRe: Console application with args: Is there a way to pass args from VS when debugging? Pin
Rob Philpott14-Mar-08 4:39
Rob Philpott14-Mar-08 4:39 
GeneralBusiness entities and unique identifiers. Pin
matbuk14-Mar-08 4:08
matbuk14-Mar-08 4:08 
Hi All, I am in the process of re-writing a business application that was originally developed in VB6.

I have decided to seperate the application into tiers and have a Data Access layer, Business Logic layer and business entities. I've writtern some generic classes which are inherited by my business logic and business entities to provide certain basic functionality.

Ultimately my question is regarding unique identifiers for my business entities. If for instance i have a Fleet object which contains vehicle entities and that the vehicle entities have a VehicleID field. This field is used to uniquely identify it in the database. I didn't want to make it a public property because that would allow the user to edit it and upon calling update on the entity, would overrite an incorrect record in the database. I then thought about possibly using the constructor so that when the entities are originally pulled from the database and the instances of the entities are created, the ID field is passed as a parameter and only a property getter exists to read the ID value if required. This also poses problems because if i was to create a new entity i.e Vehicle v = new Vehicle(10) this could pose a problem because a vehicle with an ID of 10 could already exist and could potentially be overwritten in the db.

Since i am the only developer i suppose i could use either of the two methods and just make sure i don't make a silly mistake but i would like to know if it is possible to provide the sort of functionality that offers protection from such mistakes.

Thanks in advance.
GeneralRe: Business entities and unique identifiers. Pin
Rob Philpott14-Mar-08 4:23
Rob Philpott14-Mar-08 4:23 
GeneralRe: Business entities and unique identifiers. Pin
matbuk14-Mar-08 4:38
matbuk14-Mar-08 4:38 
GeneralRe: Business entities and unique identifiers. Pin
Rob Philpott14-Mar-08 4:45
Rob Philpott14-Mar-08 4:45 
GeneralRe: Business entities and unique identifiers. Pin
matbuk14-Mar-08 4:50
matbuk14-Mar-08 4:50 
QuestionHow to view PDF in C# (Window forms) Pin
Khaleek Ahmad14-Mar-08 2:11
Khaleek Ahmad14-Mar-08 2:11 
AnswerRe: How to view PDF in C# (Window forms) Pin
C1AllenS14-Mar-08 3:18
C1AllenS14-Mar-08 3:18 
Generalmaintain back the combobox item Pin
angels77714-Mar-08 1:57
angels77714-Mar-08 1:57 
Questionconsole application issue Pin
Pankaj Garg14-Mar-08 1:02
Pankaj Garg14-Mar-08 1:02 
GeneralRe: console application issue Pin
Rob Philpott14-Mar-08 1:15
Rob Philpott14-Mar-08 1:15 
GeneralAvoid file deletion Pin
Tanuja12314-Mar-08 0:14
Tanuja12314-Mar-08 0:14 
GeneralRe: Avoid file deletion Pin
Rob Philpott14-Mar-08 0:25
Rob Philpott14-Mar-08 0:25 
GeneralRe: Avoid file deletion [modified] Pin
Nilesh Hapse14-Mar-08 1:01
Nilesh Hapse14-Mar-08 1:01 
GeneralRe: Avoid file deletion Pin
Rob Philpott14-Mar-08 1:05
Rob Philpott14-Mar-08 1:05 
GeneralRe: Avoid file deletion Pin
Programm3r14-Mar-08 0:29
Programm3r14-Mar-08 0:29 
GeneralRe: Avoid file deletion Pin
Lutosław14-Mar-08 3:02
Lutosław14-Mar-08 3:02 
GeneralRe: Avoid file deletion Pin
Dave Kreskowiak14-Mar-08 7:13
mveDave Kreskowiak14-Mar-08 7:13 
QuestionTextWriter.WriteLine() Pin
nilam247714-Mar-08 0:06
nilam247714-Mar-08 0:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.