База данных «приемная комиссия»
Реферат - Компьютеры, программирование
Другие рефераты по предмету Компьютеры, программирование
1: if raz=1 then Result:=Result+ одна else Result:=Result+ один;
2: if raz=1 then Result:=Result+ две else Result:=Result+ два;
else Result:=Result+ones[StrToInt(s[3])];
end;
Result:=Result+razryad[raz];
case StrToInt(s[3]) of
0,5,6,7,8,9: if raz>1 then Result:=Result+ов;
1: if raz=1 then Result:=Result+а;
2,3,4: if raz=1 then Result:=Result+и else if raz>1 then Result:=Result+а;
end; end else
begin
Result:=Result+ones[StrToInt(Copy(s,2,2))];
Result:=Result+razryad[raz];
if raz>1 then Result:=Result+ов;
end;
end;
begin
val:=Trunc(value);
if val=0 then
begin
Result:=ноль;
Exit;
end;
s:=IntToStr(val);
Result:=;
i:=0;
while Length(s)>0 do
begin
Result:=shortNum(Copy(00+s,Length(00+s)-2,3),i)+Result;
if Length(s)>3 then s:=Copy(s,1,Length(s)-3) else s:=;
inc(i);
end;
s:=IntToStr(Trunc((value-val)*100+0.5));
if s=0 then s:=00;
Result:=Result+ руб +s+ коп;
if Copy(Result,0,1)= then Delete(Result,0,2);
if Copy(Result,0,1)= then Delete(Result,0,1);
if Copy(Result,Length(Result)-1,1)= then Delete(Result,Length(Result)-1,1);
end;
Приложение В
procedure TEditSlushForm.CreateReport;
var FileName, S1, S2, S3: OLEVariant;
i, n: LongInt;
Whatr: OLEVariant;
Which: OLEVariant;
Count: OLEVariant;
FileDogovor, NameBookmakers: OLEVariant;
Temp: Variant;
begin
FileDogovor:=DataModule1.SpecialsTable.Fields.Fields[9].Text;
if (FileDogovor=) or (FileExists(FileDogovor)) then FileDogovor:=Path+\Data\GeneralBlank.dot;
//Путь до файла с бланком
FileName:=FileDogovor;
if FileExists(FileName)=false then Application.MessageBox(Файл с бланком договора не найден. Возможно файл был переименован либо удален.#13Обратитесь к администратору для устранения ошибки.,Критическая ошибка,mb_Ok+mb_IconError) else
begin
MainForm.Label1.Caption:=0% ;
MainForm.ProgressBar1.Visible:=true;
MainForm.ProgressBar1.Max:=100;
MainForm.ProgressBar1.Position:=0;
try
WA.Connect;
WA.WindowState:=wdWindowStateMaximize;
WA.Documents.OpenOld(FileName, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam);
WA.ActiveWindow.ActivePane.View.Zoom.Percentage:=100;
Whatr:=wdGoToBookmark;
Which:=unAssigned;
Count:=unAssigned;
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+1;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
try
NameBookmakers:=Num;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
WA.Selection.TypeText(DogovorDBEdit.Text);
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
try
NameBookmakers:=Date;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
WA.Selection.TypeText(DateDBEdit.Text);
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
try
NameBookmakers:=Zakazchik;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
WA.Selection.TypeText(FamDBEdit.Text+ +NameDBEdit.Text+ +SurNameDBEdit.Text);
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
try
NameBookmakers:=License;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
WA.Selection.TypeText(DataModule1.RekvizitTable.Fields.Fields[9].Text);
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
try
NameBookmakers:=Director;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
WA.Selection.TypeText(DataModule1.RekvizitTable.Fields.Fields[11].Text);
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
try
NameBookmakers:=Slushatel;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
WA.Selection.TypeText(FioDBEdit.Text);
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
try
NameBookmakers:=Programm;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
WA.Selection.TypeText(DataModule1.SpecialsTable.Fields.Fields[2].Text);
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
try
NameBookmakers:=Hour;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
WA.Selection.TypeText(DataModule1.SpecialsTable.Fields.Fields[8].Text);
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
try
NameBookmakers:=Month;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
WA.Selection.TypeText(DataModule1.SpecialsTable.Fields.Fields[7].Text);
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
if SaleDBCheckBox.Checked=false then
begin
try
NameBookmakers:=Summ;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
Temp:=DataModule1.SpecialsTable.Fields.Fields[4].Text;
WA.Selection.TypeText(DataModule1.SpecialsTable.Fields.Fields[4].Text+ (+MainForm.CurrencyToStr(Temp)+));
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
try
NameBookmakers:=Plata;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
Temp:=DataModule1.SpecialsTable.Fields.Fields[3].Text;
WA.Selection.TypeText(DataModule1.SpecialsTable.Fields.Fields[3].Text+ (+MainForm.CurrencyToStr(Temp)+));
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
end else
begin
try
NameBookmakers:=Summ;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
Temp:=DataModule1.SpecialsTable.Fields.Fields[6].Text;
WA.Selection.TypeText(DataModule1.SpecialsTable.Fields.Fields[6].Text+ (+MainForm.CurrencyToStr(Temp)+));
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
try
NameBookmakers:=Plata;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
Temp:=DataModule1.SpecialsTable.Fields.Fields[5].Text;
WA.Selection.TypeText(DataModule1.SpecialsTable.Fields.Fields[5].Text+ (+MainForm.CurrencyToStr(Temp)+));
MainForm.ProgressBar1.Position:=MainForm.ProgressBar1.Position+3;
MainForm.Label1.Caption:=IntToStr(MainForm.ProgressBar1.Position)+% ;
except
end;
end;
try
NameBookmakers:=DateVuplatu;
WA.Selection.GoTo_(Whatr, Which, Count, NameBookmakers);
WA.Selection.TypeText(DateVuplatuDBEdit.Text);
MainForm.ProgressBar1.P