Автор: Пользователь скрыл имя, 15 Апреля 2012 в 11:09, курсовая работа
В современных экономических условиях деятельность каждого хозяйствующего субъекта является предметом внимания обширного круга участников рыночных отношений, организаций и лиц, заинтересованных в результатах его функционирования. Для обеспечения его эффективного функционирования необходимо экономически грамотно управлять его деятельностью, а также уметь ее анализировать. Принятию всякого решения финансового характера предшествуют аналитические расчеты, поэтому важное значение придается качеству и своевременности таких расчетов.
tbNaim39id: TAutoIncField;
tbNaim39naim: TWideStringField;
tbNaim39kod: TIntegerField;
tbNaim39n: TBooleanField;
procedure qT32CalcFields(DataSet: TDataSet);
procedure tb37CalcFields(DataSet: TDataSet);
procedure tb38CalcFields(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
end;
var
DM: TDM;
implementation
{$R *.dfm}
procedure TDM.qT32CalcFields(DataSet: TDataSet);
begin
if not (qT32Vsego.AsInteger = 0) then
qT32prOplata.AsFloat
:= qT32oplata.AsFloat / qT32Vsego.AsFloat * 100;
if not (qT32Vsego.AsInteger = 0) then
qT32prSemena.AsFloat := qT32Semena.AsFloat / qT32Vsego.AsFloat* 100;
if not (qT32Vsego.AsInteger = 0) then
qT32prUdobr.AsFloat := qT32Udobr.AsFloat / qT32Vsego.AsFloat* 100;
if not (qT32Vsego.AsInteger = 0) then
qT32prOsVs.AsFloat := qT32OsVs.AsFloat / qT32Vsego.AsFloat* 100;
if not (qT32Vsego.AsInteger = 0) then
qT32prVsego.AsFloat := qT32Vsego.AsFloat * 100 / qT32Vsego.AsFloat;
end;
procedure TDM.tb37CalcFields(DataSet: TDataSet);
begin
if not (tb37kol.AsInteger=0) then
tb37s.AsFloat := tb37sebest.AsInteger / tb37kol.AsInteger;
if not (tb37kol.AsInteger=0) then
tb37v.AsFloat := tb37vir.AsInteger / tb37kol.AsInteger;
if not (tb37kol.AsInteger=0) then
tb37p.AsFloat := (tb37vir.AsInteger - tb37sebest.AsInteger) / tb37kol.AsInteger;
end;
procedure TDM.tb38CalcFields(DataSet: TDataSet);
begin
if not (tb38plPL.AsInteger=0) then
tb38s1ga.AsFloat := tb38valSbor.AsInteger / tb38plPL.AsInteger;
if not (tb38valSbor.AsInteger=0) then
tb38sebest.AsFloat := tb38zatr.AsInteger / tb38valSbor.AsInteger;
end;
end.
unit uAbout;
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, jpeg;
type
TAboutBox = class(TForm)
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
procedure OKButtonClick(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
AboutBox: TAboutBox;
implementation
{$R *.dfm}
procedure TAboutBox.OKButtonClick(
begin
close;
end;
procedure TAboutBox.Button1Click(Sender: TObject);
begin
close;
end;
end.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExcelXP, Comobj, ExtCtrls, ShellApi, Buttons, jpeg,
Menus, DB ;
type
TfmMain = class(TForm)
MainMenu1: TMainMenu;
N91: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N1: TMenuItem;
N7: TMenuItem;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure N8Click(Sender: TObject);
procedure N9Click(Sender: TObject);
procedure N91Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N7Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fmMain: TfmMain;
excel, list, list1 : OleVariant;
implementation
uses uAbout, uDM, Unit11, Unit7, Unit8;
{$R *.dfm}
procedure TfmMain.Button1Click(Sender: TObject);
begin
//Form1.Show;
//ShellExecute(handle,'open','
end;
procedure TfmMain.Button2Click(Sender: TObject);
begin
//ShellExecute(handle,'open','
end;
procedure TfmMain.Button3Click(Sender: TObject);
begin
ShellExecute(handle,'open','
end;
procedure TfmMain.N2Click(Sender: TObject);
begin
close;
end;
procedure TfmMain.N3Click(Sender: TObject);
begin
ShellExecute(Application.
pchar('ruk.doc'),nil,
pchar(''),SW_SHOWNORMAL);
end;
procedure TfmMain.N4Click(Sender: TObject);
begin
AboutBox.Show;
end;
procedure TfmMain.N8Click(Sender: TObject);
var s, m: string;
i: integer;
begin
for i := 1 to dm.qt33.RecordCount do
begin
dm.qT331.Edit;
dm.qT331S1ga.AsString := '';
// dm.qT331EdP.AsString := '';
// dm.qT331znaed.AsString := '';
dm.qt331.Post;
dm.qt331.Next;
end;
dm.qt33.First;
dm.qT331.First;
for i := 1 to dm.qT331.RecordCount do
begin
s := inttostr(dm.qT331Kod.AsInteger - 1);
dm.tbTm32.Locate('kod',s,[
dm.qT331.Edit;
if not (dm.tbTm32plUb.AsInteger = 0) then
dm.qT331S1ga.AsFloat := dm.qT331VsegoC.AsInteger / (dm.tbTm32plUb.AsInteger);
dm.qT331.Post;
dm.qT331.Next;
end;
DM.tbTm32.Active := false;
DM.tbTm32.Active := True;
DM.qt32summ.Active := false;
DM.qt32summ.Active := True;
dm.qT32.Active := false;
dm.qT32.Active := True;
dm.qT33.Active := false;
dm.qT33.Active := True;
dm.qT331.Active := false;
dm.qT331.Active := True;
dm.tbPRSum.Active := false;
dm.tbPRSum.Active := True;
dm.qT331.Refresh;
//fman1.Show;
end;
procedure TfmMain.N9Click(Sender: TObject);
var s, m: string;
i: integer;
begin
for i := 1 to dm.qt33.RecordCount do
begin
dm.qT331.Edit;
dm.qT331S1ga.AsString := '';
// dm.qT331EdP.AsString := '';
// dm.qT331znaed.AsString := '';
dm.qt331.Post;
dm.qt331.Next;
end;
dm.qt33.First;
dm.qT331.First;
for i := 1 to dm.qT331.RecordCount do
begin
s := inttostr(dm.qT331Kod.AsInteger - 1);
dm.tbTm32.Locate('kod',s,[
dm.qT331.Edit;
if not (dm.tbTm32plUb.AsInteger = 0) then
dm.qT331S1ga.AsFloat := dm.qT331VsegoC.AsInteger / (dm.tbTm32plUb.AsInteger);
dm.qT331.Post;
dm.qT331.Next;
end;
DM.tbTm32.Active := false;
DM.tbTm32.Active := True;
DM.qt32summ.Active := false;
DM.qt32summ.Active
:= True;
dm.qT32.Active := false;
dm.qT32.Active := True;
dm.qT33.Active := false;
dm.qT33.Active
:= True;
dm.qT331.Active := false;
dm.qT331.Active := True;
dm.tbPRSum.Active := false;
dm.tbPRSum.Active := True;
dm.qT331.Refresh;
//fman2.Show;
end;
procedure TfmMain.N91Click(Sender: TObject);
begin
fm38.Show;
end;
procedure TfmMain.N1Click(Sender: TObject);
begin
fm37.Show;
end;
procedure TfmMain.N7Click(Sender: TObject);
begin
fm39.show;
end;
end.
unit Unit11;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Series, TeEngine, BubbleCh, ExtCtrls, TeeProcs, Chart, DbChart,
StdCtrls, Mask, DBCtrlsEh, DBLookupEh, Buttons, Grids, DBGridEh, ComCtrls,
Spin, ComObj;
type
Tfm38 = class(TForm)
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
BitBtn2: TBitBtn;
BitBtn1: TBitBtn;
BitBtn3: TBitBtn;
DBGridEh1: TDBGridEh;
Label1: TLabel;
DBLookupComboboxEh1: TDBLookupComboboxEh;
Button9: TButton;
Button10: TButton;
Panel1: TPanel;
SpinEdit1: TSpinEdit;
Button11: TButton;
Button12: TButton;
Panel2: TPanel;
DBLookupComboboxEh2: TDBLookupComboboxEh;
Button13: TButton;
Button14: TButton;
Button1: TButton;
DBGridEh2: TDBGridEh;
procedure BitBtn1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure DBLookupComboboxEh1Change(
procedure BitBtn3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fm38: Tfm38;
implementation
uses uAbout, uDM, Unit2, Unit7, Unit8;
{$R *.dfm}
procedure Tfm38.BitBtn1Click(Sender: TObject);
var i: integer;
l1: OleVariant;
begin
excel:=CreateOleObject('Excel.
excel.WorkBooks.Open(
l1:=excel.Worksheets['38'];
dm.tb38.First;
for i := 4 to DM.tb38.RecordCount + 3 do
begin
l1.Cells[i,1].value := dm.tb38naim.AsString;
l1.Cells[i,2].value := dm.tb38kod.AsInteger;
l1.Cells[i,3].value := dm.tb38posnov.AsFloat;
l1.Cells[i,4].value := dm.tb38plVS.AsFloat;
l1.Cells[i,5].value := dm.tb38plPL.AsFloat;
l1.Cells[i,6].value := dm.tb38sbor.AsFloat;
l1.Cells[i,7].value := dm.tb38valSbor.AsFloat;
l1.Cells[i,8].value := dm.tb38s1ga.AsFloat;
l1.Cells[i,9].value := dm.tb38zatr.AsFloat;
l1.Cells[i,10].value := dm.tb38sebest.AsFloat;