![]() Главная страница Случайная страница КАТЕГОРИИ: АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторикаСоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника |
Листинг А⇐ ПредыдущаяСтр 13 из 13
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Grids, DBGrids, ExtCtrls, DB, ADODB, Buttons; type TFormBD = class(TForm) Panel1: TPanel; Panel3: TPanel; Label1: TLabel; Edit1: TEdit; Label2: TLabel; Edit2: TEdit; Splitter1: TSplitter; Panel2: TPanel; DBGrid1: TDBGrid; ADOConnection1: TADOConnection; DataSource1: TDataSource; ADOTable1: TADOTable; BitBtn1: TBitBtn; BitBtn2: TBitBtn; BitBtn3: TBitBtn; procedure BitBtn1Click(Sender: TObject); procedure BitBtn3Click(Sender: TObject); procedure BitBtn2Click(Sender: TObject); procedure Edit1KeyPress(Sender: TObject; var Key: Char); procedure Edit2Change(Sender: TObject); private { Private declarations } public { Public declarations } end; var FormBD: TFormBD; search1, search2: string; implementation uses Unit3, Unit4; {$R *.dfm} procedure TFormBD.BitBtn1Click(Sender: TObject); begin FormRegistr.Font.Color: =clBlack; FormRegistr.Show; FormRegistr.Caption: ='Добавление сотрудника'; ADOTable1.Insert; end; procedure TFormBD.BitBtn3Click(Sender: TObject); var buttonSelected: Integer; Sotrudnik: string; begin Sotrudnik: =DataSource1.DataSet.Fields.Fields[1].Value+' '+DataSource1.DataSet.Fields.Fields[2].Value+' '+DataSource1.DataSet.Fields.Fields[3].Value+'? '; buttonSelected: =MessageDlg('Вы уверены, что хотите удалить сотрудника: '+Sotrudnik, mtConfirmation, [mbOk, mbCancel], 0); if buttonSelected = mrOK then FormBD.ADOTable1.Delete; end; procedure TFormBD.BitBtn2Click(Sender: TObject); begin FormRegistr.Caption: ='Редактирование данных сотрудника'; FormRegistr.Show; end; procedure TFormBD.Edit1KeyPress(Sender: TObject; var Key: Char); begin search1: =edit1.Text; dbgrid1.DataSource.DataSet.Locate('Фамилия', search1, [loPartialKey]) end; procedure TFormBD.Edit2Change(Sender: TObject); begin search2: =edit2.Text; dbgrid1.DataSource.DataSet.Locate('Кабинет', search2, [loPartialKey]); end; end. unit Unit3; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, DBCtrls, Mask; type TFormRegistr = class(TForm) DBEdit1: TDBEdit; DBEdit2: TDBEdit; DBEdit3: TDBEdit; DBEdit4: TDBEdit; DBEdit5: TDBEdit; DBEdit6: TDBEdit; DBEdit7: TDBEdit; DBEdit8: TDBEdit; DBComboBox1: TDBComboBox; BitBtn1: TBitBtn; BitBtn2: TBitBtn; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel; Label8: TLabel; Label9: TLabel; procedure BitBtn1Click(Sender: TObject); procedure BitBtn2Click(Sender: TObject); procedure FormShow(Sender: TObject); private { Private declarations } public { Public declarations } end; var FormRegistr: TFormRegistr; implementation uses Unit1; {$R *.dfm} procedure TFormRegistr.BitBtn1Click(Sender: TObject); var buttonSelected: integer; begin If DBEdit1.Text='' then Label1.Font.Color: =clRed else Label1.Font.Color: =clBlack; If DBEdit2.Text='' then Label2.Font.Color: =clRed else Label2.Font.Color: =clBlack; If DBEdit3.Text='' then Label3.Font.Color: =clRed else Label3.Font.Color: =clBlack; If DBEdit4.Text='' then Label4.Font.Color: =clRed else Label4.Font.Color: =clBlack; If DBEdit5.Text='' then Label5.Font.Color: =clRed else Label5.Font.Color: =clBlack; If DBEdit6.Text='' then Label6.Font.Color: =clRed else Label6.Font.Color: =clBlack; If DBEdit7.Text='' then Label7.Font.Color: =clRed else Label7.Font.Color: =clBlack; If DBEdit8.Text='' then Label8.Font.Color: =clRed else Label8.Font.Color: =clBlack; If DBComboBox1.Text='' then Label9.Font.Color: =clRed else Label9.Font.Color: =clBlack; If ((Label1.Font.Color=clRed) or (Label2.Font.Color=clRed) or (Label3.Font.Color=clRed) or (Label4.Font.Color=clRed) or (Label5.Font.Color=clRed) or (Label6.Font.Color=clRed) or (Label7.Font.Color=clRed) or (Label8.Font.Color=clRed) or (DBComboBox1.Text='')) then buttonSelected: =MessageDlg('Вы ввели не все данные.', mtError, [mbOk], 0) else begin FormBD.ADOTable1.Post; FormRegistr.Close; end; end; procedure TFormRegistr.BitBtn2Click(Sender: TObject); begin FormRegistr.Close; FormBD.ADOTable1.Delete; end; procedure TFormRegistr.FormShow(Sender: TObject); begin Label1.Font.Color: =clBlack; Label2.Font.Color: =clBlack; Label3.Font.Color: =clBlack; Label4.Font.Color: =clBlack; Label5.Font.Color: =clBlack; Label6.Font.Color: =clBlack; Label7.Font.Color: =clBlack; Label8.Font.Color: =clBlack; Label9.Font.Color: =clBlack; end; end. unit Unit5; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, DB, ADODB; type TFormEnter = class(TForm) EditPassword: TEdit; Label1: TLabel; Label2: TLabel; Label3: TLabel; Button1: TButton; Label4: TLabel; EditLogin: TEdit; procedure Label3Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure EditPasswordKeyPress(Sender: TObject; var Key: Char); private { Private declarations } public { Public declarations } end; var FormEnter: TFormEnter; Index: integer; implementation uses Unit1, Unit6, Unit7, Unit8; {$R *.dfm} procedure TFormEnter.Label3Click(Sender: TObject); var buttonSelected: integer; begin buttonSelected: =MessageDlg('Если вы испытываете сложности со входом, позвоните в отдел тех.поддержки по телефону 1010', mtConfirmation, [mbOk], 0); end; procedure TFormEnter.Button1Click(Sender: TObject); var LogPass: array of string; I, H, Counst: integer; Login, Password, LoginAndPassword: string; begin setLength(LogPass, 50); Login: =EditLogin.Text; if ((EditLogin.Text=('Admin')) and (EditPassword.Text=('qwerty'))) then begin FormEnter.Visible: =False; FormAdmin.Show; end else FormBD.ADOTable1.First; For I: =0 to FormBD.ADOTable1.RecordCount -1 do begin LogPass[I]: =FormBD.ADOTable1.FieldValues['Логин']+' '+FormBD.ADOTable1.FieldValues['Пароль']; FormBD.ADOTable1.Next; Inc(Counst); end; LoginAndPassword: =Trim(EditLogin.Text)+' '+Trim(EditPassword.Text); For H: =0 to Counst-1 do begin if LoginAndPassword = LogPass[H] then begin FormEnter.Visible: =False; FormKlient.Show; Index: =H+1; FormBD.DBGrid1.DataSource.DataSet.Locate('Логин', Login, [loPartialKey]); FormKlient.Label6.Caption: =FormBD.DBGrid1.DataSource.DataSet.Fields.Fields[1].Value+' '+FormBD.DBGrid1.DataSource.DataSet.Fields.Fields[2].Value+' '+FormBD.DBGrid1.DataSource.DataSet.Fields.Fields[3].Value; end else Label4.Visible: =true; EditLogin.Clear; EditPassword.Clear; end; end; procedure TFormEnter.EditPasswordKeyPress(Sender: TObject; var Key: Char); begin if key =#13 then Button1.Click; //нажатие кнопки по клавише Enter end; end. unit Unit7; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ScktComp; type TFormKlient = class(TForm) Memo1: TMemo; Label1: TLabel; Label2: TLabel; Label5: TLabel; Memo2: TMemo; Button1: TButton; ComboBoxProblem: TComboBox; ComboBoxProblem2: TComboBox; ClientSocket1: TClientSocket; Label6: TLabel; Label3: TLabel; procedure Button1Click(Sender: TObject); procedure ComboBoxProblemClick(Sender: TObject); procedure FormShow(Sender: TObject); procedure ComboBoxProblemSelect(Sender: TObject); procedure ClientSocket1Read(Sender: TObject; Socket: TCustomWinSocket); { procedure ClientSocket1Read(Sender: TObject; Socket: TCustomWinSocket); } private { Private declarations } public { Public declarations } end; var WorkDate: TDate; FormKlient: TFormKlient; Packet, Kabinet, Telefon, Prioritet, Fam, Imya, Otch, Problema1, Problema2, Opisanie: string; implementation uses Unit5; {$R *.dfm} procedure TFormKlient.Button1Click(Sender: TObject); begin WorkDate: = Now; If ComboBoxProblem.Text=('Выберите тип проблемы') then begin Label1.Font.Color: =clRed; Label1.Caption: =('Вы не выбрали тип проблемы'); end else If (ComboBoxProblem.Text=('Затрудняюсь выбрать')) and (memo2.Text='') then begin label1.Caption: =('Тип проблемы'); Label1.Font.Color: =clBlack; Label5.Font.Color: =clRed; Label5.Caption: =('Приложите описание проблемы'); end else If (ComboBoxProblem2.Visible=True) and ((ComboBoxProblem2.Text='Выберите вид устройства') or (ComboBoxProblem2.Text='Выберите вид программного обеспечения')) then begin Label2.Font.Color: =clRed; end else begin if ComboBoxProblem2.Text='' then ComboBoxProblem2.Text: ='Нет'; if memo2.Text='' then memo2.Text: ='Нет'; label5.Caption: =('Описание проблемы'); label1.Caption: =('Тип проблемы'); Label1.Font.Color: =clBlack; Label5.Font.Color: =clBlack; Label2.Font.Color: =clBlack; Packet: =ComboBoxProblem.Text+#13+ComboBoxProblem2.Text+#13+Memo2.text+#13+inttostr(Index); //формирование пакета для передачи ClientSocket1.Socket.SendText(ansistring(Packet)); memo1.Lines.Add('Ваша заявка была отправлена, сортрудник техничекой поддержки свяжется с вами в ближайшее время'+TimeToStr(WorkDate)); end; end; procedure TFormKlient.ComboBoxProblemClick(Sender: TObject); begin comboboxproblem2.Items.Clear; end; procedure TFormKlient.FormShow(Sender: TObject); begin ClientSocket1.Host: ='25.69.41.231'; ClientSocket1.Active: =True; Memo1.ReadOnly: =True; Memo2.SetFocus; end; procedure TFormKlient.ComboBoxProblemSelect(Sender: TObject); begin If ComboBoxProblem.text=('Выберите тип проблемы') then begin label2.Visible: =false; Comboboxproblem2.Visible: =false; end; if ComboBoxProblem.text=('Программная') then begin label1.Caption: =('Тип проблемы'); Label1.Font.Color: =clBlack; Label2.Font.Color: =clBlack; label2.Visible: =true; Comboboxproblem2.Visible: =true; label2.Caption: =('Вид программного обеспечения'); ComboBoxProblem2.Text: =('Выберите вид программного обеспечения'); ComboBoxProblem2.Items.Add('Операционная система'); ComboBoxProblem2.Items.Add('Пакет Office'); ComboBoxProblem2.Items.Add('Сопровождающее ПО'); ComboBoxProblem2.Items.Add('Затрудняюсь выбрать'); end; if ComboBoxProblem.text=('Аппаратная') then begin label1.Caption: =('Тип проблемы'); Label1.Font.Color: =clBlack; Label2.Font.Color: =clBlack; label2.Visible: =true; Comboboxproblem2.Visible: =true; label2.Caption: =('Вид устройства'); ComboBoxProblem2.Text: =('Выберите вид устройства'); ComboBoxProblem2.Items.Add('Компьютер и комплектующие'); ComboBoxProblem2.Items.Add('Принтер'); ComboBoxProblem2.Items.Add('Затрудняюсь выбрать'); end; if ComboBoxProblem.text=('Отсутствует интернет подключение') then begin label1.Caption: =('Тип проблемы'); Label1.Font.Color: =clBlack; Label2.Visible: =false; Comboboxproblem2.Visible: =false; end; If ComboBoxProblem.Text=('Затрудняюсь выбрать') then begin label1.Caption: =('Тип проблемы'); Label1.Font.Color: =clBlack; Label2.Visible: =false; Comboboxproblem2.Visible: =false; ComboBoxProblem2.Items.Clear; Label5.Caption: =('Опишите свою проблему'); end; end; procedure TFormKlient.ClientSocket1Read(Sender: TObject; Socket: TCustomWinSocket); begin memo1.Lines.Add('Ваша заявка номер '+ClientSocket1.Socket.ReceiveText+', была принята.'+' '+TimeToStr(WorkDate)); end; end. unit Unit8; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ScktComp, DB, ADODB, Grids, DBGrids, ExtCtrls; type TFormAdmin = class(TForm) Button1: TButton; Button2: TButton; Button3: TButton; Memo1: TMemo; Button4: TButton; Panel1: TPanel; Panel2: TPanel; DataSource1: TDataSource; DBGrid1: TDBGrid; ADOTable1: TADOTable; ADOConnection1: TADOConnection; ServerSocket1: TServerSocket; procedure Button1Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure ServerSocket1ClientRead(Sender: TObject; Socket: TCustomWinSocket); procedure ServerSocket1ClientConnect(Sender: TObject; Socket: TCustomWinSocket); procedure FormShow(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var PacketList: TstringList; FormAdmin: TFormAdmin; WorkDate: TDate; implementation uses Unit1, Unit10, Unit11, Unit12; {$R *.dfm} procedure TFormAdmin.Button1Click(Sender: TObject); begin FormBD.Show; end; procedure TFormAdmin.Button3Click(Sender: TObject); begin FormRabota.show; end; procedure TFormAdmin.Button4Click(Sender: TObject); begin FormSdelano.show; end; procedure TFormAdmin.ServerSocket1ClientConnect(Sender: TObject; Socket: TCustomWinSocket); begin memo1.Lines.Add('к вам поделючились'+ Socket.RemoteAddress); end; procedure TFormAdmin.ServerSocket1ClientRead(Sender: TObject; Socket: TCustomWinSocket); var j: integer; Tip1, Tip, Podr, Opisanie, NomerKlienta: string; begin WorkDate: = Now; begin ansistring(tip1): =ServerSocket1.Socket.Connections[0].ReceiveText; PacketList.Clear; ExtractStrings([#13], [], PChar(tip1), PacketList); Tip: =PacketList[0]; Podr: =PacketList[1]; Opisanie: =PacketList[2]; NomerKlienta: =PacketList[3]; memo1.Lines.Add('получено'+Tip+Podr+Opisanie+NomerKlienta); end; begin FormBD.ADOTable1.First; for j: =0 to (strtoint(NomerKlienta)-2) do begin FormBD.ADOTable1.Next; end; end; begin ADOTable1.Insert; DBGrid1.DataSource.DataSet.FieldByName('Приоритет').AsString: =FormBD.DBGrid1.DataSource.DataSet.Fields.Fields[9].Value; DBGrid1.DataSource.DataSet.FieldByName('Фамилия').AsString: =FormBD.DBGrid1.DataSource.DataSet.Fields.Fields[1].Value; DBGrid1.DataSource.DataSet.FieldByName('Имя').AsString: =FormBD.DBGrid1.DataSource.DataSet.Fields.Fields[2].Value; DBGrid1.DataSource.DataSet.FieldByName('Отчество').AsString: =FormBD.DBGrid1.DataSource.DataSet.Fields.Fields[3].Value; DBGrid1.DataSource.DataSet.FieldByName('Кабинет').AsString: =FormBD.DBGrid1.DataSource.DataSet.Fields.Fields[7].Value; DBGrid1.DataSource.DataSet.FieldByName('Номер телефона').AsString: =FormBD.DBGrid1.DataSource.DataSet.Fields.Fields[8].Value; DBGrid1.DataSource.DataSet.FieldByName('Время поступления').AsString: =DateToStr(WorkDate)+TimeToStr(WorkDate); DBGrid1.DataSource.DataSet.FieldByName('Описание').AsString: =Opisanie; DBGrid1.DataSource.DataSet.FieldByName('Тип проблемы').AsString: =Tip; DBGrid1.DataSource.DataSet.FieldByName('Подробности').AsString: =Podr; ADOTable1.Post; PacketList.Free(); memo1.Lines.Add('Новая заявка'+(inttostr(DBGrid1.DataSource.DataSet.Fields.Fields[0].Value))); ServerSocket1.Socket.Connections[0].SendText(inttostr(DBGrid1.DataSource.DataSet.Fields.Fields[0].Value)); end; end; procedure TFormAdmin.FormShow(Sender: TObject); begin PacketList: = TStringList.Create(); end; procedure TFormAdmin.Button2Click(Sender: TObject); begin FormSpec.show; end; end. unit Unit9; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, DBGrids, ExtCtrls, DB, ADODB, StdCtrls; type TBDzayavok = class(TForm) Panel1: TPanel; Panel2: TPanel; Panel3: TPanel; DBGrid1: TDBGrid; Button1: TButton; Button2: TButton; Edit1: TEdit; Edit2: TEdit; Label1: TLabel; Label2: TLabel; DataSource1: TDataSource; ADOConnection1: TADOConnection; ADOTable1: TADOTable; private { Private declarations } public { Public declarations } end; var BDzayavok: TBDzayavok; implementation {$R *.dfm} end. unit Unit10; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, DB, ADODB, Grids, DBGrids, ExtCtrls; type TFormRabota = class(TForm) Panel1: TPanel; Panel2: TPanel; DataSource1: TDataSource; DBGrid1: TDBGrid; ADOConnection1: TADOConnection; ADOTable1: TADOTable; Label1: TLabel; Edit1: TEdit; Button1: TButton; procedure Edit1KeyPress(Sender: TObject; var Key: Char); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var FormRabota: TFormRabota; implementation uses Unit8, Unit11; {$R *.dfm} procedure TFormRabota.Edit1KeyPress(Sender: TObject; var Key: Char); var search1: string; begin search1: =edit1.Text; dbgrid1.DataSource.DataSet.Locate('Специалист', search1, [loPartialKey]) end; procedure TFormRabota.Button1Click(Sender: TObject); var f: string; buttonSelected: Integer; begin WorkDate: =Now; f: =FormRabota.DataSource1.DataSet.Fields.Fields[0].Value; buttonSelected: =MessageDlg('Вы уверены, что хотите закрыть заявку номер '+f, mtConfirmation, [mbOk, mbCancel], 0); if buttonSelected = mrOK then begin FormSdelano.ADOTable1.Insert; FormSdelano.DataSource1.DataSet.FieldByName('Номер заявки').AsString: =FormRabota.DataSource1.DataSet.Fields.Fields[0].Value; FormSdelano.DataSource1.DataSet.FieldByName('Фамилия').AsString: =FormRabota.DataSource1.DataSet.Fields.Fields[1].Value; FormSdelano.DataSource1.DataSet.FieldByName('Имя').AsString: =FormRabota.DataSource1.DataSet.Fields.Fields[2].Value; FormSdelano.DataSource1.DataSet.FieldByName('Отчество').AsString: =FormRabota.DataSource1.DataSet.Fields.Fields[3].Value; FormSdelano.DataSource1.DataSet.FieldByName('Кабинет').AsString: =FormRabota.DataSource1.DataSet.Fields.Fields[4].Value; FormSdelano.DataSource1.DataSet.FieldByName('Номер телефона').AsString: =FormRabota.DataSource1.DataSet.Fields.Fields[5].Value; FormSdelano.DataSource1.DataSet.FieldByName('Тип проблемы').AsString: =FormRabota.DataSource1.DataSet.Fields.Fields[7].Value; FormSdelano.DataSource1.DataSet.FieldByName('Подробности').AsString: =FormRabota.DataSource1.DataSet.Fields.Fields[8].Value; FormSdelano.DataSource1.DataSet.FieldByName('Описание').AsString: =FormRabota.DataSource1.DataSet.Fields.Fields[9].Value; FormSdelano.DataSource1.DataSet.FieldByName('Время поступления').AsDateTime: =FormRabota.DataSource1.DataSet.Fields.Fields[11].AsDateTime; FormSdelano.DataSource1.DataSet.FieldByName('Время начала выполнения').AsDateTime: =FormRabota.DataSource1.DataSet.Fields.Fields[12].AsDateTime; FormSdelano.DataSource1.DataSet.FieldByName('Специалист').AsString: =FormRabota.DataSource1.DataSet.Fields.Fields[6].Value; FormSdelano.DataSource1.DataSet.FieldByName('Время окончания работ').AsString: =DateToStr(WorkDate)+TimeToStr(WorkDate); FormSdelano.ADOTable1.Post; FormRabota.ADOTable1.Delete; end; end; end. unit Unit11; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, DBGrids, StdCtrls, ExtCtrls, DB, ADODB; type TFormSdelano = class(TForm) Panel1: TPanel; Button1: TButton; Button2: TButton; Label1: TLabel; Label2: TLabel; Edit1: TEdit; Edit2: TEdit; Panel2: TPanel; DBGrid1: TDBGrid; DataSource1: TDataSource; ADOConnection1: TADOConnection; ADOTable1: TADOTable; private { Private declarations } public { Public declarations } end; var FormSdelano: TFormSdelano; implementation {$R *.dfm} end. unit Unit12; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TFormSpec = class(TForm) ComboBoxSpec: TComboBox; Label1: TLabel; Button1: TButton; Button2: TButton; procedure Button2Click(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var FormSpec: TFormSpec; implementation uses Unit8, Unit10; {$R *.dfm} procedure TFormSpec.Button2Click(Sender: TObject); begin FormSpec.Close; end; procedure TFormSpec.Button1Click(Sender: TObject); begin if ComboBoxSpec.Text='Специалисты' then begin Label1.Font.Color: =clRed; Label1.Caption: ='Вы не выбрали специалиста' end else begin WorkDate: =Now; Label1.Font.Color: =clBlack; Label1.Caption: ='Выберите специалиста'; begin FormRabota.ADOTable1.Insert; FormRabota.DataSource1.DataSet.FieldByName('Номер заявки').AsString: =FormAdmin.DataSource1.DataSet.Fields.Fields[0].Value; FormRabota.DataSource1.DataSet.FieldByName('Фамилия').AsString: =FormAdmin.DataSource1.DataSet.Fields.Fields[2].Value; FormRabota.DataSource1.DataSet.FieldByName('Имя').AsString: =FormAdmin.DataSource1.DataSet.Fields.Fields[3].Value; FormRabota.DataSource1.DataSet.FieldByName('Отчество').AsString: =FormAdmin.DataSource1.DataSet.Fields.Fields[4].Value; FormRabota.DataSource1.DataSet.FieldByName('Кабинет').AsString: =FormAdmin.DataSource1.DataSet.Fields.Fields[5].Value; FormRabota.DataSource1.DataSet.FieldByName('Номер телефона').AsString: =FormAdmin.DataSource1.DataSet.Fields.Fields[6].Value; FormRabota.DataSource1.DataSet.FieldByName('Тип проблемы').AsString: =FormAdmin.DataSource1.DataSet.Fields.Fields[7].Value; FormRabota.DataSource1.DataSet.FieldByName('Подробности').AsString: =FormAdmin.DataSource1.DataSet.Fields.Fields[8].Value; FormRabota.DataSource1.DataSet.FieldByName('Описание').AsString: =FormAdmin.DataSource1.DataSet.Fields.Fields[9].Value; FormRabota.DataSource1.DataSet.FieldByName('Приоритет').AsString: =FormAdmin.DataSource1.DataSet.Fields.Fields[1].Value; FormRabota.DataSource1.DataSet.FieldByName('Время поступления').AsDateTime: =FormAdmin.DataSource1.DataSet.Fields.Fields[10].AsDateTime; FormRabota.DataSource1.DataSet.FieldByName('Время начала выполнения').AsString: =DateToStr(WorkDate)+TimeToStr(WorkDate); FormRabota.DataSource1.DataSet.FieldByName('Специалист').AsString: =ComboBoxSpec.Text; FormRabota.ADOTable1.Post; end; FormAdmin.ADOTable1.Delete; FormSpec.Close; end; end; end.
|