procedure Vorabkontrolle.Vorabkontrolle_Load(sender: System.
Object; e: System.EventArgs);
begin
try
insertcmd := SQLCommand.create;
ds := dataset.Create;
db.get_dataset(ds,'
Select * from tbl_prevcontrol', da, '
Vorabkontrolle',true);
dv := dataview.Create(ds.Tables['
Vorabkontrolle']);
dv.RowFilter := '
fld_company = ' +compnr2.ToString;
DataGrid1.DataSource := dv;
Include(BindingContext[dv, '
'].PositionChanged, poschanged);
oldrow := dv.Item[bindingcontext[dv,'
'].position].Row;
with insertcmd
do begin
CommandText := '
Insert Vorabkontrolle';
CommandType := System.Data.CommandType.StoredProcedure;
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@process', System.Data.SqlDbType.VarChar, 150, '
fld_process'));
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@comment', System.Data.SqlDbType.Text, 640000, '
fld_comment'));
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@importable', System.Data.SqlDbType.Bit,2, '
fld_importable'));
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@reqiurement', System.Data.SqlDbType.text,640000, '
fld_reqiurement'));
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@legitimacypurpose', System.Data.SqlDbType.text,640000, '
fld_legitimacypurpose'));
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@correctness', System.Data.SqlDbType.text,640000, '
fld_correctness'));
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@legitimacytransfer', System.Data.SqlDbType.text,640000, '
fld_legitimacytransfer'));
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@adequecy', System.Data.SqlDbType.text,640000, '
fld_adequecy'));
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@tableid', System.Data.SqlDbType.int ,8, '
fld_tableid'));
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@company', System.Data.SqlDbType.int, 8,'
fld_company'));
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@deleted', System.Data.SqlDbType.bit,1, '
fld_delete'));
Parameters.Add(System.Data.SqlClient.SqlParameter.Create('
@Identity', System.Data.SqlDbType.int,8, '
fld_delete')) ;
with parameters.Item['
@Identity']
do begin
Direction := ParameterDirection.Output;
SourceColumn := '
fld_prevcontrolid';
SourceVersion := DataRowVersion.Original;
end;
end;
except
on ex:
Exception do Messagebox.Show(ex.
Message, '
Fehler beim Include');
end;
end;