Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
GeneralRe: Rich text box error... Pin
IamHuM4-Nov-06 3:06
IamHuM4-Nov-06 3:06 
GeneralRe: Rich text box error... Pin
mav.northwind4-Nov-06 5:13
mav.northwind4-Nov-06 5:13 
QuestionWorkflow in SPS 2007 Pin
Bharat Sukhwal3-Nov-06 19:40
Bharat Sukhwal3-Nov-06 19:40 
QuestionVery Urgent: How Can I make a compelete Instalation file Pin
alhassan013-Nov-06 18:54
alhassan013-Nov-06 18:54 
AnswerRe: Very Urgent: How Can I make a compelete Instalation file Pin
CooperWu3-Nov-06 22:32
CooperWu3-Nov-06 22:32 
AnswerRe: Very Urgent: How Can I make a compelete Instalation file Pin
realin4-Nov-06 4:52
realin4-Nov-06 4:52 
GeneralRe: Very Urgent: How Can I make a compelete Instalation file Pin
alhassan017-Nov-06 19:34
alhassan017-Nov-06 19:34 
QuestionAm I setting up my architecture correctly? Pin
xdavidx3-Nov-06 17:57
xdavidx3-Nov-06 17:57 
Im a begining C# programmer and was hoping you guys could help me. Im working on my first real project and I am a little confused on how exactly to set it

up. I've read so many articles on this, but they all seem to be saying different things. Here is a psuedo code example of my current setup:

//Data Access Layer<br />
class EmployeeDA<br />
{<br />
	public void Insert(Employee emp)<br />
	{<br />
		//code to add employee to db<br />
	}<br />
	//similar methods for Load, Delete, Update, etc<br />
}<br />
<br />
//Business Logic Layer<br />
class Employee<br />
{<br />
	private int id;<br />
	private string name;<br />
	private EmployeeDA = new EmployeeDA();<br />
	//here would be the code for the properties and constructors<br />
	<br />
	public void Insert()<br />
	{<br />
		EmployeeDA.Insert(this);<br />
	}<br />
	//similar methods for Load, Delete, Update, etc<br />
}<br />
<br />
class Employees : List<Employee><br />
{<br />
	public void AddEmployeesToTable()<br />
	{<br />
		foreach(Employee emp in this)<br />
			emp.Insert;<br />
	}<br />
	//similar methods for Load, Delete, Update, etc	<br />
}



Is this correct? I know there are many different ways to do it, so maybe "correct" isnt the right word. I guess what I want to know is if there is a "better" way of doing it. Are there any glaring issues with the way I am doing it currently?

Thanks
AnswerRe: Am I setting up my architecture correctly? Pin
CooperWu3-Nov-06 22:38
CooperWu3-Nov-06 22:38 
AnswerRe: Am I setting up my architecture correctly? Pin
beatles16924-Nov-06 1:01
beatles16924-Nov-06 1:01 
QuestionHow to retrieve the current row of a Data Set Pin
Guardian513-Nov-06 17:50
Guardian513-Nov-06 17:50 
AnswerRe: How to retrieve the current row of a Data Set Pin
beatles16924-Nov-06 1:24
beatles16924-Nov-06 1:24 
GeneralRe: How to retrieve the current row of a Data Set Pin
Guardian514-Nov-06 15:50
Guardian514-Nov-06 15:50 
GeneralRe: How to retrieve the current row of a Data Set Pin
beatles16925-Nov-06 0:04
beatles16925-Nov-06 0:04 
GeneralRe: How to retrieve the current row of a Data Set Pin
Guardian515-Nov-06 23:15
Guardian515-Nov-06 23:15 
QuestionVS2005 SP1 Beta release Pin
Glen Harvy3-Nov-06 16:47
Glen Harvy3-Nov-06 16:47 
AnswerRe: VS2005 SP1 Beta release Pin
André Ziegler4-Nov-06 12:08
André Ziegler4-Nov-06 12:08 
Questionquery about data grid view Pin
AmitDey3-Nov-06 16:21
AmitDey3-Nov-06 16:21 
AnswerRe: query about data grid view Pin
AB77713-Nov-06 17:39
AB77713-Nov-06 17:39 
GeneralRe: query about data grid view Pin
AmitDey3-Nov-06 21:52
AmitDey3-Nov-06 21:52 
QuestionWebBrowser Tree View? Pin
fredsparkle3-Nov-06 15:53
fredsparkle3-Nov-06 15:53 
QuestionConverting 4 bytes of int to string? Pin
Lord Kixdemp3-Nov-06 14:59
Lord Kixdemp3-Nov-06 14:59 
AnswerRe: Converting 4 bytes of int to string? Pin
Guffa3-Nov-06 16:56
Guffa3-Nov-06 16:56 
GeneralRe: Converting 4 bytes of int to string? Pin
Lord Kixdemp5-Nov-06 9:15
Lord Kixdemp5-Nov-06 9:15 
Questionkeyboard layout for a selected window Pin
seq-3-Nov-06 11:29
seq-3-Nov-06 11:29 

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.