Click here to Skip to main content
15,915,093 members
Home / Discussions / C#
   

C#

 
AnswerRe: Exporting Multiple Sheets in Excel Pin
Greg Chelstowski23-Feb-09 21:34
Greg Chelstowski23-Feb-09 21:34 
QuestionOverloading increment operator [modified] Pin
PIEBALDconsult23-Feb-09 20:27
mvePIEBALDconsult23-Feb-09 20:27 
AnswerRe: Overloading increment operator Pin
DaveyM6923-Feb-09 22:51
professionalDaveyM6923-Feb-09 22:51 
GeneralRe: Overloading increment operator Pin
PIEBALDconsult24-Feb-09 5:11
mvePIEBALDconsult24-Feb-09 5:11 
GeneralRe: Overloading increment operator Pin
DaveyM6924-Feb-09 12:19
professionalDaveyM6924-Feb-09 12:19 
GeneralRe: Overloading increment operator [modified] Pin
S. Senthil Kumar24-Feb-09 8:08
S. Senthil Kumar24-Feb-09 8:08 
GeneralRe: Overloading increment operator Pin
DaveyM6924-Feb-09 9:51
professionalDaveyM6924-Feb-09 9:51 
AnswerRe: Overloading increment operator Pin
Ennis Ray Lynch, Jr.24-Feb-09 3:29
Ennis Ray Lynch, Jr.24-Feb-09 3:29 
GeneralRe: Overloading increment operator Pin
PIEBALDconsult24-Feb-09 3:55
mvePIEBALDconsult24-Feb-09 3:55 
GeneralRe: Overloading increment operator Pin
Ennis Ray Lynch, Jr.24-Feb-09 3:57
Ennis Ray Lynch, Jr.24-Feb-09 3:57 
Question2d graphs in c# Pin
shefa' isied23-Feb-09 20:02
shefa' isied23-Feb-09 20:02 
AnswerRe: 2d graphs in c# Pin
Megidolaon23-Feb-09 20:16
Megidolaon23-Feb-09 20:16 
AnswerRe: 2d graphs in c# Pin
Nagy Vilmos23-Feb-09 22:55
professionalNagy Vilmos23-Feb-09 22:55 
QuestionHello, please help me cusutomize datagrid or datagridview in C# Pin
anhdn200823-Feb-09 19:52
anhdn200823-Feb-09 19:52 
QuestionType cast Pin
mrithula823-Feb-09 17:58
mrithula823-Feb-09 17:58 
AnswerRe: Type cast Pin
Eslam Afifi23-Feb-09 18:19
Eslam Afifi23-Feb-09 18:19 
GeneralRe: Type cast Pin
mrithula823-Feb-09 18:34
mrithula823-Feb-09 18:34 
AnswerRe: Type cast Pin
Cracked-Down23-Feb-09 18:52
Cracked-Down23-Feb-09 18:52 
GeneralRe: Type cast Pin
mrithula823-Feb-09 19:03
mrithula823-Feb-09 19:03 
AnswerRe: Type cast Pin
Cracked-Down23-Feb-09 19:10
Cracked-Down23-Feb-09 19:10 
GeneralRe: Type cast Pin
mrithula823-Feb-09 20:02
mrithula823-Feb-09 20:02 
AnswerRe: Type cast Pin
Cracked-Down23-Feb-09 20:16
Cracked-Down23-Feb-09 20:16 
GeneralRe: Type cast Pin
mrithula823-Feb-09 23:40
mrithula823-Feb-09 23:40 
AnswerRe: Type cast Pin
Cracked-Down24-Feb-09 0:13
Cracked-Down24-Feb-09 0:13 
QuestionC# NTier and LINQ Pin
Illegal Operation23-Feb-09 14:31
Illegal Operation23-Feb-09 14:31 
I am in need of some help. I have written the following code to save entries in a datagrid to the database, my code looks like this:

UseWaitCursor = true;

this.Validate();
this.accountTypeBindingSource.EndEdit();

ServiceReference1.Service1Client proxySaveBankAccountTypes = new WBGTS.Client.ServiceReference1.Service1Client();
var bankAccountTypeChanges = (WBGTS.BusinessLogicLayer.dsWBGTS)this.dsWBGTS.GetChanges();

if (bankAccountTypeChanges != null)
{
    if (proxySaveBankAccountTypes.SaveAccountType(ref bankAccountTypeChanges))
    {
        var bankAccountTypeRows = from row in this.dsWBGTS.AccountType
                                  where Convert.ToBoolean(DataRowState.Added)
                                  select bankAccountTypeChanges;

        this.dsWBGTS.Merge(bankAccountTypeChanges);
        this.dsWBGTS.AcceptChanges();
    }
}

UseWaitCursor = false;


The problem is that when I add somthing to the datagrid it always shows the -1 number and the new record, after closing the form and opening again the record is fine but if you add a new entry it shows duplicates again!

I am trying to build a foreach loop into this method but I am having difficulty converting dataset to datarow.

Thanks!

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.