472 lines
14 KiB
ObjectPascal
472 lines
14 KiB
ObjectPascal
![]() |
unit U_Bpkcsumlist;
|
|||
|
|
|||
|
interface
|
|||
|
|
|||
|
uses
|
|||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|||
|
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
|||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
|||
|
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
|||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
|||
|
cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, cxCheckBox,
|
|||
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxSplitter, cxCalendar;
|
|||
|
|
|||
|
type
|
|||
|
TfrmBpkcsumlist = class(TForm)
|
|||
|
ToolBar1: TToolBar;
|
|||
|
TBRafresh: TToolButton;
|
|||
|
TBExport: TToolButton;
|
|||
|
TBPrint: TToolButton;
|
|||
|
TBClose: TToolButton;
|
|||
|
Panel1: TPanel;
|
|||
|
Label1: TLabel;
|
|||
|
BegDate: TDateTimePicker;
|
|||
|
EndDate: TDateTimePicker;
|
|||
|
cxGrid1: TcxGrid;
|
|||
|
Tv1: TcxGridDBTableView;
|
|||
|
v1P_CodeName: TcxGridDBColumn;
|
|||
|
v1P_SPEC: TcxGridDBColumn;
|
|||
|
v1RollNum: TcxGridDBColumn;
|
|||
|
v1Qty: TcxGridDBColumn;
|
|||
|
v1QtyUnit: TcxGridDBColumn;
|
|||
|
cxGrid1Level1: TcxGridLevel;
|
|||
|
Label2: TLabel;
|
|||
|
Label3: TLabel;
|
|||
|
P_Code: TEdit;
|
|||
|
CRType: TComboBox;
|
|||
|
Label5: TLabel;
|
|||
|
ADOQueryCmd: TADOQuery;
|
|||
|
ADOQueryTmp: TADOQuery;
|
|||
|
DataSource1: TDataSource;
|
|||
|
CDS_Main: TClientDataSet;
|
|||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
|||
|
TOk: TToolButton;
|
|||
|
v1Ssel: TcxGridDBColumn;
|
|||
|
CheckBox1: TCheckBox;
|
|||
|
ckName: TComboBox;
|
|||
|
Label6: TLabel;
|
|||
|
v1Column1: TcxGridDBColumn;
|
|||
|
v1P_Code: TcxGridDBColumn;
|
|||
|
kuwei: TEdit;
|
|||
|
Label8: TLabel;
|
|||
|
v1Column3: TcxGridDBColumn;
|
|||
|
v1Column4: TcxGridDBColumn;
|
|||
|
v1Column5: TcxGridDBColumn;
|
|||
|
v1Column6: TcxGridDBColumn;
|
|||
|
Label9: TLabel;
|
|||
|
Edit1: TEdit;
|
|||
|
Label10: TLabel;
|
|||
|
v1factoryName: TcxGridDBColumn;
|
|||
|
CheckBox2: TCheckBox;
|
|||
|
v1kuwei: TcxGridDBColumn;
|
|||
|
ToolButton1: TToolButton;
|
|||
|
P_Color: TEdit;
|
|||
|
Label11: TLabel;
|
|||
|
cxSplitter1: TcxSplitter;
|
|||
|
cxGrid2: TcxGrid;
|
|||
|
TV2: TcxGridDBTableView;
|
|||
|
v1INoutNo: TcxGridDBColumn;
|
|||
|
v1DefStr6: TcxGridDBColumn;
|
|||
|
v1CRTime: TcxGridDBColumn;
|
|||
|
v1CRType: TcxGridDBColumn;
|
|||
|
cxGridDBColumn1: TcxGridDBColumn;
|
|||
|
v1ywy: TcxGridDBColumn;
|
|||
|
cxGridDBColumn2: TcxGridDBColumn;
|
|||
|
v1CPType: TcxGridDBColumn;
|
|||
|
v1P_Color: TcxGridDBColumn;
|
|||
|
cxGridDBColumn6: TcxGridDBColumn;
|
|||
|
cxGridDBColumn7: TcxGridDBColumn;
|
|||
|
cxGridDBColumn8: TcxGridDBColumn;
|
|||
|
cxGridDBColumn9: TcxGridDBColumn;
|
|||
|
cxGridDBColumn10: TcxGridDBColumn;
|
|||
|
v1Note: TcxGridDBColumn;
|
|||
|
v1Filler: TcxGridDBColumn;
|
|||
|
v1FillTime: TcxGridDBColumn;
|
|||
|
cxGridLevel1: TcxGridLevel;
|
|||
|
ADOQuery1: TADOQuery;
|
|||
|
DataSource2: TDataSource;
|
|||
|
CDS_SUB: TClientDataSet;
|
|||
|
TV2Column1: TcxGridDBColumn;
|
|||
|
TV2Column2: TcxGridDBColumn;
|
|||
|
Tv1Column1: TcxGridDBColumn;
|
|||
|
Label4: TLabel;
|
|||
|
RKTYPE: TComboBox;
|
|||
|
ToolButton2: TToolButton;
|
|||
|
Panel5: TPanel;
|
|||
|
Button5: TButton;
|
|||
|
Button6: TButton;
|
|||
|
Label7: TLabel;
|
|||
|
Edit2: TEdit;
|
|||
|
ywy1: TLabel;
|
|||
|
ywy: TEdit;
|
|||
|
Label12: TLabel;
|
|||
|
factoryName: TEdit;
|
|||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|||
|
procedure FormDestroy(Sender: TObject);
|
|||
|
procedure P_CodeChange(Sender: TObject);
|
|||
|
procedure FormShow(Sender: TObject);
|
|||
|
procedure FormCreate(Sender: TObject);
|
|||
|
procedure TBCloseClick(Sender: TObject);
|
|||
|
procedure TBRafreshClick(Sender: TObject);
|
|||
|
procedure TBPrintClick(Sender: TObject);
|
|||
|
procedure TBExportClick(Sender: TObject);
|
|||
|
procedure TOkClick(Sender: TObject);
|
|||
|
procedure CheckBox1Click(Sender: TObject);
|
|||
|
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
|||
|
procedure CheckBox2Click(Sender: TObject);
|
|||
|
procedure ToolButton1Click(Sender: TObject);
|
|||
|
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
|||
|
procedure ToolButton2Click(Sender: TObject);
|
|||
|
procedure Button5Click(Sender: TObject);
|
|||
|
procedure Button6Click(Sender: TObject);
|
|||
|
private
|
|||
|
procedure InitGrid();
|
|||
|
procedure Initsub();
|
|||
|
procedure SetComboBox();
|
|||
|
{ Private declarations }
|
|||
|
public
|
|||
|
fType: integer;
|
|||
|
fCKName: string;
|
|||
|
canshu2: string;
|
|||
|
|
|||
|
{ Public declarations }
|
|||
|
end;
|
|||
|
|
|||
|
var
|
|||
|
frmBpkcsumlist: TfrmBpkcsumlist;
|
|||
|
|
|||
|
implementation
|
|||
|
|
|||
|
uses
|
|||
|
U_DataLink, U_Fun10, U_ZDYHelp, U_BpRk;
|
|||
|
{$R *.dfm}
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.SetComboBox();
|
|||
|
begin
|
|||
|
ckName.Items.Clear;
|
|||
|
with adoQueryTmp do
|
|||
|
begin
|
|||
|
close;
|
|||
|
sql.Clear;
|
|||
|
sql.Add('select * from KH_ZDY where Type=''YPCK'' ');
|
|||
|
if trim(fCKName) <> '' then
|
|||
|
sql.Add('and zdyName=' + quotedstr(trim(fCKName)));
|
|||
|
open;
|
|||
|
while not eof do
|
|||
|
begin
|
|||
|
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
|||
|
next;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if ckName.Items.Count > 0 then
|
|||
|
ckName.ItemIndex := 0;
|
|||
|
|
|||
|
CRType.Items.Clear;
|
|||
|
CRType.Items.Add('');
|
|||
|
with adoQueryTmp do
|
|||
|
begin
|
|||
|
close;
|
|||
|
sql.Clear;
|
|||
|
sql.Add('select * from KH_ZDY where Type=''YPRKTYPE''');
|
|||
|
if trim(fCKName) <> '' then
|
|||
|
sql.Add('and note=' + quotedstr(trim(fCKName)));
|
|||
|
open;
|
|||
|
while not eof do
|
|||
|
begin
|
|||
|
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
|||
|
next;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if CRType.Items.Count > 0 then
|
|||
|
CRType.ItemIndex := 0;
|
|||
|
|
|||
|
with adoqueryCmd do
|
|||
|
begin
|
|||
|
close;
|
|||
|
sql.Clear;
|
|||
|
sql.Add('select * from KH_Zdy where Type=''YPKCJYFLAG''');
|
|||
|
open;
|
|||
|
if not IsEmpty then
|
|||
|
Edit1.Text := trim(fieldbyname('zdyName').AsString);
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.InitGrid();
|
|||
|
begin
|
|||
|
try
|
|||
|
with adoqueryTmp do
|
|||
|
begin
|
|||
|
close;
|
|||
|
sql.Clear;
|
|||
|
sql.Add('exec P_View_YpKc ');
|
|||
|
sql.Add('@begdate=''' + formatdateTime('yyyy-MM-dd', begdate.DateTime) + '''');
|
|||
|
sql.Add(',@enddate=''' + formatdateTime('yyyy-MM-dd', enddate.DateTime + 1) + '''');
|
|||
|
if CheckBox1.Checked then
|
|||
|
sql.Add(',@iskc=''1'' ')
|
|||
|
else
|
|||
|
sql.Add(',@iskc=''0'' ');
|
|||
|
|
|||
|
if CheckBox2.Checked then
|
|||
|
sql.Add(',@isyj=''1'' ')
|
|||
|
else
|
|||
|
sql.Add(',@isyj=''0'' ');
|
|||
|
|
|||
|
sql.Add(',@yjNum=''' + trim(Edit1.text) + ''' ');
|
|||
|
// ShowMessage(sql.Text);
|
|||
|
open;
|
|||
|
end;
|
|||
|
SCreateCDS20(adoqueryTmp, CDS_Main);
|
|||
|
SInitCDSData20(adoqueryTmp, CDS_Main);
|
|||
|
finally
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.Initsub();
|
|||
|
begin
|
|||
|
try
|
|||
|
with ADOQuery1 do
|
|||
|
begin
|
|||
|
close;
|
|||
|
sql.Clear;
|
|||
|
sql.Add('select *,QTY1=(CASE WHEN CRFLAG=''<27><><EFBFBD><EFBFBD>'' then qty else -qty end) from yp_inout where valid=''Y'' ');
|
|||
|
sql.Add('and isnull(FROMOrderno,'''')=' + QuotedStr(CDS_Main.fieldbyname('FROMOrderno').AsString));
|
|||
|
sql.Add('and isnull(frommainid,'''')=' + QuotedStr(CDS_Main.fieldbyname('frommainid').AsString));
|
|||
|
sql.Add('and isnull(fromsubid,'''')=' + QuotedStr(CDS_Main.fieldbyname('fromsubid').AsString));
|
|||
|
sql.Add('and isnull(factoryname,'''')=' + QuotedStr(CDS_Main.fieldbyname('factoryname').AsString));
|
|||
|
sql.Add('and isnull(P_Code,'''')=' + QuotedStr(CDS_Main.fieldbyname('P_Code').AsString));
|
|||
|
sql.Add('and isnull(P_spec,'''')=' + QuotedStr(CDS_Main.fieldbyname('P_spec').AsString));
|
|||
|
// sql.Add('and isnull(P_cf,'''')=' + QuotedStr(CDS_Main.fieldbyname('P_cf').AsString));
|
|||
|
sql.Add('and isnull(P_Color,'''')=' + QuotedStr(CDS_Main.fieldbyname('P_Color').AsString));
|
|||
|
sql.Add('and isnull(QtyUnit,'''')=' + QuotedStr(CDS_Main.fieldbyname('QtyUnit').AsString));
|
|||
|
sql.Add('and isnull(kuwei,'''')=' + QuotedStr(CDS_Main.fieldbyname('kuwei').AsString));
|
|||
|
|
|||
|
sql.Add('and isnull(P_SMF,'''')=' + QuotedStr(CDS_Main.fieldbyname('P_SMF').AsString));
|
|||
|
sql.Add('and isnull(P_SKZ,'''')=' + QuotedStr(CDS_Main.fieldbyname('P_SKZ').AsString));
|
|||
|
SQL.Add('ORDER BY CRTIME DESC');
|
|||
|
// sql.Add('and isnull(FROMOrderno,'''')=' + QuotedStr(CDS_Main.fieldbyname('FROMOrderno').AsString));
|
|||
|
// ShowMessage(sql.Text);
|
|||
|
open;
|
|||
|
end;
|
|||
|
SCreateCDS20(ADOQuery1, CDS_SUB);
|
|||
|
SInitCDSData20(ADOQuery1, CDS_SUB);
|
|||
|
finally
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.FormClose(Sender: TObject; var Action: TCloseAction);
|
|||
|
begin
|
|||
|
writeCxGrid(self.Caption, Tv1, '<27><>Ʒ<EFBFBD>ֿ<EFBFBD>');
|
|||
|
if fType = 10 then
|
|||
|
Action := cahide
|
|||
|
else
|
|||
|
Action := cafree;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.FormDestroy(Sender: TObject);
|
|||
|
begin
|
|||
|
frmBpkcsumlist := nil;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.P_CodeChange(Sender: TObject);
|
|||
|
begin
|
|||
|
if ADOQueryTmp.Active = False then
|
|||
|
Exit;
|
|||
|
SDofilter(ADOQueryTmp, SGetFilters(Panel1, 1, 2));
|
|||
|
SCreateCDS20(ADOQueryTmp, CDS_Main);
|
|||
|
SInitCDSData20(ADOQueryTmp, CDS_Main);
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.FormShow(Sender: TObject);
|
|||
|
var
|
|||
|
fsj: string;
|
|||
|
begin
|
|||
|
readCxGrid(self.Caption, Tv1, '<27><>Ʒ<EFBFBD>ֿ<EFBFBD>');
|
|||
|
fsj := 'select DISTINCT CRTYPE as name from YP_INOUT where CRFLAG=''<27><><EFBFBD><EFBFBD>'' and valid=''Y'' ';
|
|||
|
SInitComBoxBySql(ADOQueryCmd, RKTYPE, False, fsj);
|
|||
|
if fType = 10 then
|
|||
|
begin
|
|||
|
TOk.Visible := true;
|
|||
|
v1Ssel.Visible := true;
|
|||
|
end;
|
|||
|
if canshu2 = 'ҵ<><D2B5>Ա' then
|
|||
|
begin
|
|||
|
v1factoryName.Visible := false;
|
|||
|
v1factoryName.Hidden := true;
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
v1factoryName.Visible := true;
|
|||
|
v1factoryName.Hidden := false;
|
|||
|
end;
|
|||
|
SetComboBox();
|
|||
|
InitGrid();
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.FormCreate(Sender: TObject);
|
|||
|
begin
|
|||
|
BegDate.Date := DServerDate - 7;
|
|||
|
EndDate.Date := DServerDate;
|
|||
|
cxGrid1.Align := alclient;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.TBCloseClick(Sender: TObject);
|
|||
|
begin
|
|||
|
close;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.TBRafreshClick(Sender: TObject);
|
|||
|
begin
|
|||
|
initGrid();
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.TBPrintClick(Sender: TObject);
|
|||
|
begin
|
|||
|
if CDS_Main.IsEmpty then
|
|||
|
Exit;
|
|||
|
TcxGridToExcel(self.Caption, cxgrid1);
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.TBExportClick(Sender: TObject);
|
|||
|
begin
|
|||
|
if CDS_Main.IsEmpty then
|
|||
|
Exit;
|
|||
|
TcxGridToExcel(self.Caption, cxgrid1);
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.TOkClick(Sender: TObject);
|
|||
|
begin
|
|||
|
if CDS_Main.IsEmpty then
|
|||
|
Exit;
|
|||
|
ModalResult := 1;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.CheckBox1Click(Sender: TObject);
|
|||
|
begin
|
|||
|
initgrid();
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
|||
|
begin
|
|||
|
// if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('kcQty').Index] < strtofloatdef(trim(edit1.Text), 0) then
|
|||
|
// ACanvas.Brush.Color := clred;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.CheckBox2Click(Sender: TObject);
|
|||
|
begin
|
|||
|
initgrid();
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.ToolButton1Click(Sender: TObject);
|
|||
|
begin
|
|||
|
frmZDYHelp := TfrmZDYHelp.Create(self);
|
|||
|
with frmZDYHelp do
|
|||
|
begin
|
|||
|
flag := 'YPKCJYFLAG';
|
|||
|
caption := '<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
V1Name.Caption := 'Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
showmodal;
|
|||
|
free;
|
|||
|
end;
|
|||
|
with adoqueryCmd do
|
|||
|
begin
|
|||
|
close;
|
|||
|
sql.Clear;
|
|||
|
sql.Add('select * from KH_Zdy where Type=''YPKCJYFLAG''');
|
|||
|
open;
|
|||
|
if not IsEmpty then
|
|||
|
Edit1.Text := trim(fieldbyname('zdyName').AsString);
|
|||
|
end;
|
|||
|
TBRafresh.Click;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
|||
|
begin
|
|||
|
if CDS_Main.IsEmpty = True then
|
|||
|
Exit;
|
|||
|
Initsub();
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.ToolButton2Click(Sender: TObject);
|
|||
|
begin
|
|||
|
Panel5.Visible := True;
|
|||
|
Edit2.Text := Trim(CDS_Main.fieldbyname('kcqty').AsString);
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.Button5Click(Sender: TObject);
|
|||
|
var
|
|||
|
MAXNO: string;
|
|||
|
begin
|
|||
|
try
|
|||
|
|
|||
|
if GetLSNo(ADOQueryCmd, MAXNO, 'YC', 'YP_InOut', 4, 1) = False then
|
|||
|
begin
|
|||
|
|
|||
|
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
|||
|
Exit;
|
|||
|
end;
|
|||
|
with ADOQueryCmd do
|
|||
|
begin
|
|||
|
close;
|
|||
|
sql.Clear;
|
|||
|
sql.Add('select * from YP_INout');
|
|||
|
sql.Add('where 1<>1');
|
|||
|
open;
|
|||
|
end;
|
|||
|
with ADOQueryCmd do
|
|||
|
begin
|
|||
|
|
|||
|
Append;
|
|||
|
FieldByName('Filler').Value := trim(DName);
|
|||
|
FieldByName('FillTime').Value := SGetServerDate(ADOQueryTmp);
|
|||
|
FieldByName('crTime').Value := SGetServerDate(ADOQueryTmp);
|
|||
|
FieldByName('CRNO').Value := trim(MAXNO);
|
|||
|
FieldByName('CRID').Value := Trim(MAXNO);
|
|||
|
FieldByName('CRQtyFlag').Value := -1;
|
|||
|
FieldByName('CRFlag').Value := '<27><><EFBFBD><EFBFBD>';
|
|||
|
FieldByName('CRTYPE').Value := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
FieldByName('kuwei').Value := trim(CDS_Main.fieldbyname('kuwei').AsString);
|
|||
|
FieldByName('factoryName').Value := trim(CDS_Main.fieldbyname('factoryName').AsString);
|
|||
|
|
|||
|
FieldByName('P_Code').Value := trim(CDS_Main.fieldbyname('P_Code').AsString);
|
|||
|
// FieldByName('P_cf').Value := trim(CDS_Main.fieldbyname('P_cf').AsString);
|
|||
|
// FieldByName('YWY').Value := trim(CDS_Main.fieldbyname('YWY').AsString);
|
|||
|
|
|||
|
FieldByName('P_CodeName').Value := trim(CDS_Main.fieldbyname('P_CodeName').AsString);
|
|||
|
FieldByName('P_Color').Value := trim(CDS_Main.fieldbyname('P_Color').AsString);
|
|||
|
FieldByName('QtyUnit').Value := trim(CDS_Main.fieldbyname('QtyUnit').AsString);
|
|||
|
|
|||
|
FieldByName('QTY').Value := CDS_Main.fieldbyname('kcQty').AsFloat - STRTOFLOATDEF(Edit2.Text, 0);
|
|||
|
|
|||
|
FieldByName('FROMOrderno').Value := trim(CDS_Main.fieldbyname('FROMOrderno').AsString);
|
|||
|
FieldByName('frommainid').Value := trim(CDS_Main.fieldbyname('frommainid').AsString);
|
|||
|
FieldByName('fromsubid').Value := trim(CDS_Main.fieldbyname('fromsubid').AsString);
|
|||
|
FieldByName('P_SMF').Value := trim(CDS_Main.fieldbyname('P_SMF').AsString);
|
|||
|
FieldByName('P_SKZ').Value := trim(CDS_Main.fieldbyname('P_SKZ').AsString);
|
|||
|
Post;
|
|||
|
|
|||
|
end;
|
|||
|
with CDS_Main do
|
|||
|
begin
|
|||
|
Edit;
|
|||
|
CDS_Main.fieldbyname('kcqty').AsString := edit2.text;
|
|||
|
Post;
|
|||
|
end;
|
|||
|
|
|||
|
CDS_Main.EnableControls;
|
|||
|
Panel5.Visible := False;
|
|||
|
// InitGrid();
|
|||
|
except
|
|||
|
CDS_Main.EnableControls;
|
|||
|
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmBpkcsumlist.Button6Click(Sender: TObject);
|
|||
|
begin
|
|||
|
Panel5.Visible := False;
|
|||
|
end;
|
|||
|
|
|||
|
end.
|
|||
|
|