Разработка программного обеспечения "Телефонный справочник"

Дипломная работа - Компьютеры, программирование

Другие дипломы по предмету Компьютеры, программирование



dd(insertintotarif(naimen,[ab_f],[ab_u],[min_f],[min_u])values(">n:=Edit_min_u.Text;(n,length(n),1);_min_u.Text:=n;;Edit_min_u.Text= then Edit_min_u.Text:=0;;TF_dob_tarif.Button2Click(Sender: TObject);;TF_dob_tarif.Button1Click(Sender: TObject);Edit_tar.Text<> then.SQL.Clear;.SQL.Add(insert into tarif (naimen,[ab_f],[ab_u],[min_f],[min_u]) values (

+#39+Edit_tar.Text+#39+,+#39+Edit_ab_f.Text+#39+,+#39+Edit_ab_u.Text+#39

+,+#39+Edit_min_f.Text+#39+,+#39+Edit_min_u.Text+#39+));.ExecSQL;_Tarif.ADOQuery1.Active:=false;_Tarif.ADOQuery1.Active:=true;_red_organiz.ADOQuery2.Active:=false;_red_organiz.ADOQuery2.Active:=true;_red_chastnie.ADOQuery2.Active:=false;_red_chastnie.ADOQuery2.Active:=true;_dob_organiz.ADOQuery2.Active:=false;_dob_organiz.ADOQuery2.Active:=true;_dob_chastnie.ADOQuery2.Active:=false;_dob_chastnie.ADOQuery2.Active:=true;;ShowMessage(Введите наименование тарифа!);;.U_Gurnal;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,, ExtCtrls, DBCtrls, DB, Grids, DBGrids, ADODB, StdCtrls, Menus, ComObj,;_Gurnal = class(TForm): TADOQuery;: TDBGrid;: TDataSource;: TDBNavigator;: TGroupBox;: TRadioGroup;: TLabel;: TEdit;: TLabel;: TLabel;_Nachisl: TLabel;: TEdit;: TLabel;: TButton;: TGroupBox;: TLabel;: TEdit;: TLabel;: TEdit;: TRadioGroup;: TADOQuery;: TDataSource;: TComboBox;: TADOQuery;: TADOTable;_tarif: TLabel;: TLabel;: TButton;: TImage;: TButton;FormShow(Sender: TObject);ComboBox1Change(Sender: TObject);Edit1Change(Sender: TObject);Button1Click(Sender: TObject);Edit2Change(Sender: TObject);Edit3Change(Sender: TObject);Edit4Change(Sender: TObject);RadioGroup2Click(Sender: TObject);N1Click(Sender: TObject);RadioGroup1Click(Sender: TObject);FormCreate(Sender: TObject);Button2Click(Sender: TObject);Button3Click(Sender: TObject);

{ Private declarations }

{ Public declarations };_Gurnal: TF_Gurnal;:string;:variant;:string;U_Glavn, U_chastnie, U_Ochist_gurn, U_organiz;

{$R *.dfm}filtr;F_Gurnal.RadioGroup1.ItemIndex=0 thenF_Gurnal.RadioGroup2.ItemIndex=0 then sort:= order by fiosort:= order by data_opl;F_Gurnal.RadioGroup2.ItemIndex=0 then sort:= order by naimensort:= order by data_opl;;_Gurnal.ADOQuery1.Active:=false;_Gurnal.ADOQuery1.SQL.Clear;F_Gurnal.RadioGroup1.ItemIndex=0 then_Gurnal.ADOQuery1.SQL.Add(select g.kod,fio,data_opl,sum from gurnal as g,sprav_f as s where (g.kod_ab=s.kod)and(fio like

+#39+F_Gurnal.Edit3.Text+%+#39+)and(data_opl like +#39+F_Gurnal.Edit4.Text+%+#39+)+sort)_Gurnal.ADOQuery1.SQL.Add(select g.kod,naimen,data_opl,sum from gurnal as g,sprav_u as s where (g.kod_ab=s.kod)and(naimen like

)and(F_Gurnal.Edit1.Text0 then(ComboBox1.Text[Length(ComboBox1.Text)]=1)or(ComboBox1.Text[Length(ComboBox1.Text)]=2)or

(ComboBox1.Text[Length(ComboBox1.Text)]=3)or(ComboBox1.Text[Length(ComboBox1.Text)]=4)or

(ComboBox1.Text[Length(ComboBox1.Text)]=5)or(ComboBox1.Text[Length(ComboBox1.Text)]=6)or

(ComboBox1.Text[Length(ComboBox1.Text)]=7)or(ComboBox1.Text[Length(ComboBox1.Text)]=8)or

(ComboBox1.Text[Length(ComboBox1.Text)]=9)or(ComboBox1.Text[Length(ComboBox1.Text)]=0)then

begin(Вы не можете использовать цифры при вводе ФИО\Организации!);

0then(Edit1.Text[Length(Edit1.Text)]=1)or(Edit1.Text[Length(Edit1.Text)]=2)or">n:=ComboBox1.Text;(n,length(n),1);.Text:=n;;RadioGroup1.ItemIndex=0 then.Locate(fio,ComboBox1.Text,[]).Locate(sprav_u.naimen,ComboBox1.Text,[]);.Locate(kod,ADOQuery2.FieldByName(tarif).AsString,[]);_tarif.Caption:=ADOQuery2.FieldByName(tarif).AsString;l_tarif.Caption= then l_tarif.Caption:=0;.Text:=0;ComboBox1.Text= then_tarif.Caption:=0;_Nachisl.Caption:=0;;;;TF_Gurnal.Edit1Change(Sender: TObject);n:string;Length(Edit1.Text)<>0 then(Edit1.Text[Length(Edit1.Text)]=1)or(Edit1.Text[Length(Edit1.Text)]=2)or

(Edit1.Text[Length(Edit1.Text)]=3)or(Edit1.Text[Length(Edit1.Text)]=4)or

(Edit1.Text[Length(Edit1.Text)]=5)or(Edit1.Text[Length(Edit1.Text)]=6)or

(Edit1.Text[Length(Edit1.Text)]=7)or(Edit1.Text[Length(Edit1.Text)]=8)or

(Edit1.Text[Length(Edit1.Text)]=9)or(Edit1.Text[Length(Edit1.Text)]=0)then

else(Вы не можете использовать буквы при вводе кол-ва минут!);

0then(Edit2.Text[Length(Edit2.Text)]=1)or(Edit2.Text[Length(Edit2.Text)]=2)or">n:=Edit1.Text;(n,length(n),1);.Text:=n;;Edit1.Text= then.Text:=0;_Nachisl.Caption:=0;;_Nachisl.Caption:=floattostr(strtoint(Edit1.Text)*ADOQuery2.FieldByName(min_f).AsFloat+ADOQuery2.FieldByName(ab_f).AsFloat-strtofloat(l_tarif.Caption));;;TF_Gurnal.Button1Click(Sender: TObject);dat,summa,kodik:string;RadioGroup1.ItemIndex=0 then:=datetostr(date);:=Edit2.Text;:=ADOQuery2.FieldByName(sprav_f.kod).AsString;.SQL.Clear;.SQL.Add(insert into gurnal ([data_opl],[sum],[kod_ab]) values (+#39+dat+#39+,+summa+,+kodik+));.ExecSQL;.SQL.Clear;:=floattostr(strtofloat(Edit2.Text)-strtofloat(Label_Nachisl.Caption));.SQL.Add(update [sprav_f] set [TARIF]=+#39+summa+#39+ where kod=+kodik);.ExecSQL;:=CreateOleObject(Excel.Application);.DisplayAlerts:=false;.WorkBooks.Open(MyDir + \Счет.xls);.WorkBooks[1].WorkSheets[1].Cells[3,6]:=datetostr(date);.WorkBooks[1].WorkSheets[1].Cells[4,5]:=ComboBox1.Text;.WorkBooks[1].WorkSheets[1].Cells[5,4]:=ADOQuery2.FieldByName(adres).AsString;.WorkBooks[1].WorkSheets[1].Cells[13,8]:=Label_Nachisl.Caption;.WorkBooks[1].WorkSheets[1].Cells[16,6]:=datetostr(date);.WorkBooks[1].WorkSheets[1].Cells[17,5]:=ComboBox1.Text;.WorkBooks[1].WorkSheets[1].Cells[18,4]:=ADOQuery2.FieldByName(adres).AsString;.WorkBooks[1].WorkSheets[1].Cells[22,9]:=ADOQuery2.FieldByName(ab_f).AsString;.WorkBooks[1].WorkSheets[1].Cells[23,9]:=floattostr(strtoint(Edit1.Text)*ADOQuery2.FieldByName(min_f).AsFloat);.WorkBooks[1].WorkSheets[1].Cells[31,4]:=l_tarif.Caption;.WorkBooks[1].WorkSheets[1].Cells[31,6]:=Edit2.Text;.Visible:=true;_chastnie.ADOQuery1.Active:=false;_chastnie.ADOQuery1.Active:=true;.Active:=false;.Active:=true;.Active:=false;.Active:=true;:=datetostr(date);:=Edit2.Text;:=ADOQuery2.FieldByName(sprav_u.kod).AsString;.SQL.Clear;.SQL.Add(insert into gurnal ([data_opl],[sum],[kod_ab]) values (+#39+dat+#39+,+summa+,+kodik+));.ExecSQL;.SQL.Clear;:=floattostr(strtofloat(Edit2.Text)-strtofloat(Label_Nachisl.Caption));.SQL.Add(update [sprav_u] set [TARIF]=+#39+summa+#39+ where kod=+kodik);.ExecSQL;:=CreateOleObject(Excel.Application);.DisplayAlerts:=false;.WorkBooks.Open(MyDir + \расчетный счет.xls);;.WorkBooks[1].WorkSheets[1].Cells[6,3]:=inttostr(random(5000));.WorkBooks[1].WorkSheets[1].Cells[20,2]:=ADOTable1.FieldByName(naimen).AsString;.WorkBooks[1].WorkSheets[1].Cells[6,5]:=datetostr(date);.WorkBooks[1].WorkSheets[1].Cells[29,4]:=Label_Nachisl.Caption;.WorkBooks[1].WorkSheets[1].Cells[8,2]:=ComboBox1.Text;.WorkBooks[1].WorkSheets[1].Cells[9,4]:=ADOQuery2.FieldByName(adres).AsString;.WorkBooks[1].WorkSheets[1].Cells[29,2]:=l_tarif.Caption;.WorkBooks[1].WorkSheets[1].Cells[29,6]:=Edit2.Text;.Visible:=true;_organiz.ADOQuery1.Active:=false;_organiz.ADOQuery1.Active:=true;.Active:=false;.Active:=true;;.Active:=false;.Active:=true;.Text:=;.Text:=;.Text:=;;TF_Gurnal.Edit2Change(Sender: TObject);n:string;Edit2.Text= then Edit2.Text:=0;Length(Edit2.Text)<>0 then(Edit2.Text[Length(Edit2.Text)]=1)or(Edit2.Text[Length(Edit2.Text)]=2)or

(Edit2.Text[Length(Edit2.Text)]=3)or(Edit2.Text[Length(Edit2.Text)]=4)or

(Edit2.Text[Length(Edit2.Text)]=5)or(Edit2.Text[Length(Edit2.Text)]=6)or

(Edit2.Tex