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

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

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



t[Length(Edit2.Text)]=7)or(Edit2.Text[Length(Edit2.Text)]=8)or

(Edit2.Text[Length(Edit2.Text)]=9)or(Edit2.Text[Length(Edit2.Text)]=0)or

(Edit2.Text[Length(Edit2.Text)]=,)then

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

n:=Edit2.Text;(n,length(n),1);.Text:=n;;;;TF_Gurnal.Edit3Change(Sender: TObject);;;TF_Gurnal.Edit4Change(Sender: TObject);;;TF_Gurnal.RadioGroup2Click(Sender: TObject);;;TF_Gurnal.N1Click(Sender: TObject);_Ochist_gurn.Show;TF_Gurnal.RadioGroup1Click(Sender: TObject);.Text:=;.Text:=;.Text:=;RadioGroup1.ItemIndex=0 then.Active:=false;.SQL.Clear;.SQL.Add(select g.kod as Код,fio as ФИО,data_opl as [Дата оплаты],sum as Сумма from gurnal as g,sprav_f as s where (g.kod_ab=s.kod) order by fio);.Active:=true;.Active:=false;.SQL.Clear;.SQL.Add(select * from sprav_f,tarif where (sprav_f.tarif=tarif.kod) order by fio);.Active:=true;.First;.Items.Clear;not ADOQuery2.Eof do.Items.Add(ADOQuery2.FieldByName(fio).AsString);.Next;;.Active:=false;.SQL.Clear;.SQL.Add(select g.kod as Код,s.naimen as [Наименование организации],data_opl as [Дата оплаты],sum as Сумма from gurnal as g,sprav_u as s where (g.kod_ab=s.kod) order by s.naimen);.Active:=true;.Active:=false;.SQL.Clear;.SQL.Add(select * from sprav_u,tarif where (sprav_u.tarif=tarif.kod) order by sprav_u.naimen);.Active:=true;.First;.Items.Clear;not ADOQuery2.Eof do.Items.Add(ADOQuery2.FieldByName(sprav_u.naimen).AsString);.Next;;;;TF_Gurnal.FormCreate(Sender: TObject);(0,MyDir);;TF_Gurnal.Button2Click(Sender: TObject);;TF_Gurnal.Button3Click(Sender: TObject);_Ochist_gurn.Show;.U_Ochist_gurn;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,, DB, ADODB, StdCtrls, Buttons, jpeg, ExtCtrls;_Ochist_Gurn = class(TForm): TBitBtn;: TBitBtn;: TADOQuery;: TImage;: TLabel;BitBtn2Click(Sender: TObject);BitBtn1Click(Sender: TObject);

{ Private declarations }

{ Public declarations };_Ochist_Gurn: TF_Ochist_Gurn;U_Glavn, U_Gurnal;

{$R *.dfm}TF_Ochist_Gurn.BitBtn2Click(Sender: TObject);;TF_Ochist_Gurn.BitBtn1Click(Sender: TObject);.SQL.Clear;.SQL.Add(delete from gurnal);.ExecSQL;_Gurnal.ADOQuery1.Active:=false;_Gurnal.ADOQuery1.Active:=true;;;.U_Organiz;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,, DB, ADODB, StdCtrls, ExtCtrls, DBCtrls, Grids, DBGrids, ComObj,;_Organiz = class(TForm): TDBGrid;: TDBNavigator;: TGroupBox;: TButton;: TButton;: TButton;: TGroupBox;: TLabel;: TLabel;: TLabel;: TLabel;: TEdit;: TEdit;: TEdit;: TEdit;: TButton;: TButton;: TADOQuery;: TDataSource;: TButton;: TImage;FormShow(Sender: TObject);Button1Click(Sender: TObject);Button2Click(Sender: TObject);Button3Click(Sender: TObject);Button6Click(Sender: TObject);Button8Click(Sender: TObject);Button5Click(Sender: TObject);FormCreate(Sender: TObject);Edit1Change(Sender: TObject);Edit2Change(Sender: TObject);Edit3Change(Sender: TObject);Edit4Change(Sender: TObject);Button4Click(Sender: TObject);

{ Private declarations }

{ Public declarations };_Organiz: TF_Organiz;:variant;:string;U_Glavn, U_dob_organiz, U_red_organiz, U_del_organiz;

