Thanx for the answer.
I will try these settings.
I will keep you informed.
No...this is not the solution...
CREATE TABLE [dbo].[ExampleTable](
[Id] [int] IDENTITY(1,1) NOT NULL,
[JobId] [int] NULL,
[StatusHistoryId] [int] NULL,
[Jobinfo] [varchar](20) NULL,
[Spoolfile] [varchar](100) NULL,
[Spoolfile2] [varchar](100) NULL,
[JobIdCosmosProduction] [int] NULL,
[JobIdInserter] [int] NULL,
[JobIdProduction] [int] NULL,
[InserterSpec] [varchar](100) NULL,
[InserterStatus] [varchar](100) NULL,
[JobIdAFPProduction] [varchar](100) NULL,
[JobToBeDeletedDBP] [bit] NULL,
[NrEnvelops2Print] [int] NULL,
[NrPrints] [int] NULL,
[CurrentStatusvalue] [varchar](100) NULL,
[DateTimeStatus] [datetime] NULL,
[MailpiecesInserted] [int] NULL,
[Mailpieces2Reprint] [int] NULL,
[ObfMailpiecesNl] [int] NULL,
[ObfMailpiecesAbroad] [int] NULL,
[ObfMailpiecesReturned] [int] NULL,
[OBFPrintsReturned] [int] NULL,
[OBFMailPiecesError] [int] NULL,
[OBFIncident] [varchar](20) NULL,
[OBFRemarks] [varchar](100) NULL,
[MailpiecesChecked] [bit] NULL,
Will not work!
Strange......
I now use
private void BasicBindObjects(BindingSource aBindingSource) {
try {
if (txtObfRemarks.DataBindings.Count == 0) {
#region INT
txtOBFMailpiecesNL.DataBindings.Add("Text", aBindingSource, "ObfMailpiecesNl", false, DataSourceUpdateMode.OnValidation);
txtOBFMailpiecesNL.DataBindings[0].Parse += new ConvertEventHandler(OnExitConTrol);
txtOBFMailpiecesAbroad.DataBindings.Add("Text", aBindingSource, "ObfMailpiecesAbroad", false, DataSourceUpdateMode.OnValidation);
txtOBFMailpiecesAbroad.DataBindings[0].Parse += new ConvertEventHandler(OnExitConTrol);
txtOBFMailpiecesReturned.DataBindings.Add("Text", aBindingSource, "ObfMailpiecesReturned", false, DataSourceUpdateMode.OnValidation);
txtOBFMailpiecesReturned.DataBindings[0].Parse += new ConvertEventHandler(OnExitConTrol);
//txtOBFPrintsReturned.DataBindings.Add("Text", aBindingSource, ProductionJobFields.ObfprintsReturned.SourceColumnName, false, DataSourceUpdateMode.OnValidation);
txtOBFPrintsReturned.DataBindings.Add("Text", aBindingSource, "OBFPrintsReturned", false, DataSourceUpdateMode.OnValidation);
txtOBFPrintsReturned.DataBindings[0].Parse += new ConvertEventHandler(OnExitConTrol);
txtOBFMailPiecesError.DataBindings.Add("Text", aBindingSource, "OBFMailPiecesError", false, DataSourceUpdateMode.OnValidation);
txtOBFMailPiecesError.DataBindings[0].Parse += new ConvertEventHandler(OnExitConTrol);
#endregion
#region String
txtObfIncident.DataBindings.Add("Text", aBindingSource, "OBFIncident", false, DataSourceUpdateMode.OnValidation);
txtObfRemarks.DataBindings.Add("Text", aBindingSource, "OBFRemarks", false, DataSourceUpdateMode.OnValidation);
#endregion
}
}
catch (Exception error) {
MessageBox.Show(error.Message, "Problems BasicBindObjects", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
But it is still not working.
Okay now I have a problem.
I try to go back to the old version where everythings works with the same code you see above.
after a rebuild from the SelfService DAL things stop working.
I see in the GUI if i leave a bound textbox which was value 10 and i changed it to 20 when tab(ing) to the next textbox it jumps back to 10....??? The code used to work!
Tips anyone??