Автор: Пользователь скрыл имя, 07 Октября 2011 в 15:38, курсовая работа
Целью курсовой работы является автоматизация учета материалов на предприятии.
Главными задачами курсовой работы являются:
1. рассмотреть понятие материально- производственных запасов на предприятии;
2. изучить возможности языка высокого уровня применительно к разработке приложений, работающих с БД.
3. разработать приложение, с помощью которого будет производиться автоматизация работы главного бухгалтера.
4. рассмотреть бухгалтерский учет прихода, движения и списания материалов на предприятии;
Введение..................................................................................................................4
1. Теоретические основы учета материалов на предприятии
1.1 Основные понятия АСУ...................................................................................5
1.2 Понятие МПЗ и их оценка................................................................................6
1.3Выбор языка программирования....................................................................12
2. Разработка приложения
2.1 Создание БД.....................................................................................................16
2.2 Руководство пользователя..............................................................................20
Заключение..........................................................................................................23
Список используемой литературы.................................................................24
Приложение........................................................................................................
end;
end.
unit ufmMatVed;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, RpBase, RpSystem, RpDefine, RpRave, StdCtrls, Buttons, ComCtrls,
RpCon, RpConDS;
type
TfmMatVed = class(TForm)
RvProject: TRvProject;
RvSystem: TRvSystem;
bbtnStart: TBitBtn;
dtpBegin: TDateTimePicker;
dtpEnd: TDateTimePicker;
Label1: TLabel;
Label2: TLabel;
RvDataSetConnection: TRvDataSetConnection;
procedure bbtnStartClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fmMatVed: TfmMatVed;
implementation
uses
udmMain;
{$R *.dfm}
procedure TfmMatVed.bbtnStartClick(
var
DBegin, DEnd : TDateTime;
Year, Month, Day: Word;
begin
with dmMain do
begin
DecodeDate(dtpBegin.DateTime, Year, Month, Day);
DBegin :=
EncodeDate(Year, Month, Day);
DecodeDate(dtpEnd.DateTime, Year, Month, Day);
DEnd :=
EncodeDate(Year, Month, Day) + EncodeTime(23, 59, 59, 999);
adospMatVed.Parameters.
adospMatVed.Parameters.
adospMatVed.Open;
RvProject.Open;
RvProject.SelectReport('
RvProject.Execute;
RvProject.Close;
adospMatVed.Close;
end;
end;
procedure TfmMatVed.FormCreate(Sender: TObject);
begin
RvProject.ProjectFile := ChangeFileExt(ParamStr(0), '.rav');
dtpBegin.DateTime := Now;
dtpEnd.DateTime := dtpBegin.DateTime;
end;
end.
unit ufmNSI;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, DBCtrls,
Grids, DBGrids, StdCtrls, Buttons, ActnList;
type
TfmNSI = class(TForm)
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
ActionList1: TActionList;
ActionOK: TAction;
ActionSave: TAction;
ActionClose: TAction;
procedure ActionOKExecute(Sender: TObject);
procedure ActionSaveExecute(Sender: TObject);
procedure ActionCloseExecute(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
procedure ShowNSIForm(TableName,
FormName: string);
var
fmNSI: TfmNSI;
implementation
uses
DB, udmMain;
{$R *.dfm}
procedure ShowNSIForm(TableName, FormName: string);
begin
with dmMain do
begin
adotNSI.TableName := TableName;
adotNSI.Open;
fmNSI := TfmNSI.Create(Application);
fmNSI.Caption := FormName;
fmNSI.ShowModal;
fmNSI.Free;
adotNSI.Close;
end;
end;
procedure TfmNSI.ActionCloseExecute(
begin
with dmMain do
if adotNSI.State in [dsInsert, dsEdit] then
if MessageDlg('Справочник изменен. Записать?',
mtConfirmation, mbYesNo, -1) = mrYes then
adotNSI.Post
else
adotNSI.Cancel;
Close;
end;
procedure TfmNSI.ActionOKExecute(Sender: TObject);
begin
ActionSaveExecute(Sender);
Close;
end;
procedure TfmNSI.ActionSaveExecute(
begin
with dmMain do
begin
if adotNSI.State in [dsInsert, dsEdit] then
adotNSI.Post;
end;
end;
end.
unit ufmPrihod;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask, DBCtrls, Buttons, Grids, DBGrids, ExtCtrls, ActnList,
ComCtrls;
type
TfmPrihod = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
DBEdit1: TDBEdit;
DBLookupComboBox1: TDBLookupComboBox;
BitBtn1: TBitBtn;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
BitBtn3: TBitBtn;
ActionList1: TActionList;
ActionOK: TAction;
ActionSave: TAction;
ActionClose: TAction;
dtpDate: TDateTimePicker;
BitBtn2: TBitBtn;
procedure ActionSaveExecute(Sender: TObject);
procedure ActionCloseExecute(Sender: TObject);
procedure ActionOKExecute(Sender: TObject);
procedure dtpDateChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fmPrihod: TfmPrihod;
implementation
uses
DB, udmMain;
{$R *.dfm}
procedure TfmPrihod.ActionCloseExecute(
begin
Close;
end;
procedure TfmPrihod.ActionOKExecute(
begin
ActionSaveExecute(Sender);
Close;
end;
procedure TfmPrihod.ActionSaveExecute(
begin
with dmMain do
begin
if adotDocPrihod.State in [dsInsert, dsEdit] then
adotDocPrihod.Post;
if adotTabPrihod.State in [dsInsert, dsEdit] then
adotTabPrihod.Post;
end;
end;
procedure TfmPrihod.dtpDateChange(
begin
with dmMain do
begin
if not (adotDocPrihod.State in [dsInsert, dsEdit]) then
adotDocPrihod.Edit;
adotDocPrihod.FieldByName('
end;
end;
procedure TfmPrihod.FormClose(Sender: TObject; var Action: TCloseAction);
var
SaveDoc, SaveTab: Boolean;
begin
with dmMain do
begin
SaveDoc := adotDocPrihod.State in [dsInsert, dsEdit];
SaveTab
:= adotTabPrihod.State in [dsInsert, dsEdit];
if SaveDoc or SaveTab then
if MessageDlg('Документ изменен. Записать?',
mtConfirmation, mbYesNo, -1) = mrYes then
begin
if SaveDoc then
adotDocPrihod.Post;
if SaveTab then
adotTabPrihod.Post;
end else begin
if SaveDoc then
adotDocPrihod.Cancel;
if SaveTab then
adotTabPrihod.Cancel;
end;
end;
end;
procedure TfmPrihod.FormCreate(Sender: TObject);
begin
with dmMain do
case adotDocPrihod.State of
dsInsert:
begin
dtpDate.DateTime := Now;
adotDocPrihod.FieldByName('
adotDocPrihod.Post;
end;
dsEdit:
dtpDate.DateTime := adotDocPrihod.FieldByName('
else
if adotDocPrihod.FieldByName('
begin
dtpDate.DateTime := Now;
adotDocPrihod.Insert;
adotDocPrihod.FieldByName('
adotDocPrihod.Post;
end else
dtpDate.DateTime := adotDocPrihod.FieldByName('
end;
end;
end.
unit ufmSpisanie;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask, DBCtrls, ComCtrls, Grids, DBGrids, ActnList, Buttons,
ExtCtrls;
type
TfmSpisanie = class(TForm)
Label1: TLabel;
DBEdit1: TDBEdit;
Label2: TLabel;
dtpDate: TDateTimePicker;
DBLookupComboBox1: TDBLookupComboBox;
Label3: TLabel;
DBLookupComboBox2: TDBLookupComboBox;
Label4: TLabel;
DBLookupComboBox3: TDBLookupComboBox;
DBLookupComboBox4: TDBLookupComboBox;
Label5: TLabel;
Label6: TLabel;
DBGrid1: TDBGrid;
ActionList1: TActionList;
ActionOK: TAction;
ActionSave: TAction;
ActionClose: TAction;
DBNavigator1: TDBNavigator;
BitBtn1: TBitBtn;
BitBtn3: TBitBtn;
BitBtn2: TBitBtn;
procedure ActionOKExecute(Sender: TObject);
procedure ActionSaveExecute(Sender: TObject);
procedure ActionCloseExecute(Sender: TObject);
procedure dtpDateChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Информация о работе Автоматизация учета материалов на предприятии