- •Introduction
- •4.1 Economic efficiency
- •4.1 Economic efficiency
- •4.2 Calculating of the developed program cost
- •4.3 Calculation of material costs
- •4.4 Calculation of the developer’s salary
- •4.5 Calculation of costs of operation and maintenance of the equipment
- •Защита с использованием электронного ключа
- •Correct posture
Correct posture
When working at the computer it is best to sit on a 2.5 cm higher than normal. The ears must be positioned exactly in the plane of the shoulder. The shoulders should be positioned just above the hips. The head must be kept exactly in relation to both shoulders, the head should not be tilted to one shoulder. When you look down, the head should be directly over the neck, and not lean forward. A more detailed description of the company workplace is below.
Computers today develops particularly rapidly, with extraordinary rapidity appear, and quickly become obsolete and die various technical solutions and standards. According to the forecasts of various economic and sociological organizations computer equipment and telecommunications will remain one of t he fastest growing sectors of the global industry is still at least 10 - 15 years. So reducing the number of people working at computers do not have to wait. On the contrary, rampant computerization, has long gripped the business sector, today more and more captures the mass consumer. In this race, where nothing is permanent, it is difficult to make recommendations, to take any long-lasting solutions, and even more to set standards. And so, while the computer is not a boom will subside before ergonomics and ergonomists will stand new challenges relating to the organization of safe and comfortable environment for people working with computers.
CONCLUSION
In 2006 it is established that in all types of farms of the Jambyl region farm animals and dogs are infected with helminths of different taxonomical ranks which form various associations in organisms of animals and cause significant economic damage to region economy. The highest press of an invasion on pasturable territories around settlements is rendered by populations of farm animals of small-scale enterprises which have no opportunity to adhere to distant-pasture technology.
Problems such are observed across all territory of the southern Kazakhstan. In the field it is necessary to take complex measures of interaction of various means of research for more detailed researches. An integral part of all process on all extent of scientific works is access to various data, both old researches of this sort, and rather new of the carried-out works.
Similar operations need also to be applied to new researches receiving the latest data and their instant processing. For all this variety of operations databases can serve as the best tool.
Databases - a rather large and serious programming.
No business, company or organization today does not dispense with the programs that provide the work with databases.
Typically, the database is created to store and access data, containing information about a certain subject area, that is a field of human activity or the area of the real world. Every database should be a system of information on the subject area. Databases related to the same domain, in various cases include more or less detailed information about it. The level of detail is determined by a number of factors, primarily the purpose of the use of information from the database and the complexity of the production (business) processes that exist within the subject area in specific conditions.
In this case, the database has been developed for the treatment of these studies Zhambyl research veterinary station. All the listed data can be processed and then output as a report in the program of the MS the Excel . This illustrative example can demonstrate the need for such programs in their daily lives, not only large companies but also small institutions.
The developed software stores data helminthological research Zhambyl research veterinary station. These studies are very important to prevent a possible economic damage caused as a result of certain epidemic diseases of domestic animals related to nesvoevrennoy or insufficiently obektovnoy the return statistics. Using a tool such as a database, you can fully handle the large amount of information in a short time.
Translation of information from paper to electronic has many advantages. These include the absence of a large volume of paper-based, easy search capabilities, fast editing, adding, deleting and more. In agriculture, such efficiency vitally needed. Timely detect impending epidemic is not easy, but using all modern technologies can facilitate the solution of this problem.
Thus, as a result of this thesis proposed the original database on the database Access to the use of language the Borland the Delphi 7. 0.It reflects the epizootic situation on the helminthes pets and provides research data Zhambyl research veterinary station. The information is displayed in a user-friendly interface eleven indicators, the results of two of which are processed automatically STANDARD mathematical methods. The program can transfer selected data set in the MS the Excel for further processing and other graphics.
REFERENCES
1. Archangel AY Programming in Delphi 7 - M .: OOO "Bean-Press", 2004. 152 p.
V. Hoffman, Homonenko A. Working with databases in Delphi - SPb .: BHV, 2003. - 366 p.
Computer science. Basic Course / Simonovic SV etc. - St. Petersburg:. Peter, 2000. -640s.
Vladimir Kirillov Fundamentals of relational databases. Tutorial. - SPb .: ITMO, 1994. -90s.
Petrov VN Information systems - SPb .: Peter, 2002. - 688s.
Abel P. assembly language for the IBM PC and the programming / Trans. from English. Y. Salnikova. M:. Vyssh.shk., 1992.-447s.
Yurov V., Khoroshenko C. Assembler (course) of St. Petersburg, Moscow, Kharkov, Minsk because of Peter, -1999.-672s.
Zubkov On . The . Assembler, DOS, Windows and Unix.- M :. DMK , 1999.-640 with .
Glushkov VN Fundamentals of Paperless Informatics Univ. 2nd, rev. M: Science, 1987. 552s.
Figurnov VE "IBM PC for the user" M. M INFRA 1997. 475s.
Michael Hook "Processors Pentium II, Pentium Pro and the Pentium simply" St. Petersburg, Moscow, Kharkov, Minsk because of Peter, 1999. 283s.
Korneev VV, Kiselev AV Modern mikroprotsessory. M .: Penguin, 1998.-240s.
Dougal SI, Litvinov BY, Sbitnev AI, Personal Computer: Turbo Pascal V6.0,, Obektnoe programming, Local Area Networks.(Tutorial) .- Kiev: "Informsystema service" 1993. -440s. with silt.
Perminov ON Programming in Pascal. . -M: Radio and Communications, 1988, S. 219p Rybkin EN, Yudin A.Yu. .: Software for PC; Operating system MS_DOS, -M.Finansy and articles 112c-1991:.. Ill.
Faronov VV Delphi 3. Course. TH .: "Penguin", 1998. -400 p., Ill.
Faronov VV Delphi 4. Course. TH .: "Penguin", 1998. -464 p., Ill.
Price D. Programming in Pascal: A Practical Guide. Trans. from English. - M .: Mir. 1987, p.232.
Dzhordeyn R. IBM PC type personal computers Programmer's Reference, XT and AT: Per. with Eng. / Pre. NV Gayskogo.-M.: Finance and Statistics, 1992.
Markov AS, MP .. Milov, Peled GV .: computer software. kn.11, prospects of development of computer technology, in 11 books, Spr.posobie / Ed. YM Smirnova, MA: Vyssh.shk, 1990.-127s:.. Fig.
Officers DV, VA Old Programming in an integrated environment Turbo Pascal: Sprav.posobie.-Mn .: Belarus, 1992. 240c .: silt.
Alexander AD Delphi 4. Step into the future. M. "DMK", 1999.
B.Liskov, Dzh.Gager. The use of abstractions and specifications in the design program. M .: Mir, 1989
Aleksandovsky AD Programming Technology. Rybinsk, Framework, 1999.
K.Zigler. Methods of designing software systems. Moscow: Mir, 1985
R.Kouts, I.Vleymink. "Human-computer" interface. Moscow: Mir, 1990
E. Jordan. Structural design and construction programm.- M .: Mir, 1979.
Theory and practice of structural /R.Linger programming H. Mills, B. Witt, M., Mir, 1982.
Technological complex production programs to the EU machines and computer BESM-6 / IV Velbitsky, VN Khodakovsky, L.I.Sholmov. -M., Statistics, 1980.
King D. Creating an effective software: Per. from English. - M., Mir, 1991.
Koshelev SA Programming without programming. Using the utility Disiner Clarion package for software development. - M .: Radio and Communications, 1992.
GA Bugrimenko. Avtolisp - language graphic designing in AutoCAD. - M. Engineering 1992.
Bratko I. Prolog Programming for Artificial Intelligence .: Trans. from English. -M., Mir, 1990.
Van Tassel Style DI, development, efficiency, ootladka and testing programs. Trans. from English. - M .: Mir, 1981.
Parallel processing systems. Trans. from English. / Ed. D. Evans. - M .: Mir, 1985. - 412 p.
Automata control asynchronous processes in computer and digital systems / Ed. prof. IN AND. Warsaw. - M .: Science, Ch. Ed.FML, 1986. - 400 p.
J. Peterson. The theory of Petri nets and modeling systems. - M ,: Mir, 1984. -264 p. Minsk M. Calculations and machines. - M .: Mir, 1971. - 368 p.
VE Kotov Petri nets. - M .: Science, Ch. Ed. FML, 1984. -160 p.
APPENDIX A: $R *.dfm
Unit 6 - the main editing window:
unit Unit6;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DBCtrls, Grids, DBGrids, ExtCtrls, StdCtrls;
type
TForm6 = class(TForm)
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
Panel5: TPanel;
Panel6: TPanel;
Panel7: TPanel;
Panel9: TPanel;
Panel10: TPanel;
Panel11: TPanel;
Panel1: TPanel;
Panel8: TPanel;
Panel12: TPanel;
Panel13: TPanel;
DBGrid1: TDBGrid;
DBGrid3: TDBGrid;
DBGrid2: TDBGrid;
DBGrid4: TDBGrid;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Button12: TButton;
Button7: TButton;
Button9: TButton;
Button10: TButton;
Button11: TButton;
Button13: TButton;
Button20: TButton;
Button22: TButton;
Button23: TButton;
Button24: TButton;
Button25: TButton;
Button14: TButton;
Button16: TButton;
Button17: TButton;
Button18: TButton;
Button19: TButton;
Button1: TButton;
Button8: TButton;
Button15: TButton;
procedure DBGrid1Exit(Sender: TObject);
procedure DBGrid2Exit(Sender: TObject);
procedure DBGrid3Exit(Sender: TObject);
procedure DBGrid4Exit(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button12Click(Sender: TObject);
procedure Button19Click(Sender: TObject);
procedure Button18Click(Sender: TObject);
procedure Button17Click(Sender: TObject);
procedure Button16Click(Sender: TObject);
procedure Button14Click(Sender: TObject);
procedure Button15Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button25Click(Sender: TObject);
procedure Button24Click(Sender: TObject);
procedure Button23Click(Sender: TObject);
procedure Button22Click(Sender: TObject);
procedure Button20Click(Sender: TObject);
procedure Button13Click(Sender: TObject);
procedure Button11Click(Sender: TObject);
procedure Button10Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
// procedure Button1Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
private
c:boolean;
{ Private declarations }
public
{ Public declarations }
end;
var
Form6: TForm6;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm6.DBGrid1Exit(Sender: TObject);
begin
try
if datamodule2.ADOTable1.Modified then
datamodule2.ADOTable1.Post;
except
end;
end;
procedure TForm6.DBGrid2Exit(Sender: TObject);
begin
if datamodule2.ADOTable2.Modified then
datamodule2.ADOTable2.Post;
end;
procedure TForm6.DBGrid3Exit(Sender: TObject);
begin
try
if datamodule2.ADOTable3.Modified then
datamodule2.ADOTable3.Post;
except
datamodule2.ADOTable3.CancelUpdates;
datamodule2.ADOTable3.Cancel;
end;
end;
procedure TForm6.DBGrid4Exit(Sender: TObject);
begin
try
if datamodule2.ParazitTable4.Modified then
datamodule2.ParazitTable4.Post;
except
datamodule2.ParazitTable4.CancelUpdates;
datamodule2.ParazitTable4.Cancel;
end;
end;
procedure TForm6.Button1Click(Sender: TObject);
begin
datamodule2.ADOTable2.CancelUpdates;
datamodule2.ADOTable2.Cancel;
end;
procedure TForm6.Button2Click(Sender: TObject);
begin
try
datamodule2.ParasitesTable4.Append;
except
end;
end;
procedure TForm6.Button3Click(Sender: TObject);
begin
try
datamodule2.ParasiteTable4.Edit;
except
end;
end;
procedure TForm6.Button4Click(Sender: TObject);
begin
try
datamodule2.ParasiteTable4.Delete;
except
end;
end;
procedure TForm6.Button5Click(Sender: TObject);
begin
try
if datamodule2.ParazitTable4.Modified then
datamodule2.ParasitesTable4.Post;
except
end;
end;
procedure TForm6.Button6Click(Sender: TObject);
begin
try
datamodule2.ParazitTable4.Refresh;
except
end;
end;
procedure TForm6.Button12Click(Sender: TObject);
begin
datamodule2.ParazitiTable5.CancelUpdates;
datamodule2.ParazitiTable5.Cancel;
end;
procedure TForm6.Button19Click(Sender: TObject);
begin
try
datamodule2.adotable3.Append;
except
end;
end;
procedure TForm6.Button18Click(Sender: TObject);
begin
try
datamodule2.adotable3.Edit;
except
end;
end;
procedure TForm6.Button17Click(Sender: TObject);
begin
try
datamodule2.adotable3.Delete ;
except
end;
end;
procedure TForm6.Button16Click(Sender: TObject);
begin
try
if datamodule2.ParazitTable4.Modified then
datamodule2.adotable3.Post;
except
end;
end;
procedure TForm6.Button14Click(Sender: TObject);
begin
try
datamodule2.adotable3.Refresh;
except
end;
end;
procedure TForm6.Button15Click(Sender: TObject);
begin
datamodule2.adotable3.CancelUpdates;
datamodule2.adotable3.Cancel;
end;
procedure TForm6.FormCreate(Sender: TObject);
begin
c:=false;
end;
procedure TForm6.Button25Click(Sender: TObject);
begin
try
datamodule2.adotable2.Append;
except
end;
end;
procedure TForm6.Button24Click(Sender: TObject);
begin
try
datamodule2.adotable2.Edit;
except
end;
end;
procedure TForm6.Button23Click(Sender: TObject);
begin
try
datamodule2.adotable2.Delete;
except
end;
end;
procedure TForm6.Button22Click(Sender: TObject);
begin
try
if datamodule2.adotable2.Modified then
datamodule2.adotable2.Post;
except
end;
end;
procedure TForm6.Button20Click(Sender: TObject);
begin
try
datamodule2.adotable2.Refresh;
except
end;
end;
procedure TForm6.Button13Click(Sender: TObject);
begin
try
datamodule2.adotable1.Append;
except
end;
end;
procedure TForm6.Button11Click(Sender: TObject);
begin
try
datamodule2.adotable1.Edit;
except
end;
end;
procedure TForm6.Button10Click(Sender: TObject);
begin
try
datamodule2.adotable1.Delete;
except
end;
end;
procedure TForm6.Button9Click(Sender: TObject);
begin
try
if datamodule2.adotable2.Modified then
datamodule2.adotable2.Post;
except
end;
end;
procedure TForm6.Button7Click(Sender: TObject);
begin
try
datamodule2.adotable2.Refresh;
except
end;
end;
procedure TForm6.Button8Click(Sender: TObject);
begin
datamodule2.ADOTable1.CancelUpdates;
datamodule2.ADOTable1.Cancel;
end;
end.
Unit 5 - is responsible for editing the animal species:
unit Unit5;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, Grids, DBGrids, ExtCtrls, DBCtrls, ADODB;
type
TForm5 = class(TForm)
ADOTable1: TADOTable;
DataSource1: TDataSource;
DBNavigator1: TDBNavigator;
DBGrid1: TDBGrid;
ADOTable1key: TAutoIncField;
ADOTable1DSDesigner: TWideStringField;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form5: TForm5;
implementation
uses Unit2;
{$R *.dfm}
end.
Unit 4- responsible for editing the species of parasites:
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, DBCtrls, DB, Grids, DBGrids, ADODB;
type
TForm4 = class(TForm)
ADOTable1: TADOTable;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
ADOTable1keyparazit: TAutoIncField;
ADOTable1DSDesigner: TWideStringField;
DBNavigator1: TDBNavigator;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
uses Unit2;
{$R *.dfm}
end.
APPENDIX B: $R *.dfm
Unit 1- the main module of the program:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, StdCtrls, DBCtrls, ExtCtrls, Menus, OleServer,
ExcelXP, Mask, Buttons,ComObj;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
Panel1: TPanel;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
DBLookupComboBox3: TDBLookupComboBox;
Button2: TButton;
DBGrid1: TDBGrid;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit4: TEdit;
Edit5: TEdit;
Label4: TLabel;
DBLookupComboBox2: TDBLookupComboBox;
Button3: TButton;
Edit6: TEdit;
Edit7: TEdit;
Edit8: TEdit;
Label5: TLabel;
Label7: TLabel;
Edit9: TEdit;
Label8: TLabel;
BitBtn1: TBitBtn;
N6: TMenuItem;
Edit10: TEdit;
Label9: TLabel;
Excel1: TMenuItem;
Edit11: TEdit;
Edit12: TEdit;
Edit13: TEdit;
Label6: TLabel;
procedure N3Click(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure Edit2Change(Sender: TObject);
procedure Edit3Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Edit4Change(Sender: TObject);
procedure Edit5Change(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Edit7Change(Sender: TObject);
procedure Edit6Change(Sender: TObject);
procedure Edit8Change(Sender: TObject);
procedure Edit9Change(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N6Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure zapros(Sender:TObject);
procedure Edit10Change(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Excel1Click(Sender: TObject);
procedure Edit11Change(Sender: TObject);
procedure Edit13Change(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
M1,mm1,c1,r1,t1, M2,mm2,c2,r2,t2,M3,mm3,c3,r3,t3:String;
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2, Unit3, Unit4, Unit5, Unit6;
{$R *.dfm}
procedure TForm1.zapros(Sender: TObject);
var
s1,s2,s3,s4:string;
begin
try
datamodule2.ADOQuery1.Active:=false;
datamodule2.ADOQuery1.sql.Clear;
datamodule2.ADOQuery1.sql.add('SELECT *');
datamodule2.ADOQuery1.sql.add
datamodule2.ADOQuery1.sql.add('where ( keyparazit=key11)and(keyokrug=key1)and(keyrayon=key) '+
'AND LIKE('''+edit10.Text+'%'') AND LIKE('''+edit1.Text+'%'') AND '+
LIKE('''+edit2.Text+'%'') AND LIKE('''+edit3.Text+'%'')');
if (dblookupcombobox3.KeyValue>=0)then
datamodule2.ADOQuery1.sql.add('and(Type='+inttostr(dblookupcombobox3.KeyValue)+')');
datamodule2.ADOQuery1.sql.add('and(LIKE''%'+edit13.Text+'%'')');
datamodule2.ADOQuery1.sql.add('and (Kolvo BETWEEN '+edit4.Text+' AND '+edit5.Text+')');
if (dblookupcombobox2.KeyValue>=0)then
datamodule2.ADOQuery1.sql.add('and(='+inttostr(dblookupcombobox2.KeyValue)+')');
datamodule2.ADOQuery1.sql.add('and (procent BETWEEN '+edit7.Text+' AND '+edit8.Text+')');
datamodule2.ADOQuery1.sql.add(' and (BETWEEN '+edit6.Text+' AND '+edit12.Text+')');
s2:=Copy(edit11.Text,0,3);
s1:=Copy(edit11.Text,4,3);
s3:= Copy(edit11.Text,7,4) ;
s4:=s1+s2+s3;
datamodule2.ADOQuery1.sql.add('and ([Date]<=#'+s4+'#)');
s2:=Copy(edit9.Text,0,3);
s1:=Copy(edit9.Text,4,3);
s3:= Copy(edit9.Text,7,4) ;
s4:=s1+s2+s3;
datamodule2.ADOQuery1.sql.add('and ([Date]>=#'+s4+'#) ');
datamodule2.ADOQuery1.sql.add('ORDER BY,Kolvo,Date;');
datamodule2.ADOQuery1.Active:=true;
except end;
end;
procedure TForm1.N3Click(Sender: TObject);
begin
form6.ShowModal;
end;
procedure TForm1.Edit1Change(Sender: TObject);
begin
Form1.request(Sender);
end;
procedure TForm1.Edit2Change(Sender: TObject);
begin
Form1.request(Sender);
end;
procedure TForm1.Edit3Change(Sender: TObject);
begin
Form1.request(Sender);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Form1.zapros(Sender);
end;
procedure TForm1.Edit4Change(Sender: TObject);
begin
Form1.zapros(Sender);
end;
procedure TForm1.Edit5Change(Sender: TObject);
begin
Form1.zapros(Sender);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Form1.zapros(Sender);
end;
procedure TForm1.Edit7Change(Sender: TObject);
begin
Form1.zapros(Sender);
end;
procedure TForm1.Edit6Change(Sender: TObject);
begin
Form1.zapros(Sender);
end;
procedure TForm1.Edit8Change(Sender: TObject);
begin
Form1.request(Sender);
end;
procedure TForm1.Edit9Change(Sender: TObject);
begin
Form1.request(Sender);
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
DBLookupComboBox3.KeyValue:=-1;
DBLookupComboBox2.KeyValue:=-1;
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
edit4.Text:='0';
edit5.Text:='100';
edit6.Text:='0';
edit7.Text:='0';
edit8.Text:='100';
edit9.Text:='01/01/1924';
edit11.Text:='01/01/2030';
Form1.request(Sender);
end;
procedure TForm1.N4Click(Sender: TObject);
begin
form4.ShowModal;
end;
procedure TForm1.N5Click(Sender: TObject);
begin
form5.ShowModal;
end;
procedure TForm1.N6Click(Sender: TObject);
begin
Form1.Close;
end;
procedure TForm1.Button4Click(Sender: TObject);
var i,j:integer;
z,c,ev1,ev2,r,m,t:real;
begin
z:=0; j:=0;
ev1:=0; r:=0; m:=0;
datamodule2.ADOQuery1.First;
for i:=1 to datamodule2.ADOQuery1.RecordCount do
begin
inc(j);
z:=z+ datamodule2.ADOQuery1Kolvo.AsVariant;
ev1:= ev1+sqr(datamodule2.ADOQuery1Kolvo.AsVariant);
datamodule2.ADOQuery1.Next;
end;
ev2:=sqr(z);
z:=z/j; M1:=Format('%8.0f',[z]);
c:=ev1-(ev2/j); c1:=Format('%8.1f',[c]);
r:=sqrt(c/(j-1)); r1:=Format('%8.2f',[r]);
m:=r/sqrt(j-1); mm1:=Format('%8.1f',[m]);
t:=z/m;t1:=Format('%8.1f',[t]);
//memo1.Lines.Add('M = '+M1+' C = '+c1+' r = '+r1+' m = '+mm1+' t = '+t1);
z:=0; j:=0;
ev1:=0; r:=0; m:=0;
datamodule2.ADOQuery1.First;
for i:=1 to datamodule2.ADOQuery1.RecordCount do
begin
inc(j);
z:=z+ datamodule2.ADOQuery1DSDesigner8.AsVariant;
ev1:= ev1+sqr(datamodule2.ADOQuery1DSDesigner8.AsVariant);
datamodule2.ADOQuery1.Next;
end;
ev2:=sqr(z);
z:=z/j; M2:=Format('%8.0f',[z]);
c:=ev1-(ev2/j); c2:=Format('%8.1f',[c]);
r:=sqrt(c/(j-1)); r2:=Format('%8.2f',[r]);
m:=r/sqrt(j-1); mm2:=Format('%8.1f',[m]);
t:=z/m;t2:=Format('%8.1f',[t]);
//memo1.Lines.Add('M = '+M2+' C = '+c2+' r = '+r2+' m = '+mm2+' t = '+t2);
z:=0; j:=0;
ev1:=0; r:=0; m:=0;
datamodule2.ADOQuery1.First;
for i:=1 to datamodule2.ADOQuery1.RecordCount do
begin
inc(j);
z:=z+ datamodule2.ADOQuery1percent.AsVariant;
ev1:= ev1+sqr(datamodule2.ADOQuery1procent.AsVariant);
datamodule2.ADOQuery1.Next;
end;
ev2:=sqr(z);
z:=z/j; M3:=Format('%8.0f',[z]);
c:=ev1-(ev2/j); c3:=Format('%8.1f',[c]);
r:=sqrt(c/(j-1)); r3:=Format('%8.2f',[r]);
m:=r/sqrt(j-1); mm3:=Format('%8.1f',[m]);
t:=z/m;t3:=Format('%8.1f',[t]);
//memo1.Lines.Add('M = '+M3+' C = '+c3+' r = '+r3+' m = '+mm3+' t = '+t3);
end;
procedure TForm1.Edit10Change(Sender: TObject);
begin
Form1.request(Sender);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Form1.request(Sender);
end;
procedure TForm1.Excel1Click(Sender: TObject);
const
xlWBATWorksheet = -4167;
xlContinuous = 1;
var
XLApp: Variant;
XLWorkbook: Variant;
XLSheet: Variant;
XLArrayData : OLEVariant;
XLCellBegin: Variant;
XLCellEnd: Variant;
XLRange: Variant;
iColumnsCount: Integer;
iRowsCount: Integer;
i: Integer;
j: Integer;
z,c,ev1,ev2,r,m,t:real;
begin
try
XLApp := CreateOleObject('Excel.Application');
XLApp.Application.EnableEvents := False; except
Application.MessageBox('MS Office Excel.', PChar(Self.Caption), MB_OK + MB_ICONERROR);
Exit;
end;
try
XLApp.DisplayAlerts := False;
Screen.Cursor := crHourGlass;
try
XLWorkbook := XLApp.Workbooks.Add(xlWBATWorkSheet);
XLSheet := XLWorkbook.Sheets[1];
iRowsCount := datamodule2.ADOQuery1.RecordCount +1; iColumnsCount:= 11;
XLArrayData := VarArrayCreate([1, iRowsCount+7, 1, iColumnsCount], varVariant);
XLArrayData[1, 1] := ;
XLArrayData[1, 2] := ;
XLArrayData[1, 3] := ';
XLArrayData[1, 4] := ;
XLArrayData[1, 5] :=;
XLArrayData[1, 6] :=;
XLArrayData[1, 7] :=;
XLArrayData[1, 8] :=;
XLArrayData[1, 9] :=;
XLArrayData[1, 10] :=';
XLArrayData[1, 11] :=;
datamodule2.ADOQuery1.First;
for i:=1 to iRowsCount-1 do
begin
XLArrayData[i+1, 1] := datamodule2.ADOQuery1.FieldByName().AsString;
XLArrayData[i+1, 2] := datamodule2.ADOQuery1.FieldByName().AsString;
XLArrayData[i+1, 3] := datamodule2.ADOQuery1.FieldByName().AsString;
XLArrayData[i+1, 4] := datamodule2.ADOQuery1.FieldByName().AsString;
XLArrayData[i+1, 5] := datamodule2.ADOQuery1.FieldByName().AsString;
XLArrayData[i+1, 6] := datamodule2.ADOQuery1.FieldByName().AsString;
XLArrayData[i+1,7]:= datamodule2.ADOQuery1.FieldByName().AsString;
XLArrayData[i+1,8]:=d atamodule2.ADOQuery1.FieldByName().AsString;
XLArrayData[i+1,9]:= datamodule2.ADOQuery1.FieldByName().AsString;
XLArrayData[i+1,10]:= datamodule2.ADOQuery1.FieldByName('procent').AsString;
XLArrayData[i+1,11]:= datamodule2.ADOQuery1.FieldByName('Date').AsString
datamodule2.ADOQuery1.Next;
end;
z:=0; j:=0;
ev1:=0; r:=0; m:=0;
try
datamodule2.ADOQuery1.First;
for i:=1 to datamodule2.ADOQuery1.RecordCount do
begin
inc(j);
z:=z+ datamodule2.ADOQuery1DSDesigner8.AsVariant;
ev1:= ev1+sqr(datamodule2.ADOQuery1DSDesigner8.AsVariant);
datamodule2.ADOQuery1.Next;
end;
ev2:=sqr(z);
z:=z/j; M2:=Format('%8.0f',[z]);
c:=ev1-(ev2/j); c2:=Format('%8.1f',[c]);
r:=sqrt(c/(j-1)); r2:=Format('%8.2f',[r]);
m:=r/sqrt(j-1); mm2:=Format('%8.1f',[m]);
t:=z/m;t2:=Format('%8.1f',[t]);
//memo1.Lines.Add('M = '+M2+' C = '+c2+' r = '+r2+' m = '+mm2+' t = '+t2);
except
M2:='0';c2:='0';r2:='0';mm2:='0';t2:='0';
end;
z:=0; j:=0;
ev1:=0; r:=0; m:=0;
try
datamodule2.ADOQuery1.First;
for i:=1 to datamodule2.ADOQuery1.RecordCount do
begin
inc(j);
z:=z+ datamodule2.ADOQuery1procent.AsVariant;
ev1:= ev1+sqr(datamodule2.ADOQuery1procent.AsVariant);
datamodule2.ADOQuery1.Next;
end;
ev2:=sqr(z);
z:=z/j; M3:=Format('%8.0f',[z]);
c:=ev1-(ev2/j); c3:=Format('%8.1f',[c]);
r:=sqrt(c/(j-1)); r3:=Format('%8.2f',[r]);
m:=r/sqrt(j-1); mm3:=Format('%8.1f',[m]);
t:=z/m;t3:=Format('%8.1f',[t]);
except
M3:='0';c3:='0';r3:='0';mm3:='0';t3:='0';
end;
XLArrayData[iRowsCount+3, 7] :=;
XLArrayData[iRowsCount+4, 7] :='M±m:';
XLArrayData[iRowsCount+5, 7] := (r):';
XLArrayData[iRowsCount+6, 7] :=' (Cv):';
XLArrayData[iRowsCount+7, 7] :=;
XLArrayData[iRowsCount+4, 8] :=M2+'±'+mm2;
XLArrayData[iRowsCount+5, 8] :=r2;
XLArrayData[iRowsCount+6, 8] :=c2;
XLArrayData[iRowsCount+7, 8] :=t2;
XLArrayData[iRowsCount+3, 9] :='Ïî ÝÈ:';
XLArrayData[iRowsCount+4, 9] :='M±m:';
XLArrayData[iRowsCount+5, 9] := (r):;
XLArrayData[iRowsCount+6, 9] := (Cv):';
XLArrayData[iRowsCount+7, 9] :=' (t):';
XLArrayData[iRowsCount+4, 10] :=M3+'±'+mm3;
XLArrayData[iRowsCount+5, 10] :=r3;
XLArrayData[iRowsCount+6, 10] :=c3;
XLArrayData[iRowsCount+7, 10] :=t3;
XLCellBegin := XLSheet.Cells[1, 1];
XLCellEnd := XLSheet.Cells[iRowsCount+7, iColumnsCount];
XLRange := XLSheet.Range[XLCellBegin, XLCellEnd];
XLRange.NumberFormat := '@';
XLRange.Value := XLArrayData;
XLRange.Borders.LineStyle := xlContinuous;
XLSheet.Name := 'Customers';
XLSheet.Columns.Font.Bold := True;
XLSheet.Columns.ColumnWidth := 10;
XLSheet.Range['A1','K1'].Font.Color := clBlue;
XLSheet.Range['A1','K'+inttostr(iRowsCount+7)].Font.Size := 10;
XLSheet.Range['A1','K'+inttostr(iRowsCount+7)].Font.Name := 'Times New Roman';
XLSheet.Range['A1','K'+inttostr(iRowsCount+7)].HorizontalAlignment := xlHAlignLeft;
XLSheet.Range['A1','K'+inttostr(iRowsCount+7)].ColumnWidth := 31;
XLSheet.Columns.HorizontalAlignment := xlLeft;
for i:= 1 to iColumnsCount do
XLSheet.Columns[i].AutoFit;
XLApp.Visible := True;
finally
Self.Enabled:= True;
Screen.Cursor := crDefault;
XLApp.DisplayAlerts:= True;
VarClear(XLArrayData);
end;
except
XLApp.Quit;
Application.MessageBox(PChar('Excel.'), PChar(Self.Caption),\ MB_OK + MB_ICONERROR);
end;
end;
procedure TForm1.Edit11Change(Sender: TObject);
begin
Form1.request(Sender);
end;
procedure TForm1.Edit13Change(Sender: TObject);
begin
Form1.requestSender);
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
try
datamodule2.ADOConnection1.Connected:=true;
datamodule2.ADOTable1.Active:=true;
datamodule2.ADOTable2.Active:=true;
datamodule2.ADOTable3.Active:=true;
datamodule2.ADOTable4.Active:=true;
datamodule2.ADOTable5.Active:=true;
datamodule2.ADOTable6.Active:=true;
//datamodule2.ADOQuery1.a.Active:=true;
datamodule2.VidTable4.Active:=true;
datamodule2.VozrastTable4.Active:=true;
datamodule2.ParazitTable4.Active:=true;
datamodule2.ParazitiTable5.Active:=true;
form4.ADOTable1.Active:=true;
form5.ADOTable1.Active:=true;
except
close;
end;
DBLookupComboBox3.KeyValue:=-1;
DBLookupComboBox2.KeyValue:=-1;
//DBLookupComboBox1.KeyValue:=-1;
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
edit4.Text:='0';
edit5.Text:='100';
edit6.Text:='0';
edit12.Text:='100';
edit7.Text:='0';
edit8.Text:='100';
edit9.Text:='01/01/1924';
edit11.Text:='01/01/2030';
datamodule2.ADOQuery1.Active:=false;
datamodule2.ADOQuery1.sql.Clear;
datamodule2.ADOQuery1.sql.add('SELECT *');
datamodule2.ADOQuery1.sql.add('FROM);
datamodule2.ADOQuery1.sql.add('where (keyparazit=key11)and(keyokrug=key1)and(keyrayon=key)');
datamodule2.ADOQuery1.sql.add('ORDER');
datamodule2.ADOQuery1.Active:=true;
end;
end.
1
2