{$R *.dfm}filtr;_Organiz.ADOQuery1.Active:=false;_Organiz.ADOQuery1.SQL.Clear;_Organiz.ADOQuery1.SQL.Add(select * from sprav_u where (naimen like +#39+F_Organiz.Edit1.Text+%+#39+)and(nom like

+#39+F_Organiz.Edit2.Text+%+#39+)and(nas_punkt like +#39+F_Organiz.Edit3.Text+%+#39+)

+and(adres like +#39+F_Organiz.Edit4.Text+%+#39+));_Organiz.ADOQuery1.Active:=true;;TF_Organiz.FormShow(Sender: TObject);.Text:=;.Text:=;.Text:=;.Text:=;;TF_Organiz.Button1Click(Sender: TObject);_dob_organiz.Show;TF_Organiz.Button2Click(Sender: TObject);_red_organiz.Show;TF_Organiz.Button3Click(Sender: TObject);_Del_organiz.Show;TF_Organiz.Button6Click(Sender: TObject);.Active:=false;.SQL.Clear;.SQL.Add(select * from sprav_u order by naimen);.Active:=true;;TF_Organiz.Button8Click(Sender: TObject);.Active:=false;.SQL.Clear;.SQL.Add(select * from sprav_u where sal_nach<0 order by naimen);.Active:=true;;TF_Organiz.Button5Click(Sender: TObject);i:integer;:=CreateOleObject(Excel.Application);.DisplayAlerts:=false;.WorkBooks.Open(MyDir + \организации.xls);.First;:=4;not ADOQuery1.Eof do.WorkBooks[1].WorkSheets[1].Cells[i,1]:=i-3;.WorkBooks[1].WorkSheets[1].Cells[i,2]:=ADOQuery1.FieldByName(naimen).AsString;.WorkBooks[1].WorkSheets[1].Cells[i,3]:=ADOQuery1.FieldByName(nom).AsString;.WorkBooks[1].WorkSheets[1].Cells[i,4]:=ADOQuery1.FieldByName(nas_punkt).AsString;.WorkBooks[1].WorkSheets[1].Cells[i,5]:=ADOQuery1.FieldByName(adres).AsString;.WorkBooks[1].WorkSheets[1].Cells[i,6]:=ADOQuery1.FieldByName(tarif).AsString;:=i+1;.Next;;.Visible:=true;;TF_Organiz.FormCreate(Sender: TObject);(0,MyDir);;TF_Organiz.Edit1Change(Sender: TObject);;;TF_Organiz.Edit2Change(Sender: TObject);;;TF_Organiz.Edit3Change(Sender: TObject);;;TF_Organiz.Edit4Change(Sender: TObject);;;TF_Organiz.Button4Click(Sender: TObject);;.U_red_Chastnie;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,, DB, ADODB, StdCtrls, DBCtrls, jpeg, ExtCtrls;_red_chastnie = class(TForm): TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;_fio: TEdit;_nom: TEdit;_adr: TEdit;_lg: TEdit;: TButton;: TButton;: TADOQuery;: TDataSource;: TADOQuery;: TComboBox;: TComboBox;FormShow(Sender: TObject);Button2Click(Sender: TObject);Edit_fioChange(Sender: TObject);Edit_nomChange(Sender: TObject);Button1Click(Sender: TObject);

{ Private declarations }

{ Public declarations };_red_chastnie: TF_red_chastnie;U_chastnie;

0then(Edit_fio.Text[Length(Edit_fio.Text)]=1)or(Edit_fio.Text[Length(Edit_fio.Text)]=2)or">{$R *.dfm}TF_red_chastnie.FormShow(Sender: TObject);_fio.Text:=F_Chastnie.ADOQuery1.fieldbyname(fio).AsString;_nom.Text:=F_Chastnie.ADOQuery1.fieldbyname(nom).AsString;_adr.Text:=F_Chastnie.ADOQuery1.fieldbyname(adres).AsString;_lg.Text:=F_Chastnie.ADOQuery1.fieldbyname(bonus).AsString;.First;.Items.Clear;not ADOQuery2.Eof do.Items.Add(ADOQuery2.FieldByName(naimen).AsString);.Next;;.Text:=F_Chastnie.ADOQuery1.FieldByName(nas_punkt).AsString;.Locate(kod,F_Chastnie.ADOQuery1.FieldByName(tarif).AsString,[]);.Text:=ADOQuery2.FieldByName(naimen).AsString;;TF_red_chastnie.Button2Click(Sender: TObject);;TF_red_chastnie.Edit_fioChange(Sender: TObject);n:string;length(Edit_fio.Text)<>0 then(Edit_fio.Text[Length(Edit_fio.Text)]=1)or(Edit_fio.Text[Length(Edit_fio.Text)]=2)or

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

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

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

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

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

0then(Edit_nom.Text[Length(Edit_nom.Text)]=1)or(Edit_nom.Text[Length(Edit_nom.Text)]=2)or">n:=Edit_fio.Text;(n,length(n),1);_fio.Text:=n;;;TF_red_chastnie.Edit_nomChange(Sender: TObject);n:string;Length(Edit_nom.Text)<>0 then(Edit_nom.Text[Length(Edit_nom.Text)]=1)or(Edit_nom.Text[Length(Edit_nom.Text)]=2)or

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

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

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

(Edit_nom.Text[Length(Edit_nom.Text)]=9)or(Edit_nom.Text[Length(Edit_nom.Text)]=0)or

(Edit_nom.Text[Length(Edit_nom.Text)]=-)then

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

)and(Edit_nom.Text)then.Locate(naimen,ComboBox2.Text,[]);:=ADOQuery2.FieldByName(kod).AsString;.SQL.Clear;.SQL.Add(update sprav_f set fio=+#39+Edit_fio.Text+#39+,nom=+#39+Edit_nom.Text+#39+,adres=+

#39+Edit_adr.Text+#39+,bonus=+#39+Edit_lg.Text+#39+,nas_punkt=+#39+ComboBox1.Text+#39

+,tarif=+n+ where kod=+F_Chastnie.ADOQuery1.FieldByName(&