Click here to Skip to main content
15,910,277 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need to disable Right Click Pin
stancrm3-Mar-09 20:33
stancrm3-Mar-09 20:33 
QuestionNested Query Pin
Sajjad Leo3-Mar-09 19:17
Sajjad Leo3-Mar-09 19:17 
AnswerRe: Nested Query Pin
ABitSmart3-Mar-09 19:51
ABitSmart3-Mar-09 19:51 
GeneralRe: Nested Query Pin
Sajjad Leo3-Mar-09 20:10
Sajjad Leo3-Mar-09 20:10 
AnswerRe: Nested Query Pin
Christian Graus3-Mar-09 20:02
protectorChristian Graus3-Mar-09 20:02 
GeneralRe: Nested Query Pin
Sajjad Leo3-Mar-09 20:07
Sajjad Leo3-Mar-09 20:07 
GeneralRe: Nested Query Pin
Christian Graus3-Mar-09 21:09
protectorChristian Graus3-Mar-09 21:09 
AnswerRe: Nested Query Pin
Tej Aj3-Mar-09 20:16
Tej Aj3-Mar-09 20:16 
GeneralRe: Nested Query Pin
Sajjad Leo3-Mar-09 20:22
Sajjad Leo3-Mar-09 20:22 
GeneralRe: Nested Query [modified] Pin
Tej Aj3-Mar-09 20:31
Tej Aj3-Mar-09 20:31 
GeneralRe: Nested Query Pin
Sajjad Leo3-Mar-09 20:43
Sajjad Leo3-Mar-09 20:43 
GeneralRe: Nested Query Pin
Tej Aj3-Mar-09 20:54
Tej Aj3-Mar-09 20:54 
GeneralRe: Nested Query Pin
Sajjad Leo3-Mar-09 22:29
Sajjad Leo3-Mar-09 22:29 
Question[Message Deleted] Pin
Prajeesh3-Mar-09 19:03
Prajeesh3-Mar-09 19:03 
AnswerRe: Popup Menu from a button Pin
Christian Graus3-Mar-09 19:43
protectorChristian Graus3-Mar-09 19:43 
GeneralRe: Popup Menu from a button Pin
Shyam K Pananghat3-Mar-09 20:56
Shyam K Pananghat3-Mar-09 20:56 
QuestionPlease Help Pin
techygeek3-Mar-09 18:47
techygeek3-Mar-09 18:47 
AnswerRe: Please Help Pin
Christian Graus3-Mar-09 20:03
protectorChristian Graus3-Mar-09 20:03 
GeneralRe: Please Help Pin
techygeek3-Mar-09 20:08
techygeek3-Mar-09 20:08 
QuestionHow to display multiple repeating records and groupng of that record in HTML Reports Pin
Nupur Rai3-Mar-09 18:04
Nupur Rai3-Mar-09 18:04 
AnswerRe: How to display multiple repeating records and groupng of that record in HTML Reports Pin
Shyam K Pananghat3-Mar-09 21:01
Shyam K Pananghat3-Mar-09 21:01 
QuestionRe: How to display multiple repeating records and groupng of that record in HTML Reports Pin
Nupur Rai3-Mar-09 22:25
Nupur Rai3-Mar-09 22:25 
QuestionHow to generate ENCRYPTED html file to pdf file using itext with C# [modified] Pin
YiXiang_893-Mar-09 16:34
YiXiang_893-Mar-09 16:34 
AnswerRe: How to generate ENCRYPTED html file to pdf file using itext with C# Pin
Christian Graus3-Mar-09 17:12
protectorChristian Graus3-Mar-09 17:12 
QuestionDataSets... Pin
Illegal Operation3-Mar-09 14:59
Illegal Operation3-Mar-09 14:59 
Hi,

I have a dataset that contains information froma database. The database has 3 columns named GlobalId, LocalId and Name. Basically the GlobalId is Autoincrimented and the LocalId is not. When I create an entry I want to check if there's a LocalId, if not then add a LocalId, if there is a LocalId then select the last one and incriment that number by 1.

My code looks like this at the moment:

private void GenerateEmployeeID()
{
    int employeeID = 0;
    DataTable dt = dsWBGTS.Tables["Person"];

    if (dt.Rows[0][1].ToString() == "")
    {
        employeeID++;
        lblLocalIdResult.Text = employeeID.ToString();
    }
}


How can I retrieve the last number in the LocalId column and incriment that number by one?

Thank you!!

Illegal Operation

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.