813 lines
23 KiB
ObjectPascal
813 lines
23 KiB
ObjectPascal
|
|
unit U_BpRklist;
|
|||
|
|
|
|||
|
|
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, cxPC,
|
|||
|
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu,
|
|||
|
|
cxCheckBox, RM_System, RM_Common, RM_Class, RM_GridReport, Menus, MovePanel,
|
|||
|
|
cxButtons;
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
TfrmBpRklist = class(TForm)
|
|||
|
|
ToolBar1: TToolBar;
|
|||
|
|
TBRafresh: TToolButton;
|
|||
|
|
TBFind: TToolButton;
|
|||
|
|
TBAdd: TToolButton;
|
|||
|
|
TBEdit: TToolButton;
|
|||
|
|
TBDel: 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;
|
|||
|
|
v1P_MF: TcxGridDBColumn;
|
|||
|
|
v1P_KZ: TcxGridDBColumn;
|
|||
|
|
v1Qty: TcxGridDBColumn;
|
|||
|
|
v1QtyUnit: TcxGridDBColumn;
|
|||
|
|
v1Note: TcxGridDBColumn;
|
|||
|
|
cxGrid1Level1: TcxGridLevel;
|
|||
|
|
v1CRType: TcxGridDBColumn;
|
|||
|
|
v1CRTime: TcxGridDBColumn;
|
|||
|
|
v1Filler: TcxGridDBColumn;
|
|||
|
|
v1FillTime: TcxGridDBColumn;
|
|||
|
|
Label2: TLabel;
|
|||
|
|
Label3: TLabel;
|
|||
|
|
Label4: TLabel;
|
|||
|
|
P_SPEC: TEdit;
|
|||
|
|
CRType: TComboBox;
|
|||
|
|
Label5: TLabel;
|
|||
|
|
ADOQueryCmd: TADOQuery;
|
|||
|
|
ADOQueryTmp: TADOQuery;
|
|||
|
|
DataSource1: TDataSource;
|
|||
|
|
CDS_Main: TClientDataSet;
|
|||
|
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
|||
|
|
v1CPType: TcxGridDBColumn;
|
|||
|
|
ckName: TComboBox;
|
|||
|
|
Label6: TLabel;
|
|||
|
|
v1P_Color: TcxGridDBColumn;
|
|||
|
|
v1P_Code: TcxGridDBColumn;
|
|||
|
|
v1INoutNo: TcxGridDBColumn;
|
|||
|
|
v1Column1: TcxGridDBColumn;
|
|||
|
|
kuwei: TEdit;
|
|||
|
|
Label8: TLabel;
|
|||
|
|
v1Column2: TcxGridDBColumn;
|
|||
|
|
v1Column5: TcxGridDBColumn;
|
|||
|
|
cxTabControl1: TcxTabControl;
|
|||
|
|
v1editer: TcxGridDBColumn;
|
|||
|
|
v1editTime: TcxGridDBColumn;
|
|||
|
|
v1DefStr6: TcxGridDBColumn;
|
|||
|
|
Label9: TLabel;
|
|||
|
|
factoryName: TEdit;
|
|||
|
|
v1Column8: TcxGridDBColumn;
|
|||
|
|
Tchk: TToolButton;
|
|||
|
|
Tnochk: TToolButton;
|
|||
|
|
v1Column9: TcxGridDBColumn;
|
|||
|
|
Tv1Column4: TcxGridDBColumn;
|
|||
|
|
btnDelCX: TToolButton;
|
|||
|
|
btnDelData: TToolButton;
|
|||
|
|
Tv1Column5: TcxGridDBColumn;
|
|||
|
|
Tv1Column6: TcxGridDBColumn;
|
|||
|
|
Tv1Column7: TcxGridDBColumn;
|
|||
|
|
Label7: TLabel;
|
|||
|
|
P_CF: TEdit;
|
|||
|
|
Label10: TLabel;
|
|||
|
|
Label11: TLabel;
|
|||
|
|
P_CodeName: TEdit;
|
|||
|
|
KHCPName: TEdit;
|
|||
|
|
Label12: TLabel;
|
|||
|
|
P_Color: TEdit;
|
|||
|
|
Label13: TLabel;
|
|||
|
|
sehao: TEdit;
|
|||
|
|
Label14: TLabel;
|
|||
|
|
KHColor: TEdit;
|
|||
|
|
Label15: TLabel;
|
|||
|
|
KHSeHao: TEdit;
|
|||
|
|
P_Code: TEdit;
|
|||
|
|
ToolButton1: TToolButton;
|
|||
|
|
Tv1Column1: TcxGridDBColumn;
|
|||
|
|
RM2: TRMGridReport;
|
|||
|
|
CheckBox1: TCheckBox;
|
|||
|
|
PopupMenu1: TPopupMenu;
|
|||
|
|
N1: TMenuItem;
|
|||
|
|
N2: TMenuItem;
|
|||
|
|
Label16: TLabel;
|
|||
|
|
YPLX: TComboBox;
|
|||
|
|
Tv1Column2: TcxGridDBColumn;
|
|||
|
|
ComboBox1: TComboBox;
|
|||
|
|
Tv1Column3: TcxGridDBColumn;
|
|||
|
|
ToolButton2: TToolButton;
|
|||
|
|
edt1: TEdit;
|
|||
|
|
Panel3: TPanel;
|
|||
|
|
XGPrice: TEdit;
|
|||
|
|
Label17: TLabel;
|
|||
|
|
Button3: TButton;
|
|||
|
|
Button4: TButton;
|
|||
|
|
Tv1Column8: TcxGridDBColumn;
|
|||
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|||
|
|
procedure FormDestroy(Sender: TObject);
|
|||
|
|
procedure TBAddClick(Sender: TObject);
|
|||
|
|
procedure P_SPECChange(Sender: TObject);
|
|||
|
|
procedure FormShow(Sender: TObject);
|
|||
|
|
procedure FormCreate(Sender: TObject);
|
|||
|
|
procedure TBCloseClick(Sender: TObject);
|
|||
|
|
procedure TBEditClick(Sender: TObject);
|
|||
|
|
procedure TBDelClick(Sender: TObject);
|
|||
|
|
procedure TBRafreshClick(Sender: TObject);
|
|||
|
|
procedure TBPrintClick(Sender: TObject);
|
|||
|
|
procedure TBExportClick(Sender: TObject);
|
|||
|
|
procedure cxTabControl1Change(Sender: TObject);
|
|||
|
|
procedure TchkClick(Sender: TObject);
|
|||
|
|
procedure TnochkClick(Sender: TObject);
|
|||
|
|
procedure btnDelDataClick(Sender: TObject);
|
|||
|
|
procedure btnDelCXClick(Sender: TObject);
|
|||
|
|
procedure Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
|||
|
|
procedure ToolButton1Click(Sender: TObject);
|
|||
|
|
procedure N1Click(Sender: TObject);
|
|||
|
|
procedure N2Click(Sender: TObject);
|
|||
|
|
procedure ToolButton2Click(Sender: TObject);
|
|||
|
|
procedure XGPriceKeyPress(Sender: TObject; var Key: Char);
|
|||
|
|
procedure Button3Click(Sender: TObject);
|
|||
|
|
procedure Button4Click(Sender: TObject);
|
|||
|
|
private
|
|||
|
|
procedure InitGrid();
|
|||
|
|
procedure SetComboBox();
|
|||
|
|
procedure Setstatus();
|
|||
|
|
{ Private declarations }
|
|||
|
|
public
|
|||
|
|
fCKName: string;
|
|||
|
|
canshu1: string;
|
|||
|
|
{ Public declarations }
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
//var
|
|||
|
|
// frmBpRklist: TfrmBpRklist;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
U_DataLink, U_Fun10, U_ZDYHelp, U_BpRk, U_BpSmRk;
|
|||
|
|
{$R *.dfm}
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.SetStatus();
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
TBedit.Visible := false;
|
|||
|
|
Tbdel.Visible := false;
|
|||
|
|
Tchk.Visible := false;
|
|||
|
|
Tnochk.Visible := false;
|
|||
|
|
btnDelData.Visible := false;
|
|||
|
|
btnDelCX.Visible := false;
|
|||
|
|
|
|||
|
|
ToolButton2.Visible := false;
|
|||
|
|
|
|||
|
|
if (DName = 'ADMIN') or (DName = 'MAOGE') or (DName = 'dsa') then
|
|||
|
|
begin
|
|||
|
|
ToolButton2.Visible := true;
|
|||
|
|
end;
|
|||
|
|
case cxTabControl1.TabIndex of
|
|||
|
|
0:
|
|||
|
|
begin
|
|||
|
|
TBedit.Visible := true;
|
|||
|
|
Tbdel.Visible := true;
|
|||
|
|
if trim(canshu1) = '<27><><EFBFBD><EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
Tchk.Visible := true;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
1:
|
|||
|
|
begin
|
|||
|
|
if trim(canshu1) = '<27><><EFBFBD><EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
Tnochk.Visible := true;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
2:
|
|||
|
|
begin
|
|||
|
|
// tbcdel.Visible:=true;
|
|||
|
|
end;
|
|||
|
|
3:
|
|||
|
|
begin
|
|||
|
|
btnDelCX.Visible := true;
|
|||
|
|
btnDelData.Visible := true;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.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;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.InitGrid();
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
with adoqueryTmp do
|
|||
|
|
begin
|
|||
|
|
close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select A.* from YP_InOut2 A');
|
|||
|
|
|
|||
|
|
sql.Add('where CRTime>=''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''' ');
|
|||
|
|
sql.Add('and CRTime<''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''' ');
|
|||
|
|
sql.Add('and CRFlag=''<27><><EFBFBD><EFBFBD>'' ');
|
|||
|
|
sql.Add('and valid=''Y'' ');
|
|||
|
|
|
|||
|
|
case cxTabControl1.TabIndex of
|
|||
|
|
0:
|
|||
|
|
begin
|
|||
|
|
sql.Add('and valid=''Y'' and A.status=''0'' ');
|
|||
|
|
end;
|
|||
|
|
1:
|
|||
|
|
begin
|
|||
|
|
sql.Add('and valid=''Y'' and A.status=''1'' ');
|
|||
|
|
end;
|
|||
|
|
2:
|
|||
|
|
begin
|
|||
|
|
sql.Add('and valid=''Y'' ');
|
|||
|
|
end;
|
|||
|
|
3:
|
|||
|
|
begin
|
|||
|
|
sql.Add('and valid=''N'' ');
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
sql.add('order by filltime desc');
|
|||
|
|
open;
|
|||
|
|
end;
|
|||
|
|
SCreateCDS20(adoqueryTmp, CDS_Main);
|
|||
|
|
SInitCDSData20(adoqueryTmp, CDS_Main);
|
|||
|
|
finally
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.FormClose(Sender: TObject; var Action: TCloseAction);
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
Action := cafree;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.FormDestroy(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
// frmBpRklist := nil;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.TBAddClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
frmbpRk := TfrmbpRk.create(self);
|
|||
|
|
with frmbpRk do
|
|||
|
|
begin
|
|||
|
|
fkeyNo := '';
|
|||
|
|
fType := 0;
|
|||
|
|
fckName := self.fckName;
|
|||
|
|
if showmodal = 1 then
|
|||
|
|
begin
|
|||
|
|
TBRafresh.Click;
|
|||
|
|
self.CDS_Main.Locate('crNo', trim(fkeyNo), []);
|
|||
|
|
end;
|
|||
|
|
free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.P_SPECChange(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 TfrmBpRklist.FormShow(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
readCxGrid(self.Caption + '1', Tv1, '<27><>Ʒ<EFBFBD>ֿ<EFBFBD>');
|
|||
|
|
// SetComboBox();
|
|||
|
|
SetStatus();
|
|||
|
|
InitGrid();
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.FormCreate(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
BegDate.Date := DServerDate - 7;
|
|||
|
|
EndDate.Date := DServerDate;
|
|||
|
|
cxGrid1.Align := alclient;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.TBCloseClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
writeCxGrid(self.Caption + '1', Tv1, '<27><>Ʒ<EFBFBD>ֿ<EFBFBD>');
|
|||
|
|
close;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.TBEditClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
|
|||
|
|
frmbpRk := TfrmbpRk.create(self);
|
|||
|
|
with frmbpRk do
|
|||
|
|
begin
|
|||
|
|
fkeyNo := self.cds_main.fieldbyname('CRNO').AsString;
|
|||
|
|
fType := 1;
|
|||
|
|
fckName := self.fckName;
|
|||
|
|
if showmodal = 1 then
|
|||
|
|
begin
|
|||
|
|
TBRafresh.Click;
|
|||
|
|
self.CDS_Main.Locate('crNo', trim(fkeyNo), []);
|
|||
|
|
end;
|
|||
|
|
free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.TBDelClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
|
|||
|
|
if Application.MessageBox('<27>Ƿ<EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('update YP_InOut2 SET valid=''N'' ');
|
|||
|
|
sql.Add(',editer=' + quotedstr(trim(DName)));
|
|||
|
|
sql.Add(',edittime=getdate()');
|
|||
|
|
SQL.Add('where CRID=' + quotedstr(CDS_Main.fieldbyname('CRID').AsString));
|
|||
|
|
execsql;
|
|||
|
|
end;
|
|||
|
|
// with ADOQueryCmd do
|
|||
|
|
// begin
|
|||
|
|
// Close;
|
|||
|
|
// sql.Clear;
|
|||
|
|
// sql.Add('exec P_YP_Judge_KC ');
|
|||
|
|
// Open;
|
|||
|
|
// end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select sum(A.Qty*A.CRQtyFlag)SL FROM YP_InOut2 A ');
|
|||
|
|
|
|||
|
|
sql.Add('where Valid=''Y'' AND isnull(FROMOrderno,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('FROMOrderno').AsString)));
|
|||
|
|
sql.Add('and isnull(frommainid,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('frommainid').AsString)));
|
|||
|
|
sql.Add('and isnull(fromsubid,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('fromsubid').AsString)));
|
|||
|
|
sql.Add('and isnull(ywy,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('ywy').AsString)));
|
|||
|
|
sql.Add('and isnull(Price,0)=' + Trim(CDS_Main.fieldbyname('Price').AsString));
|
|||
|
|
sql.Add('and isnull(factoryname,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('factoryname').AsString)));
|
|||
|
|
sql.Add('and isnull(P_Code,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('P_Code').AsString)));
|
|||
|
|
sql.Add('and isnull(P_codename,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('P_codename').AsString)));
|
|||
|
|
sql.Add('and isnull(P_spec,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('P_spec').AsString)));
|
|||
|
|
sql.Add('and isnull(P_cf,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('P_cf').AsString)));
|
|||
|
|
sql.Add('and isnull(P_Color,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('P_Color').AsString)));
|
|||
|
|
sql.Add('and isnull(P_HX,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('P_HX').AsString)));
|
|||
|
|
sql.Add('and isnull(QtyUnit,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('QtyUnit').AsString)));
|
|||
|
|
sql.Add('and isnull(shazhi,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('shazhi').AsString)));
|
|||
|
|
sql.Add('and isnull(kuwei,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('kuwei').AsString)));
|
|||
|
|
sql.Add('and isnull(P_SKZ,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('P_SKZ').AsString)));
|
|||
|
|
sql.Add('and isnull(YPCFD,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('YPCFD').AsString)));
|
|||
|
|
sql.Add('and isnull(JuanHao,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('JuanHao').AsString)));
|
|||
|
|
sql.Add('and isnull(ISCGPZ,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('ISCGPZ').AsString)));
|
|||
|
|
sql.Add('and isnull(YPType,'''')=' + quotedstr(Trim(CDS_Main.fieldbyname('YPType').AsString)));
|
|||
|
|
SQL.Add(' group by FROMOrderno ,frommainid,fromsubid,isnull(A.ywy,''''),A.Price,A.factoryname,A.P_Code,A.P_codename,A.P_spec,A.P_cf,A.P_Color,A.P_HX,A.QtyUnit,A.shazhi,A.kuwei,A.P_SMF,A.P_SKZ,YPCFD,JuanHao,ISCGPZ,YPType');
|
|||
|
|
// ShowMessage(SQL.Text);
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
if ADOQueryCmd.IsEmpty = false then
|
|||
|
|
begin
|
|||
|
|
if ADOQueryCmd.FieldByName('SL').VALUE < 0 then
|
|||
|
|
begin
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쳣<EFBFBD><ECB3A3>', '<27><>ʾ', 0);
|
|||
|
|
exit;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
// if Trim(ADOQueryCmd.FieldByName('msg').AsString) = '<27>쳣' then
|
|||
|
|
// begin
|
|||
|
|
// ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
// Application.MessageBox('<27>Ѳ<EFBFBD><D1B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>', '<27><>ʾ', 0);
|
|||
|
|
// exit;
|
|||
|
|
// end;
|
|||
|
|
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
CDS_Main.Delete;
|
|||
|
|
except
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.TBRafreshClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
initGrid();
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.TBPrintClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
TcxGridToExcel(self.Caption, cxgrid1);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.TBExportClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
TcxGridToExcel(self.Caption, cxgrid1);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.cxTabControl1Change(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
SetStatus();
|
|||
|
|
initGrid();
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.TchkClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
exit;
|
|||
|
|
try
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('update YP_InOut2 SET status=''1'' ');
|
|||
|
|
sql.Add('where CRNO=' + quotedstr(trim(CDS_Main.fieldbyname('CRNO').AsString)));
|
|||
|
|
execsql;
|
|||
|
|
end;
|
|||
|
|
application.MessageBox('<27><><EFBFBD>˳ɹ<CBB3><C9B9><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ');
|
|||
|
|
TBRafresh.Click;
|
|||
|
|
except
|
|||
|
|
application.MessageBox('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.TnochkClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
exit;
|
|||
|
|
try
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('update YP_InOut2 SET status=''0'' ');
|
|||
|
|
sql.Add('where CRNO=' + quotedstr(trim(CDS_Main.fieldbyname('CRNO').AsString)));
|
|||
|
|
execsql;
|
|||
|
|
end;
|
|||
|
|
application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳ɹ<CBB3><C9B9><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ');
|
|||
|
|
TBRafresh.Click;
|
|||
|
|
except
|
|||
|
|
application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.btnDelDataClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
|
|||
|
|
if Application.MessageBox('<27>Ƿ<EFBFBD>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('delete YP_InOut2 SET where CRID=' + quotedstr(CDS_Main.fieldbyname('CRID').AsString));
|
|||
|
|
execsql;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
CDS_Main.Delete;
|
|||
|
|
except
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.btnDelCXClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
|
|||
|
|
if Application.MessageBox('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
|
|||
|
|
try
|
|||
|
|
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
|
|||
|
|
sql.Add('update YP_InOut2 SET valid=''Y'' ');
|
|||
|
|
sql.Add(',editer=' + quotedstr(trim(DName)));
|
|||
|
|
sql.Add(',edittime=getdate()');
|
|||
|
|
SQL.Add('where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
|||
|
|
|
|||
|
|
execsql;
|
|||
|
|
end;
|
|||
|
|
TBRafresh.Click;
|
|||
|
|
except
|
|||
|
|
Application.MessageBox('<27><><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>ɾ<EFBFBD><C9BE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
|||
|
|
var
|
|||
|
|
FValue: string;
|
|||
|
|
FBounds: TRect;
|
|||
|
|
begin
|
|||
|
|
FBounds := AViewInfo.Bounds;
|
|||
|
|
if (AViewInfo is TcxGridIndicatorRowItemViewInfo) then
|
|||
|
|
begin
|
|||
|
|
ACanvas.FillRect(FBounds);
|
|||
|
|
ACanvas.DrawComplexFrame(FBounds, clBtnHighlight, clBtnShadow, [bBottom, bLeft, bRight], 1);
|
|||
|
|
FValue := IntToStr(TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index + 1);
|
|||
|
|
InflateRect(FBounds, -1, -1); //Platform specific. May not work on Linux.
|
|||
|
|
ACanvas.Font.Color := clBlack;
|
|||
|
|
ACanvas.Brush.Style := bsClear;
|
|||
|
|
ACanvas.DrawText(FValue, FBounds, cxAlignCenter or cxAlignTop);
|
|||
|
|
ADone := True;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.ToolButton1Click(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
fPrintFile, FFCYID: string;
|
|||
|
|
DPS, i, j: Integer;
|
|||
|
|
Txt, fImagePath: string;
|
|||
|
|
Moudle: THandle;
|
|||
|
|
Makebar: TMakebar;
|
|||
|
|
Mixtext: TMixtext;
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if Trim(edt1.Text) <> '' then
|
|||
|
|
begin
|
|||
|
|
if TryStrToInt(edt1.Text, j) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
exit;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
if CDS_Main.Locate('ssel', true, []) = false then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
// fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\<5C><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ.rmf';
|
|||
|
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + trim(ComboBox1.Text) + '.rmf';
|
|||
|
|
CDS_Main.DisableControls;
|
|||
|
|
i := 1;
|
|||
|
|
if Trim(edt1.Text) = '' then
|
|||
|
|
begin
|
|||
|
|
j := 1;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
j := StrToInt(edt1.Text);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
with CDS_Main do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while not Eof do
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.FieldByName('SSel').AsBoolean = True then
|
|||
|
|
begin
|
|||
|
|
for i := 1 to j do
|
|||
|
|
begin
|
|||
|
|
if FileExists(fPrintFile) then
|
|||
|
|
begin
|
|||
|
|
RM2.LoadFromFile(fPrintFile);
|
|||
|
|
RMVariables['factoryName'] := Trim(CDS_Main.fieldbyname('factoryName').AsString); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
RMVariables['kuwei'] := Trim(CDS_Main.fieldbyname('kuwei').AsString); //<2F><>λ
|
|||
|
|
RMVariables['P_Code'] := Trim(CDS_Main.fieldbyname('P_Code').AsString); //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
|
RMVariables['P_CodeName'] := Trim(CDS_Main.fieldbyname('P_CodeName').AsString); //<2F><>˾<EFBFBD><CBBE>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
|
RMVariables['KHCPName'] := Trim(CDS_Main.fieldbyname('KHCPName').AsString); //<2F>ͻ<EFBFBD><CDBB><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
|
RMVariables['P_SPEC'] := Trim(CDS_Main.fieldbyname('P_SPEC').AsString); //<2F><><EFBFBD><EFBFBD>
|
|||
|
|
RMVariables['P_SMF'] := Trim(CDS_Main.fieldbyname('P_SMF').AsString); //<2F>ŷ<EFBFBD>
|
|||
|
|
RMVariables['P_SKZ'] := Trim(CDS_Main.fieldbyname('P_SKZ').AsString); //<2F><><EFBFBD><EFBFBD>
|
|||
|
|
RMVariables['P_Color'] := Trim(CDS_Main.fieldbyname('P_Color').AsString); //<2F><>˾<EFBFBD><CBBE>ɫ
|
|||
|
|
RMVariables['sehao'] := Trim(CDS_Main.fieldbyname('sehao').AsString); //<2F><>˾ɫ<CBBE><C9AB>
|
|||
|
|
RMVariables['KHColor'] := Trim(CDS_Main.fieldbyname('KHColor').AsString); //<2F>ͻ<EFBFBD><CDBB><EFBFBD>ɫ
|
|||
|
|
RMVariables['KHSeHao'] := Trim(CDS_Main.fieldbyname('KHSeHao').AsString); //<2F>ͻ<EFBFBD>ɫ<EFBFBD><C9AB>
|
|||
|
|
RMVariables['Qty'] := Trim(CDS_Main.fieldbyname('Qty').AsString); //<2F><><EFBFBD><EFBFBD>
|
|||
|
|
RMVariables['P_SPEC'] := Trim(CDS_Main.fieldbyname('P_SPEC').AsString); //<2F><><EFBFBD><EFBFBD>
|
|||
|
|
if CheckBox1.Checked = True then
|
|||
|
|
begin
|
|||
|
|
RM2.ShowReport;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
RM2.PrintReport;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox(PChar('û<><C3BB><EFBFBD><EFBFBD>' + ExtractFilePath(Application.ExeName) + 'Report\' + trim(ComboBox1.Text) + '.rmf'), '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
Edit;
|
|||
|
|
CDS_Main.FieldByName('SSel').Value := false;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
Next;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
edt1.Text := '1';
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.N1Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
SelOKNo(CDS_Main, True);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.N2Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
SelOKNo(CDS_Main, false);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.ToolButton2Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if CDS_Main.Locate('SSel', True, []) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
cxGrid1.Enabled := False;
|
|||
|
|
Panel3.Visible := True;
|
|||
|
|
XGPrice.Text := '';
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.XGPriceKeyPress(Sender: TObject; var Key: Char);
|
|||
|
|
begin
|
|||
|
|
if not (Key in ['0'..'9', '.', #8]) then
|
|||
|
|
Key := #0;
|
|||
|
|
if (Key = '.') and (Pos('.', XGPrice.Text) > 0) then
|
|||
|
|
Key := #0;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.Button3Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if Trim(XGPrice.text) = '' then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫ<EFBFBD>ĵ<DEB8><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
Panel3.Visible := False;
|
|||
|
|
cxGrid1.Enabled := true;
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
CDS_Main.DisableControls;
|
|||
|
|
with CDS_Main do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while CDS_Main.Locate('SSel', True, []) = True do
|
|||
|
|
begin
|
|||
|
|
//<2F><EFBFBD><DEB8><EFBFBD>Ʒ<EFBFBD>ֿⵥ<D6BF><E2B5A5>
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('update YP_InOut2 SET Price=' + trim(XGPrice.text) + '');
|
|||
|
|
sql.Add('where CRNO=' + quotedstr(trim(CDS_Main.fieldbyname('CRNO').AsString)));
|
|||
|
|
// ShowMessage(sql.text);
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
//<2F>Ĺ<DEB8>˾<EFBFBD><CBBE>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
|
if (trim(CDS_Main.fieldbyname('P_Code').AsString) <> '') and (CDS_Main.fieldbyname('XZLX').AsString = '<27><>˾<EFBFBD><CBBE>Ʒ') then
|
|||
|
|
begin
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('UPDATE ZH_CP_Info set YPPrice =' + trim(XGPrice.text) + '');
|
|||
|
|
sql.Add('where ZIID =''' + CDS_Main.fieldbyname('P_Code').AsString + '''');
|
|||
|
|
// ShowMessage(sql.text);
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
//<2F><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD>
|
|||
|
|
if (trim(CDS_Main.fieldbyname('P_Code').AsString) <> '') and ((CDS_Main.fieldbyname('XZLX').AsString = 'ӡ<><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') or (CDS_Main.fieldbyname('XZLX').AsString = '<27>̽<EFBFBD><CCBD><EFBFBD><EFBFBD><EFBFBD>')) then
|
|||
|
|
begin
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('UPDATE ML_Manage set YPPrice =' + trim(XGPrice.text) + '');
|
|||
|
|
sql.Add('where TJML =''' + CDS_Main.fieldbyname('P_Code').AsString + '''');
|
|||
|
|
// ShowMessage(sql.text);
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
//<2F><EFBFBD>Ⱦɫ
|
|||
|
|
if (trim(CDS_Main.fieldbyname('P_Code').AsString) <> '') and (CDS_Main.fieldbyname('XZLX').AsString = 'Ⱦɫ<C8BE><C9AB><EFBFBD><EFBFBD>') then
|
|||
|
|
begin
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('UPDATE ML_Manage set YPPrice =' + trim(XGPrice.text) + '');
|
|||
|
|
sql.Add('where MLID =''' + CDS_Main.fieldbyname('CPID').AsString + '''');
|
|||
|
|
// ShowMessage(sql.text);
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.Edit;
|
|||
|
|
CDS_Main.FieldByName('SSel').Value := false;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
Exit;
|
|||
|
|
except
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('<27><EFBFBD><DEB8>쳣<EFBFBD><ECB3A3>', '<27><>ʾ', 0);
|
|||
|
|
end;
|
|||
|
|
XGPrice.text := '';
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmBpRklist.Button4Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
XGPrice.text := '';
|
|||
|
|
cxGrid1.Enabled := true;
|
|||
|
|
Panel3.Visible := False;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end.
|
|||
|
|
|