Click here to Skip to main content
15,914,071 members
Home / Discussions / C#
   

C#

 
Questionplotting graph Pin
s4_sabahatf3-Nov-06 23:31
s4_sabahatf3-Nov-06 23:31 
AnswerRe: plotting graph Pin
User 66584-Nov-06 4:27
User 66584-Nov-06 4:27 
QuestionMail Application development in .Net Pin
clife5373-Nov-06 22:56
clife5373-Nov-06 22:56 
AnswerRe: Mail Application development in .Net Pin
quiteSmart3-Nov-06 23:13
quiteSmart3-Nov-06 23:13 
GeneralRe: Mail Application development in .Net Pin
clife5374-Nov-06 4:35
clife5374-Nov-06 4:35 
AnswerRe: Mail Application development in .Net Pin
realin4-Nov-06 4:47
realin4-Nov-06 4:47 
GeneralRe: Mail Application development in .Net Pin
clife5374-Nov-06 20:55
clife5374-Nov-06 20:55 
QuestionRich text box error... Pin
IamHuM3-Nov-06 21:15
IamHuM3-Nov-06 21:15 
AnswerRe: Rich text box error... Pin
CooperWu3-Nov-06 22:29
CooperWu3-Nov-06 22:29 
GeneralRe: Rich text box error... Pin
IamHuM3-Nov-06 22:46
IamHuM3-Nov-06 22:46 
AnswerRe: Rich text box error... Pin
IamHuM3-Nov-06 22:30
IamHuM3-Nov-06 22:30 
GeneralRe: Rich text box error... Pin
mav.northwind4-Nov-06 1:00
mav.northwind4-Nov-06 1:00 
GeneralRe: Rich text box error... Pin
IamHuM4-Nov-06 1:19
IamHuM4-Nov-06 1:19 
GeneralRe: Rich text box error... Pin
mav.northwind4-Nov-06 1:46
mav.northwind4-Nov-06 1:46 
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 

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.