1148 lines
35 KiB
ObjectPascal
1148 lines
35 KiB
ObjectPascal
|
|
unit U_TatPlanInPut;
|
|||
|
|
|
|||
|
|
interface
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|||
|
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
|||
|
|
cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
|||
|
|
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, cxMemo,
|
|||
|
|
cxRichEdit, ComCtrls, cxContainer, cxTextEdit, cxMaskEdit, cxButtonEdit,
|
|||
|
|
StdCtrls, ToolWin, DBClient, ADODB, ExtCtrls, BtnEdit, cxDropDownEdit,
|
|||
|
|
StrUtils, cxPC, ShellAPI, cxCalendar, Math, cxLookAndFeels,
|
|||
|
|
cxLookAndFeelPainters, dxBarBuiltInMenu, cxNavigator, dxDateRanges,
|
|||
|
|
U_BaseInput, System.ImageList, Vcl.ImgList, Vcl.Menus, cxCheckBox, dxCore,
|
|||
|
|
cxDateUtils, dxScrollbarAnnotations, cxGridCustomPopupMenu, cxGridPopupMenu,
|
|||
|
|
dxCoreClasses, dxHashUtils, dxSpreadSheetCore, dxSpreadSheetCoreFormulas,
|
|||
|
|
dxSpreadSheetCoreHistory, dxSpreadSheetCoreStyles, dxSpreadSheetCoreStrs,
|
|||
|
|
dxSpreadSheetConditionalFormatting, dxSpreadSheetConditionalFormattingRules,
|
|||
|
|
dxSpreadSheetClasses, dxSpreadSheetContainers, dxSpreadSheetFormulas,
|
|||
|
|
dxSpreadSheetHyperlinks, dxSpreadSheetFunctions, dxSpreadSheetStyles,
|
|||
|
|
dxSpreadSheetGraphics, dxSpreadSheetPrinting, dxSpreadSheetTypes,
|
|||
|
|
dxSpreadSheetUtils, dxSpreadSheetFormattedTextUtils, dxSpreadSheet,
|
|||
|
|
dxSkinsCore, dxSkinsDefaultPainters, cxImageList, dxSkinBasic, dxSkinBlack,
|
|||
|
|
dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkroom,
|
|||
|
|
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
|||
|
|
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
|||
|
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
|||
|
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
|||
|
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
|||
|
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
|||
|
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
|||
|
|
dxSkinOffice2013White, dxSkinOffice2016Colorful, dxSkinOffice2016Dark,
|
|||
|
|
dxSkinOffice2019Black, dxSkinOffice2019Colorful, dxSkinOffice2019DarkGray,
|
|||
|
|
dxSkinOffice2019White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
|||
|
|
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringtime, dxSkinStardust,
|
|||
|
|
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinTheBezier, dxSkinValentine,
|
|||
|
|
dxSkinVisualStudio2013Blue, dxSkinVisualStudio2013Dark,
|
|||
|
|
dxSkinVisualStudio2013Light, dxSkinVS2010, dxSkinWhiteprint, dxSkinWXI,
|
|||
|
|
dxSkinXmas2008Blue;
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
TfrmTatPlanInPut = class(TfrmBaseInput)
|
|||
|
|
ToolBar1: TToolBar;
|
|||
|
|
TBSave: TToolButton;
|
|||
|
|
TBClose: TToolButton;
|
|||
|
|
ScrollBox1: TScrollBox;
|
|||
|
|
Label2: TLabel;
|
|||
|
|
Label3: TLabel;
|
|||
|
|
Label14: TLabel;
|
|||
|
|
ADOQueryTemp: TADOQuery;
|
|||
|
|
ADOQueryCmd: TADOQuery;
|
|||
|
|
Label5: TLabel;
|
|||
|
|
Label8: TLabel;
|
|||
|
|
Label12: TLabel;
|
|||
|
|
OrdPieceLen: TcxTextEdit;
|
|||
|
|
OrdPiece: TcxTextEdit;
|
|||
|
|
Label13: TLabel;
|
|||
|
|
OrdQty: TcxTextEdit;
|
|||
|
|
CDS_2: TClientDataSet;
|
|||
|
|
DS_1: TDataSource;
|
|||
|
|
CDS_1: TClientDataSet;
|
|||
|
|
DS_2: TDataSource;
|
|||
|
|
Label26: TLabel;
|
|||
|
|
Label31: TLabel;
|
|||
|
|
Label47: TLabel;
|
|||
|
|
C_Name: TcxTextEdit;
|
|||
|
|
Label43: TLabel;
|
|||
|
|
lbl2: TLabel;
|
|||
|
|
Saleser: TcxTextEdit;
|
|||
|
|
Label7: TLabel;
|
|||
|
|
OrderNo: TcxTextEdit;
|
|||
|
|
Label4: TLabel;
|
|||
|
|
ToolButton8: TToolButton;
|
|||
|
|
Label35: TLabel;
|
|||
|
|
ConMId: TcxTextEdit;
|
|||
|
|
ConSId: TcxTextEdit;
|
|||
|
|
cxPageControl3: TcxPageControl;
|
|||
|
|
cxTabSheet1: TcxTabSheet;
|
|||
|
|
GroupBox1: TGroupBox;
|
|||
|
|
Y_Note_PLJ: TMemo;
|
|||
|
|
cxTabSheet2: TcxTabSheet;
|
|||
|
|
GroupBox2: TGroupBox;
|
|||
|
|
Y_Note_PLW: TMemo;
|
|||
|
|
cxTabSheet3: TcxTabSheet;
|
|||
|
|
cxGrid4: TcxGrid;
|
|||
|
|
TV4: TcxGridDBTableView;
|
|||
|
|
TV4Column1: TcxGridDBColumn;
|
|||
|
|
cxGridDBColumn16: TcxGridDBColumn;
|
|||
|
|
cxGridDBColumn17: TcxGridDBColumn;
|
|||
|
|
cxGridLevel5: TcxGridLevel;
|
|||
|
|
Panel1: TPanel;
|
|||
|
|
cxPageControl2: TcxPageControl;
|
|||
|
|
Panel2: TPanel;
|
|||
|
|
cxPageControl1: TcxPageControl;
|
|||
|
|
DS_QZ: TDataSource;
|
|||
|
|
CDS_QZ: TClientDataSet;
|
|||
|
|
ThroughHealdOrder: TcxMemo;
|
|||
|
|
C_FinishLatitudeDensity: TcxTextEdit;
|
|||
|
|
C_TestGramWeight: TcxTextEdit;
|
|||
|
|
C_GramWeight: TcxTextEdit;
|
|||
|
|
C_ReedNo: TcxTextEdit;
|
|||
|
|
C_ReedWidth: TcxTextEdit;
|
|||
|
|
C_YarnQty: TcxTextEdit;
|
|||
|
|
LoomType: TcxTextEdit;
|
|||
|
|
OrdNote: TcxMemo;
|
|||
|
|
Label10: TLabel;
|
|||
|
|
Label9: TLabel;
|
|||
|
|
Label6: TLabel;
|
|||
|
|
Label11: TLabel;
|
|||
|
|
Label15: TLabel;
|
|||
|
|
Label16: TLabel;
|
|||
|
|
Label17: TLabel;
|
|||
|
|
Label55: TLabel;
|
|||
|
|
Label18: TLabel;
|
|||
|
|
OurCoName: TcxButtonEdit;
|
|||
|
|
FtyCoName: TcxButtonEdit;
|
|||
|
|
OrdType: TcxComboBox;
|
|||
|
|
DlyDate: TcxDateEdit;
|
|||
|
|
OrdDate: TcxDateEdit;
|
|||
|
|
ConNo: TcxButtonEdit;
|
|||
|
|
CustName: TcxButtonEdit;
|
|||
|
|
C_Spec: TcxMemo;
|
|||
|
|
C_Code: TcxButtonEdit;
|
|||
|
|
cxGrid1: TcxGrid;
|
|||
|
|
TV1: TcxGridDBTableView;
|
|||
|
|
TV1Column7: TcxGridDBColumn;
|
|||
|
|
cxGridDBColumn3: TcxGridDBColumn;
|
|||
|
|
cxGridDBColumn4: TcxGridDBColumn;
|
|||
|
|
cxGridDBColumn5: TcxGridDBColumn;
|
|||
|
|
cxGridDBColumn8: TcxGridDBColumn;
|
|||
|
|
TV1Column1: TcxGridDBColumn;
|
|||
|
|
TV1Column2: TcxGridDBColumn;
|
|||
|
|
TV1Column3: TcxGridDBColumn;
|
|||
|
|
TV1Column4: TcxGridDBColumn;
|
|||
|
|
TV1Column5: TcxGridDBColumn;
|
|||
|
|
TV1Column10: TcxGridDBColumn;
|
|||
|
|
TV1Column6: TcxGridDBColumn;
|
|||
|
|
TV1Column8: TcxGridDBColumn;
|
|||
|
|
TV1Column9: TcxGridDBColumn;
|
|||
|
|
cxGridLevel2: TcxGridLevel;
|
|||
|
|
cxGrid2: TcxGrid;
|
|||
|
|
Tv2: TcxGridDBTableView;
|
|||
|
|
Tv2Column7: TcxGridDBColumn;
|
|||
|
|
v2Column10: TcxGridDBColumn;
|
|||
|
|
cxGridDBColumn1: TcxGridDBColumn;
|
|||
|
|
v2Column2: TcxGridDBColumn;
|
|||
|
|
v2Column6: TcxGridDBColumn;
|
|||
|
|
Tv2Column1: TcxGridDBColumn;
|
|||
|
|
Tv2Column2: TcxGridDBColumn;
|
|||
|
|
Tv2Column3: TcxGridDBColumn;
|
|||
|
|
Tv2Column4: TcxGridDBColumn;
|
|||
|
|
Tv2Column5: TcxGridDBColumn;
|
|||
|
|
Tv2Column10: TcxGridDBColumn;
|
|||
|
|
Tv2Column6: TcxGridDBColumn;
|
|||
|
|
Tv2Column8: TcxGridDBColumn;
|
|||
|
|
Tv2Column9: TcxGridDBColumn;
|
|||
|
|
cxGridLevel1: TcxGridLevel;
|
|||
|
|
GPM_1: TcxGridPopupMenu;
|
|||
|
|
GPM_2: TcxGridPopupMenu;
|
|||
|
|
cxTabSheet4: TcxTabSheet;
|
|||
|
|
CZF: TMemo;
|
|||
|
|
cxTabSheet5: TcxTabSheet;
|
|||
|
|
CKF: TMemo;
|
|||
|
|
TV1Column11: TcxGridDBColumn;
|
|||
|
|
TV1Column12: TcxGridDBColumn;
|
|||
|
|
Tv2Column11: TcxGridDBColumn;
|
|||
|
|
Tv2Column12: TcxGridDBColumn;
|
|||
|
|
Label1: TLabel;
|
|||
|
|
PBQty: TcxTextEdit;
|
|||
|
|
Label19: TLabel;
|
|||
|
|
DDQty: TcxTextEdit;
|
|||
|
|
Label20: TLabel;
|
|||
|
|
C_Width: TcxTextEdit;
|
|||
|
|
Label21: TLabel;
|
|||
|
|
C_FinishWidth: TcxTextEdit;
|
|||
|
|
Label22: TLabel;
|
|||
|
|
BBNo: TcxTextEdit;
|
|||
|
|
Label23: TLabel;
|
|||
|
|
C_Color: TcxTextEdit;
|
|||
|
|
QZF: TMemo;
|
|||
|
|
procedure TBCloseClick(Sender: TObject);
|
|||
|
|
procedure FormShow(Sender: TObject);
|
|||
|
|
procedure TBSaveClick(Sender: TObject);
|
|||
|
|
procedure cxGridDBColumn1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
procedure v2Column11PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
procedure OrdPieceLenChange(Sender: TObject);
|
|||
|
|
procedure OrdPieceChange(Sender: TObject);
|
|||
|
|
procedure C_CodeKeyPress(Sender: TObject; var Key: Char);
|
|||
|
|
procedure ConNoKeyPress(Sender: TObject; var Key: Char);
|
|||
|
|
procedure MCTypeBtnUpClick(Sender: TObject);
|
|||
|
|
procedure cxGridDBColumn4PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
|
|||
|
|
procedure ToolButton7Click(Sender: TObject);
|
|||
|
|
procedure ToolButton9Click(Sender: TObject);
|
|||
|
|
procedure FormCreate(Sender: TObject);
|
|||
|
|
procedure OurCoNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
procedure OurCoNameDblClick(Sender: TObject);
|
|||
|
|
procedure FtyCoNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
procedure CustNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
procedure C_CodePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
procedure ConNoPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
procedure ToolButton8Click(Sender: TObject);
|
|||
|
|
procedure OrdPiecePropertiesEditValueChanged(Sender: TObject);
|
|||
|
|
private
|
|||
|
|
FXS, FGridFlag: Integer;
|
|||
|
|
procedure InitData();
|
|||
|
|
procedure Initexcel();
|
|||
|
|
procedure CALCYarnQty();
|
|||
|
|
function SaveData(): Boolean;
|
|||
|
|
procedure InitClothYarn(MC_Code: string);
|
|||
|
|
{ Private declarations }
|
|||
|
|
public
|
|||
|
|
PState, FCopyInt: Integer;
|
|||
|
|
FConNo, FMainId, FSubId: string;
|
|||
|
|
{ Public declarations }
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
var
|
|||
|
|
frmTatPlanInPut: TfrmTatPlanInPut;
|
|||
|
|
newh: hwnd;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
U_DataLink, U_ZDYHelp, U_RTFun, U_TatClothInfoSel, U_CompanySel, U_YarnInfoSel,
|
|||
|
|
U_TradeSalesContractSel;
|
|||
|
|
|
|||
|
|
{$R *.dfm}
|
|||
|
|
procedure TfrmTatPlanInPut.InitClothYarn(MC_Code: string);
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select A.* from Bs_Cloth_Info A');
|
|||
|
|
sql.Add(' where A.C_Code=''' + Trim(MC_Code) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
Self.C_Code.Text := ADOQueryTemp.fieldbyname('C_Code').AsString;
|
|||
|
|
Self.C_Name.Text := ADOQueryTemp.fieldbyname('C_Name').AsString;
|
|||
|
|
Self.C_Spec.Text := ADOQueryTemp.fieldbyname('C_Spec').AsString;
|
|||
|
|
Self.C_FinishLatitudeDensity.Text := ADOQueryTemp.fieldbyname('C_FinishLatitudeDensity').AsString;
|
|||
|
|
|
|||
|
|
Self.C_GramWeight.Text := ADOQueryTemp.fieldbyname('C_GramWeight').AsString;
|
|||
|
|
Self.C_ReedNo.Text := ADOQueryTemp.fieldbyname('C_ReedNo').AsString;
|
|||
|
|
Self.C_YarnQty.Text := ADOQueryTemp.fieldbyname('C_YarnQty').AsString;
|
|||
|
|
Self.C_TestGramWeight.Text := ADOQueryTemp.fieldbyname('C_TestGramWeight').AsString;
|
|||
|
|
Self.LoomType.Text := ADOQueryTemp.fieldbyname('LoomType').AsString;
|
|||
|
|
Self.C_ReedWidth.Text := ADOQueryTemp.fieldbyname('C_ReedWidth').AsString;
|
|||
|
|
Self.BBNO.Text := ADOQueryTemp.fieldbyname('BBNO').AsString;
|
|||
|
|
Self.C_Color.Text := ADOQueryTemp.fieldbyname('C_Color').AsString;
|
|||
|
|
|
|||
|
|
Self.QZF.Text := ADOQueryTemp.fieldbyname('QZF').AsString;
|
|||
|
|
Self.CZF.Text := ADOQueryTemp.fieldbyname('CZF').AsString;
|
|||
|
|
Self.CKF.Text := ADOQueryTemp.fieldbyname('CKF').AsString;
|
|||
|
|
Self.Y_Note_PLJ.Text := ADOQueryTemp.fieldbyname('Y_Note_PLJ').AsString;
|
|||
|
|
Self.Y_Note_PLW.Text := ADOQueryTemp.fieldbyname('Y_Note_PLW').AsString;
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select A.*,MainId=cast('''' as varchar(30)),SubId=cast('''' as varchar(30)) from BS_Cloth_Yarn A inner join Bs_Cloth_Info B on A.BCIID=B.BCIID');
|
|||
|
|
sql.Add(' where A.YRType=''<27><>˿'' and B.C_Code=''' + Trim(MC_Code) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
SCreateCDS(ADOQueryTemp, CDS_1);
|
|||
|
|
SInitCDSData(ADOQueryTemp, CDS_1);
|
|||
|
|
ClearCDSColumn(CDS_1, ['YRId', 'SubId', 'MainId']);
|
|||
|
|
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select A.*,MainId=cast('''' as varchar(30)),SubId=cast('''' as varchar(30)) from BS_Cloth_Yarn A inner join Bs_Cloth_Info B on A.BCIID=B.BCIID');
|
|||
|
|
sql.Add(' where A.YRType=''γ˿'' and B.C_Code=''' + Trim(MC_Code) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
SCreateCDS(ADOQueryTemp, CDS_2);
|
|||
|
|
SInitCDSData(ADOQueryTemp, CDS_2);
|
|||
|
|
ClearCDSColumn(CDS_2, ['YRId', 'SubId', 'MainId']);
|
|||
|
|
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select A.*,MainId=cast('''' as varchar(30)),SubId=cast('''' as varchar(30)) from BS_Cloth_QZ A inner join Bs_Cloth_Info B on A.BCIID=B.BCIID');
|
|||
|
|
sql.Add(' where B.C_Code=''' + Trim(MC_Code) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
SCreateCDS(ADOQueryTemp, CDS_QZ);
|
|||
|
|
SInitCDSData(ADOQueryTemp, CDS_QZ);
|
|||
|
|
ClearCDSColumn(CDS_QZ, ['QZID', 'SubId', 'MainId']);
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.CALCYarnQty();
|
|||
|
|
var
|
|||
|
|
MYarnQty, MOrdQty, MWidth, MMachLatitudeDensity: Double;
|
|||
|
|
begin
|
|||
|
|
// MYarnQty := STRTOFLOATDEF(C_YarnQty.Text, 0);
|
|||
|
|
// MOrdQty := STRTOFLOATDEF(OrdQty.Text, 0);
|
|||
|
|
// MWidth := STRTOFLOATDEF(StringReplace(C_Width.Text, 'CM', '', [rfReplaceAll, rfIgnoreCase]), 0);
|
|||
|
|
// MMachLatitudeDensity := STRTOFLOATDEF(C_MachLatitudeDensity.Text, 0);
|
|||
|
|
// with CDS_1 do
|
|||
|
|
// begin
|
|||
|
|
// DisableControls;
|
|||
|
|
// First;
|
|||
|
|
// while not Eof do
|
|||
|
|
// begin
|
|||
|
|
// Edit;
|
|||
|
|
// FieldByName('Y_Qty').Value := MYarnQty * MOrdQty * FieldByName('Y_Ratio').AsFloat / 100 / 9000 * FieldByName('Denier').AsFloat / 1000;
|
|||
|
|
// Next;
|
|||
|
|
// end;
|
|||
|
|
// EnableControls;
|
|||
|
|
// end;
|
|||
|
|
//
|
|||
|
|
// with CDS_2 do
|
|||
|
|
// begin
|
|||
|
|
// DisableControls;
|
|||
|
|
// First;
|
|||
|
|
// while not Eof do
|
|||
|
|
// begin
|
|||
|
|
// Edit;
|
|||
|
|
// FieldByName('Y_Qty').Value := MMachLatitudeDensity * MOrdQty * MWidth * FieldByName('Y_Ratio').AsFloat / 100 / 9000 * FieldByName('Denier').AsFloat / 1000;
|
|||
|
|
// Next;
|
|||
|
|
// end;
|
|||
|
|
// EnableControls;
|
|||
|
|
// end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.TBCloseClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
ModalResult := 1;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.InitData();
|
|||
|
|
var
|
|||
|
|
PBNO, PBFlag: string;
|
|||
|
|
begin
|
|||
|
|
if PState = 1 then
|
|||
|
|
begin
|
|||
|
|
ConNo.enabled := false;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
SQL.Clear;
|
|||
|
|
sql.Add('select * from Tat_Plan_Main A where A.MainId=''' + Trim(FMainId) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
SCSHData(ADOQueryTemp, ScrollBox1, 0);
|
|||
|
|
|
|||
|
|
// QZF.Text := Trim(ADOQueryTemp.FieldByName('QZF').AsString);
|
|||
|
|
CZF.Text := Trim(ADOQueryTemp.FieldByName('CZF').AsString);
|
|||
|
|
CKF.Text := Trim(ADOQueryTemp.FieldByName('CKF').AsString);
|
|||
|
|
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
SQL.Clear;
|
|||
|
|
sql.Add('select * from Tat_Plan_Sub A where A.MainId=''' + Trim(FMainId) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
SCSHData(ADOQueryTemp, ScrollBox1, 2);
|
|||
|
|
Y_Note_PLJ.Text := ADOQueryTemp.FieldByName('Y_Note_PLJ').AsString;
|
|||
|
|
|
|||
|
|
Y_Note_PLW.Text := ADOQueryTemp.FieldByName('Y_Note_PLW').AsString;
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select A.* from Tat_Plan_Yarn A ');
|
|||
|
|
sql.Add(' where YRType=''<27><>˿'' and A.MainId=''' + Trim(FMainId) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
SCreateCDS(ADOQueryTemp, CDS_1);
|
|||
|
|
SInitCDSData(ADOQueryTemp, CDS_1);
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select A.* from Tat_Plan_Yarn A ');
|
|||
|
|
sql.Add(' where YRType=''γ˿'' and A.MainId=''' + Trim(FMainId) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
SCreateCDS(ADOQueryTemp, CDS_2);
|
|||
|
|
SInitCDSData(ADOQueryTemp, CDS_2);
|
|||
|
|
|
|||
|
|
/////////////////ˢ<><CBA2><EFBFBD><EFBFBD><EFBFBD>۹<EFBFBD><DBB9>յ<EFBFBD><D5B5><EFBFBD>Ϣ/////////////////////////
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select * from Tat_Plan_QZ where MainId=''' + Trim(FMainId) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
SCreateCDS(ADOQueryTemp, CDS_QZ);
|
|||
|
|
SInitCDSData(ADOQueryTemp, CDS_QZ);
|
|||
|
|
/////////////////ˢ<><CBA2><EFBFBD><EFBFBD><EFBFBD>۹<EFBFBD><DBB9>յ<EFBFBD><D5B5><EFBFBD>Ϣ/////////////////////////
|
|||
|
|
///
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.Initexcel();
|
|||
|
|
var
|
|||
|
|
myStream: TMemoryStream;
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
// myStream := TMemoryStream.Create();
|
|||
|
|
//
|
|||
|
|
// with ADOQueryTemp do
|
|||
|
|
// begin
|
|||
|
|
// close;
|
|||
|
|
// sql.Clear;
|
|||
|
|
// sql.Add(' select * from BS_Cloth_Info_Excel A INNER JOIN Bs_Cloth_Info B on A.BCIID =B.BCIID where B.C_Code=''' + Trim(C_Code.text) + '''');
|
|||
|
|
// open;
|
|||
|
|
// end;
|
|||
|
|
//
|
|||
|
|
// if not ADOQueryTemp.IsEmpty then
|
|||
|
|
// begin
|
|||
|
|
//
|
|||
|
|
// TBlobField(ADOQueryTemp.FieldByName('ExcelData')).SaveToStream(myStream);
|
|||
|
|
// myStream.Position := 0;
|
|||
|
|
// dxSpreadSheet1.LoadFromStream(myStream);
|
|||
|
|
// end
|
|||
|
|
// else
|
|||
|
|
// begin
|
|||
|
|
//// dxSpreadSheet1.ClearAll;
|
|||
|
|
// end;
|
|||
|
|
//
|
|||
|
|
// myStream.Free;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.FormCreate(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
FDate: TDateTime;
|
|||
|
|
begin
|
|||
|
|
FDate := SGetServerDateTime(ADOQueryTemp);
|
|||
|
|
OrdDate.Date := FDate;
|
|||
|
|
DlyDate.Date := FDate;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.FormShow(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
ReadCxGrid('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD>¼<EFBFBD><C2BC>1', Tv1, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
ReadCxGrid('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD>¼<EFBFBD><C2BC>2', Tv2, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
InitData();
|
|||
|
|
// Initexcel();
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.FtyCoNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmCompanySel := TfrmCompanySel.Create(Application);
|
|||
|
|
with frmCompanySel do
|
|||
|
|
begin
|
|||
|
|
FCoType := '<27><>Ӧ<EFBFBD><D3A6>';
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
FtyCoName.Properties.LookupItems.Text := Trim(CDS_1.fieldbyname('CoCode').AsString);
|
|||
|
|
FtyCoName.Text := Trim(CDS_1.fieldbyname('CoAbbrName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmCompanySel.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
function TfrmTatPlanInPut.SaveData(): Boolean;
|
|||
|
|
var
|
|||
|
|
maxno, maxsubno, maxpbno, maxpzno, maxsjno, maxQZID: string;
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
if Trim(FMainId) = '' then
|
|||
|
|
begin
|
|||
|
|
if GetLSNo(ADOQueryCmd, maxno, 'SZ', 'Tat_Plan_Main', 4, 1) = False then
|
|||
|
|
raise Exception.Create('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE><EFBFBD>쳣<EFBFBD><ECB3A3>');
|
|||
|
|
|
|||
|
|
OrderNo.Text := maxno;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
maxno := Trim(FMainId);
|
|||
|
|
end;
|
|||
|
|
////////////////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //////////////////////////
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
SQL.Add('select * from Tat_Plan_Main where MainId=''' + Trim(FMainId) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
if Trim(FMainId) = '' then
|
|||
|
|
begin
|
|||
|
|
Append;
|
|||
|
|
FieldByName('Filler').Value := Trim(DName);
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
Edit;
|
|||
|
|
FieldByName('Editer').Value := Trim(DName);
|
|||
|
|
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
|
|||
|
|
end;
|
|||
|
|
FieldByName('MainId').Value := Trim(maxno);
|
|||
|
|
// FieldByName('QZF').Value := Trim(QZF.text);
|
|||
|
|
FieldByName('CZF').Value := Trim(CZF.text);
|
|||
|
|
FieldByName('CKF').Value := Trim(CKF.text);
|
|||
|
|
RTSetsavedata(ADOQueryCmd, 'Tat_Plan_Main', ScrollBox1, 0);
|
|||
|
|
Post;
|
|||
|
|
end;
|
|||
|
|
////////////////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //////////////////////////
|
|||
|
|
///
|
|||
|
|
////////////////////////// <20><><EFBFBD><EFBFBD><EFBFBD>ӱ<EFBFBD> //////////////////////////
|
|||
|
|
if Trim(FSubId) = '' then
|
|||
|
|
begin
|
|||
|
|
if GetLSNo(ADOQueryTemp, maxsubno, 'SZS', 'Tat_Plan_Sub', 4, 1) = False then
|
|||
|
|
raise Exception.Create('ȡ<><C8A1><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>');
|
|||
|
|
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
maxsubno := Trim(FSubId);
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
SQL.Clear;
|
|||
|
|
sql.Add('select * from Tat_Plan_Sub where ');
|
|||
|
|
sql.Add(' SubId=''' + Trim(maxsubno) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
if Trim(FSubId) = '' then
|
|||
|
|
Append
|
|||
|
|
else
|
|||
|
|
Edit;
|
|||
|
|
FieldByName('MainId').Value := Trim(maxno);
|
|||
|
|
FieldByName('SubId').Value := Trim(maxsubno);
|
|||
|
|
|
|||
|
|
RTSetsavedata(ADOQueryCmd, 'Tat_Plan_Sub', ScrollBox1, 2);
|
|||
|
|
FieldByName('Y_Note_PLJ').Value := Trim(Y_Note_PLJ.Text);
|
|||
|
|
|
|||
|
|
FieldByName('Y_Note_PLW').Value := Trim(Y_Note_PLW.Text);
|
|||
|
|
|
|||
|
|
Post;
|
|||
|
|
end;
|
|||
|
|
////////////////////////// <20><><EFBFBD><EFBFBD><EFBFBD>ӱ<EFBFBD> //////////////////////////
|
|||
|
|
////////////////////////// <20><><EFBFBD>澭˿<E6BEAD><CBBF><EFBFBD>ȱ<EFBFBD> //////////////////////////
|
|||
|
|
with CDS_1 do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while not Eof do
|
|||
|
|
begin
|
|||
|
|
if Trim(CDS_1.fieldbyname('YRId').AsString) = '' then
|
|||
|
|
begin
|
|||
|
|
if GetLSNo(ADOQueryTemp, maxpbno, 'RJ', 'Tat_Plan_Yarn', 4, 1) = False then
|
|||
|
|
raise Exception.Create('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>');
|
|||
|
|
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
maxpbno := Trim(CDS_1.fieldbyname('YRId').AsString);
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
SQL.Clear;
|
|||
|
|
sql.Add('select * from Tat_Plan_Yarn where ');
|
|||
|
|
sql.Add(' YRId=''' + Trim(maxpbno) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
if Trim(CDS_1.fieldbyname('YRId').AsString) = '' 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('YRType').Value := '<27><>˿';
|
|||
|
|
FieldByName('MainId').Value := Trim(maxno);
|
|||
|
|
FieldByName('SubId').Value := Trim(maxsubno);
|
|||
|
|
FieldByName('YRId').Value := Trim(maxpbno);
|
|||
|
|
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_1, 'Tat_Plan_Yarn', 0);
|
|||
|
|
Post;
|
|||
|
|
end;
|
|||
|
|
CDS_1.Edit;
|
|||
|
|
CDS_1.FieldByName('SubId').Value := Trim(maxsubno);
|
|||
|
|
CDS_1.FieldByName('MainId').Value := Trim(maxno);
|
|||
|
|
CDS_1.FieldByName('YRId').Value := Trim(maxpbno);
|
|||
|
|
|
|||
|
|
Next;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
////////////////////////// <20><><EFBFBD>澭˿<E6BEAD><CBBF><EFBFBD>ȱ<EFBFBD> //////////////////////////
|
|||
|
|
//////////////////////
|
|||
|
|
////////////////////////// <20><><EFBFBD><EFBFBD>γ˿<CEB3><CBBF><EFBFBD>ȱ<EFBFBD> //////////////////////////
|
|||
|
|
with CDS_2 do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while not Eof do
|
|||
|
|
begin
|
|||
|
|
if Trim(CDS_2.fieldbyname('YRId').AsString) = '' then
|
|||
|
|
begin
|
|||
|
|
if GetLSNo(ADOQueryTemp, maxpbno, 'RJ', 'Tat_Plan_Yarn', 4, 1) = False then
|
|||
|
|
raise Exception.Create('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>');
|
|||
|
|
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
maxpbno := Trim(CDS_2.fieldbyname('YRId').AsString);
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
SQL.Clear;
|
|||
|
|
sql.Add('select * from Tat_Plan_Yarn where ');
|
|||
|
|
sql.Add(' YRId=''' + Trim(maxpbno) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
if Trim(CDS_2.fieldbyname('YRId').AsString) = '' 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('YRType').Value := 'γ˿';
|
|||
|
|
FieldByName('MainId').Value := Trim(maxno);
|
|||
|
|
FieldByName('SubId').Value := Trim(maxsubno);
|
|||
|
|
FieldByName('YRId').Value := Trim(maxpbno);
|
|||
|
|
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_2, 'Tat_Plan_Yarn', 0);
|
|||
|
|
Post;
|
|||
|
|
end;
|
|||
|
|
CDS_2.Edit;
|
|||
|
|
CDS_2.FieldByName('SubId').Value := Trim(maxsubno);
|
|||
|
|
CDS_2.FieldByName('MainId').Value := Trim(maxno);
|
|||
|
|
CDS_2.FieldByName('YRId').Value := Trim(maxpbno);
|
|||
|
|
|
|||
|
|
Next;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
////////////////////////// <20><><EFBFBD><EFBFBD>γ˿<CEB3><CBBF><EFBFBD>ȱ<EFBFBD> //////////////////////////
|
|||
|
|
//////////////////////
|
|||
|
|
////////////////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //////////////////////////
|
|||
|
|
with CDS_QZ do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while not Eof do
|
|||
|
|
begin
|
|||
|
|
if Trim(CDS_QZ.fieldbyname('QZID').AsString) = '' then
|
|||
|
|
begin
|
|||
|
|
if GetLSNo(ADOQueryTemp, maxQZID, 'QZ', 'Tat_Plan_QZ', 4, 1) = False then
|
|||
|
|
raise Exception.Create('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>');
|
|||
|
|
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
maxQZID := Trim(CDS_QZ.fieldbyname('QZID').AsString);
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
SQL.Clear;
|
|||
|
|
sql.Add('select * from Tat_Plan_QZ where ');
|
|||
|
|
sql.Add(' QZID=''' + Trim(maxQZID) + '''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
if Trim(CDS_QZ.fieldbyname('QZID').AsString) = '' 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('MainId').Value := Trim(maxno);
|
|||
|
|
FieldByName('SubId').Value := Trim(maxsubno);
|
|||
|
|
FieldByName('QZID').Value := Trim(maxQZID);
|
|||
|
|
RTSetSaveDataCDS(ADOQueryCmd, Tv4, CDS_QZ, 'Tat_Plan_QZ', 0);
|
|||
|
|
Post;
|
|||
|
|
end;
|
|||
|
|
CDS_QZ.Edit;
|
|||
|
|
CDS_QZ.FieldByName('SubId').Value := Trim(maxsubno);
|
|||
|
|
CDS_QZ.FieldByName('MainId').Value := Trim(maxno);
|
|||
|
|
CDS_QZ.FieldByName('QZID').Value := Trim(maxQZID);
|
|||
|
|
|
|||
|
|
Next;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
////////////////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //////////////////////////
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
FMainId := Trim(maxno);
|
|||
|
|
FSubId := Trim(maxsubno);
|
|||
|
|
Result := True;
|
|||
|
|
except
|
|||
|
|
Result := False;
|
|||
|
|
CDS_1.EnableControls;
|
|||
|
|
CDS_2.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
application.MessageBox(PChar(Exception(ExceptObject).Message), '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.TBSaveClick(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
FReal: Double;
|
|||
|
|
maxConNo: string;
|
|||
|
|
begin
|
|||
|
|
OrdDate.SetFocus;
|
|||
|
|
CALCYarnQty();
|
|||
|
|
|
|||
|
|
if Trim(CustName.Text) = '' then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
if Trim(OrdType.Text) = '' then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD>Ϊ<EFBFBD><CEAA>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
if Trim(C_Name.Text) = '' then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><>Ʒ<EFBFBD><C6B7><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Trim(C_Code.Text) = '' then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><>Ʒ<EFBFBD><C6B7><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
if Trim(C_Width.Text) = '' then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27>ϻ<EFBFBD><CFBB>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
if Trim(OrdQty.Text) = '' then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Trim(OrdPieceLen.Text) = '' then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('ƥ<><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Trim(OrdPiece.Text) = '' then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('ƥ<><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
if TryStrToFloat(OrdQty.Text, FReal) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if TryStrToFloat(OrdPiecelen.Text, FReal) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('ƥ<><C6A5><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if TryStrToFloat(OrdPiece.Text, FReal) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('ƥ<><C6A5><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
if SaveData() then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD>', '<27><>ʾ', 0);
|
|||
|
|
ModalResult := 1;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.ToolButton7Click(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
i, j: Integer;
|
|||
|
|
begin
|
|||
|
|
for j := 0 to 5 do
|
|||
|
|
begin
|
|||
|
|
i := CDS_QZ.RecordCount;
|
|||
|
|
i := i + 1;
|
|||
|
|
with CDS_QZ do
|
|||
|
|
begin
|
|||
|
|
Append;
|
|||
|
|
FieldByName('SSEL').Value := FALSE;
|
|||
|
|
FieldByName('XuNO').Value := i;
|
|||
|
|
Post;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.ToolButton8Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
WriteCxGrid('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD>¼<EFBFBD><C2BC>1', Tv1, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
WriteCxGrid('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD>¼<EFBFBD><C2BC>2', Tv2, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.ToolButton9Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_QZ.IsEmpty then
|
|||
|
|
exit;
|
|||
|
|
if CDS_QZ.Locate('ssel', True, []) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϻ<EFBFBD><CFBA><EFBFBD><EFBFBD>ݲ<EFBFBD><DDB2>ָܻ<DCBB><D6B8><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
CDS_QZ.DisableControls;
|
|||
|
|
with CDS_QZ do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while not Eof do
|
|||
|
|
begin
|
|||
|
|
if CDS_QZ.FieldByName('SSel').AsBoolean = True then
|
|||
|
|
begin
|
|||
|
|
if Trim(CDS_QZ.fieldbyname('QZID').AsString) <> '' then
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('delete PD_Plan_QZ where QZID=''' + Trim(CDS_QZ.fieldbyname('QZID').AsString) + '''');
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
CDS_QZ.Delete;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
Next;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
CDS_QZ.EnableControls;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.cxGridDBColumn1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmYarnInfoSel := TfrmYarnInfoSel.Create(Application);
|
|||
|
|
with frmYarnInfoSel do
|
|||
|
|
begin
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
with self.CDS_2 do
|
|||
|
|
begin
|
|||
|
|
Edit;
|
|||
|
|
FieldByName('Brand').Value := frmYarnInfoSel.CDS_1.fieldbyname('Brand').Value;
|
|||
|
|
FieldByName('Y_Code').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Code').Value;
|
|||
|
|
FieldByName('Y_Name').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Name').Value;
|
|||
|
|
FieldByName('Y_Spec').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Spec').Value;
|
|||
|
|
FieldByName('Y_Color').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Color').Value;
|
|||
|
|
FieldByName('Denier').Value := frmYarnInfoSel.CDS_1.fieldbyname('Denier').Value;
|
|||
|
|
Post;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmYarnInfoSel.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.cxGridDBColumn4PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmYarnInfoSel := TfrmYarnInfoSel.Create(Application);
|
|||
|
|
with frmYarnInfoSel do
|
|||
|
|
begin
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
with self.CDS_1 do
|
|||
|
|
begin
|
|||
|
|
Append;
|
|||
|
|
FieldByName('Brand').Value := frmYarnInfoSel.CDS_1.fieldbyname('Brand').Value;
|
|||
|
|
FieldByName('Y_Code').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Code').Value;
|
|||
|
|
FieldByName('Y_Name').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Name').Value;
|
|||
|
|
FieldByName('Y_Spec').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Spec').Value;
|
|||
|
|
FieldByName('Y_Color').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Color').Value;
|
|||
|
|
FieldByName('Denier').Value := frmYarnInfoSel.CDS_1.fieldbyname('Denier').Value;
|
|||
|
|
|
|||
|
|
Post;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmYarnInfoSel.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.v2Column11PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmCompanySel := TfrmCompanySel.Create(Application);
|
|||
|
|
with frmCompanySel do
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
with Self.CDS_1 do
|
|||
|
|
begin
|
|||
|
|
Edit;
|
|||
|
|
FieldByName('GYSName').Value := Trim(CDS_1.fieldbyname('CoName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmCompanySel.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.OrdPieceLenChange(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
FOrdQty, FOrdPieceLen: Double;
|
|||
|
|
begin
|
|||
|
|
FOrdQty := StrToFloatDef(OrdQty.Text, 0);
|
|||
|
|
FOrdPieceLen := StrToFloatDef(OrdPieceLen.Text, 0);
|
|||
|
|
if FOrdPieceLen > 0 then
|
|||
|
|
OrdPiece.Text := IntToStr(Ceil(FOrdQty / FOrdPieceLen));
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.OrdPiecePropertiesEditValueChanged(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
OrdQty.text := floattostr(strtofloatdef(OrdPiece.text, 0) * strtofloatdef(OrdPieceLen.text, 0));
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.OurCoNameDblClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
TcxButtonEdit(Sender).Properties.LookupItems.Text := '';
|
|||
|
|
TcxButtonEdit(Sender).Text := '';
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.OurCoNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmCompanySel := TfrmCompanySel.Create(Application);
|
|||
|
|
with frmCompanySel do
|
|||
|
|
begin
|
|||
|
|
FCoType := '<27><>˾';
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
OurCoName.Properties.LookupItems.Text := Trim(CDS_1.fieldbyname('CoCode').AsString);
|
|||
|
|
OurCoName.Text := Trim(CDS_1.fieldbyname('CoAbbrName').AsString);
|
|||
|
|
FtyCoName.Properties.LookupItems.Text := Trim(CDS_1.fieldbyname('CoCode').AsString);
|
|||
|
|
FtyCoName.Text := Trim(CDS_1.fieldbyname('CoAbbrName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmCompanySel.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.OrdPieceChange(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
FOrdQty, FOrdPieceLen, FOrdPiece: Double;
|
|||
|
|
begin
|
|||
|
|
FOrdPieceLen := StrToFloatDef(OrdPieceLen.Text, 0);
|
|||
|
|
FOrdPiece := StrToFloatDef(OrdPiece.Text, 0);
|
|||
|
|
if FOrdPiece > 0 then
|
|||
|
|
OrdQty.Text := FloatToStr(FOrdPieceLen * FOrdPiece)
|
|||
|
|
else
|
|||
|
|
OrdQty.Text := '0';
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.C_CodeKeyPress(Sender: TObject; var Key: Char);
|
|||
|
|
begin
|
|||
|
|
if Key = #13 then
|
|||
|
|
begin
|
|||
|
|
Key := #0;
|
|||
|
|
SelectNext(ActiveControl as TWinControl, True, True);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.C_CodePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmTatClothInfoSel := TfrmTatClothInfoSel.Create(Application);
|
|||
|
|
with frmTatClothInfoSel do
|
|||
|
|
begin
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
InitClothYarn(frmTatClothInfoSel.CDS_1.fieldbyname('C_Code').AsString);
|
|||
|
|
Initexcel();
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmTatClothInfoSel.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.Edit1KeyPress(Sender: TObject; var Key: Char);
|
|||
|
|
var
|
|||
|
|
i, j: Integer;
|
|||
|
|
begin
|
|||
|
|
// if Key = #13 then
|
|||
|
|
// begin
|
|||
|
|
//
|
|||
|
|
// if Edit1.Text <> '' then
|
|||
|
|
// begin
|
|||
|
|
// i := CDS_QZ.RecordCount;
|
|||
|
|
// i := i + 1;
|
|||
|
|
// with CDS_QZ do
|
|||
|
|
// begin
|
|||
|
|
// Append;
|
|||
|
|
// FieldByName('SSEL').Value := FALSE;
|
|||
|
|
// FieldByName('XuNO').Value := i;
|
|||
|
|
// FieldByName('DZZQZGL').Value := Trim(Edit1.Text);
|
|||
|
|
// Post;
|
|||
|
|
// end;
|
|||
|
|
// Edit1.Text := '';
|
|||
|
|
// end;
|
|||
|
|
//
|
|||
|
|
// end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.MCTypeBtnUpClick(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
fsj: string;
|
|||
|
|
FWZ: Integer;
|
|||
|
|
begin
|
|||
|
|
fsj := Trim(TBtnEditC(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
|
|||
|
|
TBtnEditC(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmZDYHelp.Free;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.ConNoKeyPress(Sender: TObject; var Key: Char);
|
|||
|
|
begin
|
|||
|
|
if Key = #13 then
|
|||
|
|
begin
|
|||
|
|
Key := #0;
|
|||
|
|
SelectNext(ActiveControl as TWinControl, True, True);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.ConNoPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
var
|
|||
|
|
FConMainId, FMPRTCode: string;
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmTradeSalesContractSel := TfrmTradeSalesContractSel.Create(Application);
|
|||
|
|
with frmTradeSalesContractSel do
|
|||
|
|
begin
|
|||
|
|
fconNo := self.ConNo.Text;
|
|||
|
|
fC_Code := self.C_Code.Text;
|
|||
|
|
FLX := '<27><>֯<EFBFBD><D6AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
|
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
self.CustName.Properties.LookupItems.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('BuyNo').AsString);
|
|||
|
|
self.CustName.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('BuyName').AsString);
|
|||
|
|
|
|||
|
|
self.OurCoName.Properties.LookupItems.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('Sellno').AsString);
|
|||
|
|
self.OurCoName.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('Sellname').AsString);
|
|||
|
|
|
|||
|
|
self.FtyCoName.Properties.LookupItems.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('Sellno').AsString);
|
|||
|
|
self.FtyCoName.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('Sellname').AsString);
|
|||
|
|
|
|||
|
|
self.ConNo.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('ConNo').AsString);
|
|||
|
|
self.ConMId.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('ConMId').AsString);
|
|||
|
|
self.ConSId.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('ConSId').AsString);
|
|||
|
|
self.Saleser.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('Saleser').AsString);
|
|||
|
|
self.C_Code.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('C_Code').AsString);
|
|||
|
|
|
|||
|
|
self.C_Width.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('C_Width').AsString);
|
|||
|
|
|
|||
|
|
self.C_GramWeight.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('C_GramWeight').AsString);
|
|||
|
|
self.BBNO.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('BBNO').AsString);
|
|||
|
|
self.C_Color.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('C_Color').AsString);
|
|||
|
|
self.OrdQty.Text := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('ConQty').AsString);
|
|||
|
|
InitClothYarn(frmTradeSalesContractSel.CDS_1.fieldbyname('C_Code').AsString);
|
|||
|
|
Initexcel();
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmTradeSalesContractSel.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmTatPlanInPut.CustNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmCompanySel := TfrmCompanySel.Create(Application);
|
|||
|
|
with frmCompanySel do
|
|||
|
|
begin
|
|||
|
|
FCoType := '<27>ͻ<EFBFBD>';
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
CustName.Properties.LookupItems.Text := Trim(CDS_1.fieldbyname('CoCode').AsString);
|
|||
|
|
CustName.Text := Trim(CDS_1.fieldbyname('CoAbbrName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmCompanySel.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end.
|
|||
|
|
|