ClientDataSetStudents.FieldValues['IM']:= AddStudentsFrm.Edit3.Text;
ClientDataSetStudents.FieldValues['OT']:=AddStudentsFrm.Edit4.Text;
ClientDataSetStudents.FieldValues['KURS']:=StrToInt(AddStudentsFrm.Edit5.Text);
ClientDataSetStudents.FieldValues['DATR']:=
StrToDate(AddStudentsFrm.MaskEdit1.Text);
ClientDataSetStudents.FieldValues['SPEC']:=AddStudentsFrm.Edit6.Text;
end;
end;
Form1.ClientDataSetStudents.Post;
try
if Form1.ClientDataSetStudents.ApplyUpdates(-1)=0 then
Form1.ClientDataSetStudents.refresh;
except
on E:Exception do
MessageDLG(Format('Ошибка нет подключения к серверу: %S',[E.Message]),
mtError,[mbOK],0);
end;
AddStudentsFrm.Free;
Form1.ClientDataSetStudents.Close;
end;// if ComboBox1.ItemIndex=0 then
if ComboBox1.ItemIndex=1 then
begin
Form1.ClientDataSetLectors.Open;
if Edit_App_Flag then Form1.ClientDataSetLectors.Append
else begin
Form1.ClientDataSetLectors.Locate('USER_ID',User_Id,[]);
Form1.ClientDataSetLectors.Edit;
end;
AddLectorsFrm:=TAddLectorsFrm.Create(Self);
AddLectorsFrm.ShowModal;
Form1.ClientDataSetLectors.FieldValues['USER_ID']:=User_id;
if AddLectorsFrm.ModalResult=mrOK then
begin
with Form1 do
begin
ClientDataSetLectors.FieldValues['FM']:=
AddLectorsFrm.Edit1.Text;
ClientDataSetLectors.FieldValues['IM']:=
AddLectorsFrm.Edit2.Text;
ClientDataSetLectors.FieldValues['OT']:=
AddLectorsFrm.Edit3.Text;
end;
end;
Form1.ClientDataSetLectors.Post;
try
if Form1.ClientDataSetLectors.ApplyUpdates(-1)=0 then
Form1.ClientDataSetLectors.refresh;
except
on E:Exception do
MessageDLG(Format('Ошибка нет подключения к серверу: %S',[E.Message]),
mtError,[mbOK],0);
end;