Click here to Skip to main content
15,561,422 members
Home / Discussions / C#
   

C#

 
AnswerRe: Start application at specific time Pin
Richard MacCutchan15-May-11 23:13
mveRichard MacCutchan15-May-11 23:13 
GeneralRe: Start application at specific time Pin
Programm3r16-May-11 3:51
Programm3r16-May-11 3:51 
AnswerRe: Start application at specific time Pin
Thomas Krojer16-May-11 22:25
Thomas Krojer16-May-11 22:25 
GeneralRe: Start application at specific time Pin
Pranit Kothari17-May-11 2:22
Pranit Kothari17-May-11 2:22 
GeneralRe: Start application at specific time Pin
Thomas Krojer17-May-11 2:33
Thomas Krojer17-May-11 2:33 
Questionneed to load image in rdlc from database ? (windows application) Pin
Nabawoka15-May-11 14:52
Nabawoka15-May-11 14:52 
AnswerRe: need to load image in rdlc from database ? (windows application) Pin
Blue_Boy15-May-11 22:21
Blue_Boy15-May-11 22:21 
QuestionDependant tables Pin
Groulien15-May-11 8:17
Groulien15-May-11 8:17 
Hello CP,

Really unsure whether or not to post this here or with SQL.

I'm currently working with C# and Sql Server 2005 Express.
I've got two tables:
<br />
_Cases_<br />
CaseID, (PK, Identity (+1 increment))<br />
ClientID (FK)<br />
Description,<br />
DateRegistered,<br />
etc<br />
<br />
_Tasks_<br />
TaskID (PK, Identity (+1 increment))<br />
CaseID (FK)<br />
CompanyCost<br />
ClientCost<br />


As you can see, tasks depend on a case.

My form contains a lot of info for the Case and a small datagridview for the tasks.
I save my case and wish to add tasks to it.
Problem is that I don't know what CaseID the case has gotten.

I can query for Max(CaseID) possibly with a DateTime in the 'where' clause.
Although my method works, I was wondering if someone has a better idea, preferably in C# code.
AnswerRe: Dependant tables Pin
Blue_Boy15-May-11 9:32
Blue_Boy15-May-11 9:32 
AnswerRe: Dependant tables Pin
OriginalGriff15-May-11 10:27
mveOriginalGriff15-May-11 10:27 
QuestionRe: Dependant tables Pin
Luc Pattyn15-May-11 10:45
sitebuilderLuc Pattyn15-May-11 10:45 
AnswerRe: Dependant tables Pin
OriginalGriff15-May-11 11:00
mveOriginalGriff15-May-11 11:00 
GeneralRe: Dependant tables Pin
Luc Pattyn15-May-11 11:12
sitebuilderLuc Pattyn15-May-11 11:12 
GeneralRe: Dependant tables Pin
Luc Pattyn15-May-11 11:00
sitebuilderLuc Pattyn15-May-11 11:00 
GeneralRe: Dependant tables Pin
OriginalGriff15-May-11 11:02
mveOriginalGriff15-May-11 11:02 
AnswerRe: Dependant tables Pin
Luc Pattyn15-May-11 11:08
sitebuilderLuc Pattyn15-May-11 11:08 
GeneralRe: Dependant tables Pin
OriginalGriff15-May-11 21:44
mveOriginalGriff15-May-11 21:44 
QuestionERP project - one project? Pin
Jassim Rahma15-May-11 3:40
Jassim Rahma15-May-11 3:40 
AnswerRe: ERP project - one project? Pin
Dave Kreskowiak15-May-11 4:39
mveDave Kreskowiak15-May-11 4:39 
GeneralRe: ERP project - one project? Pin
Jassim Rahma15-May-11 4:44
Jassim Rahma15-May-11 4:44 
AnswerRe: ERP project - one project? Pin
Luc Pattyn15-May-11 5:11
sitebuilderLuc Pattyn15-May-11 5:11 
AnswerRe: ERP project - one project? Pin
Dan Mos15-May-11 4:48
Dan Mos15-May-11 4:48 
AnswerRe: ERP project - one project? Pin
Keith Barrow15-May-11 4:59
professionalKeith Barrow15-May-11 4:59 
AnswerRe: ERP project - one project? Pin
Pete O'Hanlon15-May-11 10:23
mvaPete O'Hanlon15-May-11 10:23 
GeneralRe: ERP project - one project? Pin
walterhevedeich15-May-11 20:21
professionalwalterhevedeich15-May-11 20:21 

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.