438 lines
11 KiB
ObjectPascal
438 lines
11 KiB
ObjectPascal
|
|
unit U_TatPlanMachInput;
|
|||
|
|
|
|||
|
|
interface
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|||
|
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
|||
|
|
cxEdit, DB, cxDBData, ADODB, DBClient, cxGridLevel, cxGridCustomTableView,
|
|||
|
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
|||
|
|
cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit,
|
|||
|
|
cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, cxLookAndFeels,
|
|||
|
|
cxLookAndFeelPainters, cxNavigator, cxContainer, cxMaskEdit, dxDateRanges,
|
|||
|
|
dxScrollbarAnnotations, cxDropDownEdit, dxSkinsCore, dxSkinsDefaultPainters,
|
|||
|
|
dxSkinOffice2013White, dxSkinSharpPlus, dxSkinWXI;
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
TfrmTatPlanMachInput = class(TForm)
|
|||
|
|
ToolBar1: TToolBar;
|
|||
|
|
ToolButton1: TToolButton;
|
|||
|
|
TBClose: TToolButton;
|
|||
|
|
ADOQueryMain: TADOQuery;
|
|||
|
|
ADOQueryCmd: TADOQuery;
|
|||
|
|
ADOQueryTemp: TADOQuery;
|
|||
|
|
ScrollBox1: TScrollBox;
|
|||
|
|
Label1: TLabel;
|
|||
|
|
PMID: TcxTextEdit;
|
|||
|
|
Label3: TLabel;
|
|||
|
|
Label5: TLabel;
|
|||
|
|
MCNO: TcxTextEdit;
|
|||
|
|
Label8: TLabel;
|
|||
|
|
Label4: TLabel;
|
|||
|
|
OrderNo: TcxButtonEdit;
|
|||
|
|
Label9: TLabel;
|
|||
|
|
MainID: TcxTextEdit;
|
|||
|
|
Label10: TLabel;
|
|||
|
|
SubID: TcxTextEdit;
|
|||
|
|
Label11: TLabel;
|
|||
|
|
C_Name: TcxTextEdit;
|
|||
|
|
C_Code: TcxTextEdit;
|
|||
|
|
Label2: TLabel;
|
|||
|
|
ClientDataSet1: TClientDataSet;
|
|||
|
|
DataSource1: TDataSource;
|
|||
|
|
ADOQuery2: TADOQuery;
|
|||
|
|
CDS_2: TClientDataSet;
|
|||
|
|
DS_2: TDataSource;
|
|||
|
|
Label13: TLabel;
|
|||
|
|
Label15: TLabel;
|
|||
|
|
cxGrid2: TcxGrid;
|
|||
|
|
TV2: TcxGridDBTableView;
|
|||
|
|
cxGridDBColumn5: TcxGridDBColumn;
|
|||
|
|
cxGridDBColumn6: TcxGridDBColumn;
|
|||
|
|
cxGridLevel1: TcxGridLevel;
|
|||
|
|
cxGrid1: TcxGrid;
|
|||
|
|
TV1: TcxGridDBTableView;
|
|||
|
|
cxGridDBColumn1: TcxGridDBColumn;
|
|||
|
|
cxGridDBColumn2: TcxGridDBColumn;
|
|||
|
|
TV1Column1: TcxGridDBColumn;
|
|||
|
|
cxGridLevel2: TcxGridLevel;
|
|||
|
|
Label14: TLabel;
|
|||
|
|
Label17: TLabel;
|
|||
|
|
Label6: TLabel;
|
|||
|
|
C_FinishLatitudeDensity: TcxTextEdit;
|
|||
|
|
C_FinishLatitudeSpec: TcxTextEdit;
|
|||
|
|
C_FinishLatitudeBatchNo: TcxTextEdit;
|
|||
|
|
Label7: TLabel;
|
|||
|
|
Label12: TLabel;
|
|||
|
|
WB_Name: TcxTextEdit;
|
|||
|
|
action: TcxComboBox;
|
|||
|
|
PMType: TcxComboBox;
|
|||
|
|
WB_Code: TcxButtonEdit;
|
|||
|
|
ToolButton2: TToolButton;
|
|||
|
|
procedure FormShow(Sender: TObject);
|
|||
|
|
procedure TBCloseClick(Sender: TObject);
|
|||
|
|
procedure ToolButton1Click(Sender: TObject);
|
|||
|
|
procedure PMTypePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
procedure OrderNoPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
procedure WB_CodePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
procedure ToolButton2Click(Sender: TObject);
|
|||
|
|
procedure PMTypePropertiesChange(Sender: TObject);
|
|||
|
|
private
|
|||
|
|
canshu1, YCP, XCP: string;
|
|||
|
|
Fint, CXS: Integer;
|
|||
|
|
procedure InitData();
|
|||
|
|
function SaveData(): Boolean;
|
|||
|
|
function CheckData(): Boolean;
|
|||
|
|
{ Private declarations }
|
|||
|
|
public
|
|||
|
|
FPMID, FCYCode, FCPID, FCPNO, FCPName, FMCNo, FMCType: string;
|
|||
|
|
CopyInt, PState: Integer;
|
|||
|
|
|
|||
|
|
{ Public declarations }
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
var
|
|||
|
|
frmTatPlanMachInput: TfrmTatPlanMachInput;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_TatPlanSel, U_WBSpecSel;
|
|||
|
|
|
|||
|
|
{$R *.dfm}
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanMachInput.InitData();
|
|||
|
|
var
|
|||
|
|
FXHInt: Integer;
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
try
|
|||
|
|
ADOQueryMain.DisableControls;
|
|||
|
|
with ADOQueryMain do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
SQL.Clear;
|
|||
|
|
SQL.Add('select * from Tat_Plan_Mach where PMID=''' + Trim(FPMID) + '''');
|
|||
|
|
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
if ADOQueryMain.IsEmpty then
|
|||
|
|
begin
|
|||
|
|
PMType.Text := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
|
MCNo.text := FMCNo;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
SCSHData(ADOQueryMain, ScrollBox1, 2);
|
|||
|
|
PMType.ItemIndex := PMType.Properties.Items.IndexOf(trim(ADOQueryMain.fieldbyname('PMType').AsString));
|
|||
|
|
|
|||
|
|
action.ItemIndex := action.Properties.Items.IndexOf(trim(ADOQueryMain.fieldbyname('action').AsString));
|
|||
|
|
|
|||
|
|
if trim(PMType.text) = '<27>²<EFBFBD><C2B2>Ļ<EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
action.text := '<27>²<EFBFBD><C2B2>Ļ<EFBFBD>';
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
/////////////////ˢ<><CBA2>ǰ<EFBFBD><C7B0><EFBFBD>μ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>/////////////////////////
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select top 2 PMType,filltime from Tat_Plan_Mach where MCNO =''' + Trim(MCNO.Text) + '''');
|
|||
|
|
sql.Add('ORDER BY FillTime desc ');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
SCreateCDS(ADOQueryTemp, CDS_2);
|
|||
|
|
SInitCDSData(ADOQueryTemp, CDS_2);
|
|||
|
|
/////////////////ˢ<><CBA2>ǰ<EFBFBD><C7B0><EFBFBD>μ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>/////////////////////////
|
|||
|
|
|
|||
|
|
finally
|
|||
|
|
ADOQueryMain.EnableControls;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanMachInput.FormShow(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
readCxGrid(trim(self.Caption) + 'Tv1', Tv1, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
readCxGrid(trim(self.Caption) + 'Tv2', Tv2, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
InitData();
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanMachInput.TBCloseClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
function TfrmTatPlanMachInput.SaveData(): Boolean;
|
|||
|
|
var
|
|||
|
|
maxId, FCYNo, maxpbno: string;
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
|
|||
|
|
if FPMID = '' then
|
|||
|
|
begin
|
|||
|
|
if GetLSNo(ADOQueryCmd, maxId, 'RW', 'Tat_Plan_Mach', 4, 1) = False then
|
|||
|
|
begin
|
|||
|
|
Result := False;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
PMID.Text := trim(maxId);
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
maxId := trim(FPMID);
|
|||
|
|
PMID.Text := trim(maxId);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
SQL.Clear;
|
|||
|
|
sql.Add('select * from Tat_Plan_Mach where PMID=''' + Trim(FPMID) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
if FPMID = '' then
|
|||
|
|
begin
|
|||
|
|
Append;
|
|||
|
|
FieldByName('Filler').Value := Trim(DName);
|
|||
|
|
FieldByName('Filltime').Value := SGetServerDateTime(ADOQueryTemp);
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
Edit;
|
|||
|
|
FieldByName('Editer').Value := Trim(DName);
|
|||
|
|
FieldByName('Edittime').Value := SGetServerDateTime(ADOQueryTemp);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
FieldByName('PMID').Value := Trim(maxId);
|
|||
|
|
RTSetsavedata(ADOQueryCmd, 'Tat_Plan_Mach', ScrollBox1, 2);
|
|||
|
|
Post;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('EXEC P_Tat_Plan_Mach_SetSequence @PMID=''' + Trim(PMID.Text) + '''');
|
|||
|
|
sql.Add(',@Operate=''<27><><EFBFBD><EFBFBD>'' ');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
|
|||
|
|
begin
|
|||
|
|
raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
FPMID := maxId;
|
|||
|
|
Result := True;
|
|||
|
|
except
|
|||
|
|
Result := False;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!', '<27><>ʾ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanMachInput.ToolButton1Click(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
FWB_CODE: string;
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
if CheckData() = False then
|
|||
|
|
begin
|
|||
|
|
exit;
|
|||
|
|
end;
|
|||
|
|
if FPMID = '' then
|
|||
|
|
begin
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('SELECT * FROM Tat_Plan_Mach');
|
|||
|
|
sql.Add('WHERE ISNULL(Status, ''0'') in (''0'') ');
|
|||
|
|
SQL.Add('AND MCNO=' + QuotedStr(FMCNo));
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
if ADOQueryTemp.IsEmpty = FALSE then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27>û<EFBFBD>̨<EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F1A3ACB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>棡', '<27><>ʾ', 0);
|
|||
|
|
exit;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
if PMType.Text = '<27>²<EFBFBD><C2B2>Ļ<EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
if FPMID = '' then
|
|||
|
|
begin
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('SELECT * FROM Tat_Plan_Mach');
|
|||
|
|
sql.Add('WHERE ISNULL(Status, ''0'') in (''1'') ');
|
|||
|
|
SQL.Add('AND MCNO=' + QuotedStr(FMCNo));
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
if ADOQueryTemp.IsEmpty = FALSE then
|
|||
|
|
begin
|
|||
|
|
if ADOQueryTemp.FieldByName('WB_CODE').AsString <> WB_CODE.Text then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><><EFBFBD>ղ<EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>棡', '<27><>ʾ', 0);
|
|||
|
|
exit;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
if SaveData() then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD>', '<27><>ʾ', 0);
|
|||
|
|
ModalResult := 1;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanMachInput.ToolButton2Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
WriteCxGrid(trim(self.Caption) + 'Tv2', Tv2, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanMachInput.WB_CodePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmWBSpecSel := TfrmWBSpecSel.Create(Application);
|
|||
|
|
with frmWBSpecSel do
|
|||
|
|
begin
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
Self.WB_Code.Text := frmWBSpecSel.CDS_1.fieldbyname('WB_Code').AsString;
|
|||
|
|
Self.WB_Name.Text := frmWBSpecSel.CDS_1.fieldbyname('WB_Name').AsString;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
finally
|
|||
|
|
frmWBSpecSel.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
function TfrmTatPlanMachInput.CheckData(): Boolean;
|
|||
|
|
var
|
|||
|
|
mvalue, FReal: Double;
|
|||
|
|
maxConNo: string;
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
if Trim(orderno.Text) = '' then
|
|||
|
|
raise Exception.Create('<27><>֯<EFBFBD><D6AF><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>!');
|
|||
|
|
|
|||
|
|
if Trim(action.Text) = '' then
|
|||
|
|
raise Exception.Create('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD>Ϊ<EFBFBD><CEAA>!');
|
|||
|
|
|
|||
|
|
|
|||
|
|
// if Trim(CYNo.Text) = '' then
|
|||
|
|
// raise Exception.Create('<27><>Ʒ<EFBFBD><C6B7><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>!');
|
|||
|
|
// if Trim(JZPM.Text) = '' then
|
|||
|
|
// raise Exception.Create('<27><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>!');
|
|||
|
|
// if Trim(weimi.Text) = '' then
|
|||
|
|
// raise Exception.Create('γ<>ܲ<EFBFBD><DCB2><EFBFBD>Ϊ<EFBFBD><CEAA>!');
|
|||
|
|
// if Trim(wsspec.Text) = '' then
|
|||
|
|
// raise Exception.Create('γɴ<CEB3><C9B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>!');
|
|||
|
|
// if Trim(pici.Text) = '' then
|
|||
|
|
// raise Exception.Create('<27><><EFBFBD>β<EFBFBD><CEB2><EFBFBD>Ϊ<EFBFBD><CEAA>!');
|
|||
|
|
|
|||
|
|
Result := True;
|
|||
|
|
except
|
|||
|
|
Result := false;
|
|||
|
|
application.MessageBox(PChar(Exception(ExceptObject).Message), '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanMachInput.PMTypePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
var
|
|||
|
|
fsj: string;
|
|||
|
|
FWZ: Integer;
|
|||
|
|
begin
|
|||
|
|
fsj := Trim(TcxButtonEdit(Sender).Hint);
|
|||
|
|
FWZ := Pos('/', fsj);
|
|||
|
|
try
|
|||
|
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
|||
|
|
with frmZDYHelp do
|
|||
|
|
begin
|
|||
|
|
flag := Copy(fsj, 1, FWZ - 1);
|
|||
|
|
flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ);
|
|||
|
|
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
TcxTextEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmZDYHelp.Free;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanMachInput.PMTypePropertiesChange(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if Trim(PMType.text) = '<27>²<EFBFBD><C2B2>Ļ<EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
action.Text := '<27>²<EFBFBD><C2B2>Ļ<EFBFBD>';
|
|||
|
|
action.Enabled := False;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
action.Text := '';
|
|||
|
|
action.Enabled := true;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanMachInput.OrderNoPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmTatPlanSel := TfrmTatPlanSel.Create(Application);
|
|||
|
|
with frmTatPlanSel do
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
Self.OrderNo.Text := frmTatPlanSel.CDS_1.fieldbyname('OrderNo').AsString;
|
|||
|
|
Self.MainID.Text := frmTatPlanSel.CDS_1.fieldbyname('MainID').AsString;
|
|||
|
|
Self.SubID.Text := frmTatPlanSel.CDS_1.fieldbyname('SubID').AsString;
|
|||
|
|
Self.C_Code.Text := frmTatPlanSel.CDS_1.fieldbyname('C_Code').AsString;
|
|||
|
|
Self.C_Name.Text := frmTatPlanSel.CDS_1.fieldbyname('C_Name').AsString;
|
|||
|
|
Self.C_FinishLatitudeDensity.Text := frmTatPlanSel.CDS_1.fieldbyname('C_FinishLatitudeDensity').AsString;
|
|||
|
|
Self.WB_Code.Text := frmTatPlanSel.CDS_1.fieldbyname('WB_Code').AsString;
|
|||
|
|
Self.WB_Name.Text := frmTatPlanSel.CDS_1.fieldbyname('WB_Name').AsString;
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select WB_Code,WB_Name from Bs_Cloth_Info where C_Code =''' + Trim(Self.C_Code.Text) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
// Self.WB_Code.Text := ADOQueryTemp.fieldbyname('WB_Code').AsString;
|
|||
|
|
// Self.WB_Name.Text := ADOQueryTemp.fieldbyname('WB_Name').AsString;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
finally
|
|||
|
|
frmTatPlanSel.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end.
|
|||
|
|
|