2000 lines
52 KiB
ObjectPascal
2000 lines
52 KiB
ObjectPascal
unit U_ClothInfoInput;
|
||
|
||
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, U_BaseList,
|
||
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters,
|
||
cxNavigator, dxDateRanges, dxBarBuiltInMenu, cxCheckBox, cxDropDownEdit,
|
||
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, cxContainer, cxLabel, cxPC,
|
||
dxScrollbarAnnotations, cxMaskEdit, Vcl.Menus, cxButtons;
|
||
|
||
type
|
||
TfrmClothInfoInput = class(TForm)
|
||
ToolBar1: TToolBar;
|
||
TbSave: TToolButton;
|
||
TBClose: TToolButton;
|
||
ADOQueryCmd: TADOQuery;
|
||
ADOQueryTemp: TADOQuery;
|
||
TbUpFile: TToolButton;
|
||
CDS_1: TClientDataSet;
|
||
DS_1: TDataSource;
|
||
GPM_1: TcxGridPopupMenu;
|
||
cxPageControl1: TcxPageControl;
|
||
cxTabSheet1: TcxTabSheet;
|
||
cxTabSheet2: TcxTabSheet;
|
||
cxTabSheet3: TcxTabSheet;
|
||
cxTabSheet4: TcxTabSheet;
|
||
cxGrid2: TcxGrid;
|
||
Tv1: TcxGridDBTableView;
|
||
Tv11fs_Name: TcxGridDBColumn;
|
||
Tv11fs_spel: TcxGridDBColumn;
|
||
Tv1fs_unit: TcxGridDBColumn;
|
||
Tv11fs_rate: TcxGridDBColumn;
|
||
Tv11fs_precautions: TcxGridDBColumn;
|
||
cxGridLevel1: TcxGridLevel;
|
||
cxTabSheet5: TcxTabSheet;
|
||
cxGrid1: TcxGrid;
|
||
Tv2: TcxGridDBTableView;
|
||
Tv2fp_Name: TcxGridDBColumn;
|
||
Tv2fp_spel: TcxGridDBColumn;
|
||
Tv2fp_unit: TcxGridDBColumn;
|
||
Tv2fp_rate: TcxGridDBColumn;
|
||
Tv2fp_precautions: TcxGridDBColumn;
|
||
cxGridDBColumn16: TcxGridDBColumn;
|
||
cxGridDBColumn17: TcxGridDBColumn;
|
||
cxGridDBColumn18: TcxGridDBColumn;
|
||
cxGridLevel2: TcxGridLevel;
|
||
cxTabSheet6: TcxTabSheet;
|
||
cxGrid3: TcxGrid;
|
||
Tv3: TcxGridDBTableView;
|
||
Tv3gj_Name: TcxGridDBColumn;
|
||
Tv3gj_spel: TcxGridDBColumn;
|
||
Tv3gj_unit: TcxGridDBColumn;
|
||
TV3gj_rate: TcxGridDBColumn;
|
||
Tv3gj_precautions: TcxGridDBColumn;
|
||
cxGridDBColumn26: TcxGridDBColumn;
|
||
cxGridDBColumn27: TcxGridDBColumn;
|
||
cxGridDBColumn28: TcxGridDBColumn;
|
||
cxGridLevel3: TcxGridLevel;
|
||
Panel1: TPanel;
|
||
C_GramWeight: TcxTextEdit;
|
||
F_Width: TcxTextEdit;
|
||
cxLabel37: TcxLabel;
|
||
cxLabel38: TcxLabel;
|
||
cxLabel39: TcxLabel;
|
||
cxLabel40: TcxLabel;
|
||
cxLabel41: TcxLabel;
|
||
cxLabel42: TcxLabel;
|
||
cxLabel43: TcxLabel;
|
||
cxLabel44: TcxLabel;
|
||
cxLabel45: TcxLabel;
|
||
cxLabel46: TcxLabel;
|
||
cxLabel47: TcxLabel;
|
||
cxLabel48: TcxLabel;
|
||
Material: TcxTextEdit;
|
||
LatitudeSlope: TcxTextEdit;
|
||
FinishingStandards: TcxTextEdit;
|
||
F_Name: TcxTextEdit;
|
||
C_FinishLongitudeDensity: TcxTextEdit;
|
||
C_Width: TcxTextEdit;
|
||
F_GramWeight: TcxTextEdit;
|
||
C_FinishLatitudeDensity: TcxTextEdit;
|
||
Finishingtype: TcxTextEdit;
|
||
Panel2: TPanel;
|
||
cxLabel10: TcxLabel;
|
||
cxLabel11: TcxLabel;
|
||
cxLabel12: TcxLabel;
|
||
cxLabel13: TcxLabel;
|
||
cxLabel14: TcxLabel;
|
||
cxLabel15: TcxLabel;
|
||
cxLabel16: TcxLabel;
|
||
cxLabel17: TcxLabel;
|
||
cxLabel18: TcxLabel;
|
||
cxLabel19: TcxLabel;
|
||
cxLabel20: TcxLabel;
|
||
cxLabel7: TcxLabel;
|
||
cxLabel8: TcxLabel;
|
||
cxLabel9: TcxLabel;
|
||
qx_WaterContent: TcxTextEdit;
|
||
qx_Add_Name: TcxTextEdit;
|
||
qx_Precautions: TcxTextEdit;
|
||
qx_temperature4: TcxTextEdit;
|
||
qx_temperature2: TcxTextEdit;
|
||
qx_temperature1: TcxTextEdit;
|
||
qx_temperature3: TcxTextEdit;
|
||
qx_temperature5: TcxTextEdit;
|
||
qx_speed: TcxTextEdit;
|
||
qx_ReduceAmplitude: TcxTextEdit;
|
||
Panel3: TPanel;
|
||
cxLabel1: TcxLabel;
|
||
cxLabel2: TcxLabel;
|
||
cxLabel21: TcxLabel;
|
||
cxLabel22: TcxLabel;
|
||
cxLabel23: TcxLabel;
|
||
cxLabel24: TcxLabel;
|
||
cxLabel25: TcxLabel;
|
||
cxLabel26: TcxLabel;
|
||
cxLabel27: TcxLabel;
|
||
cxLabel28: TcxLabel;
|
||
cxLabel3: TcxLabel;
|
||
cxLabel4: TcxLabel;
|
||
cxLabel5: TcxLabel;
|
||
cxLabel55: TcxLabel;
|
||
cxLabel56: TcxLabel;
|
||
cxLabel57: TcxLabel;
|
||
cxLabel58: TcxLabel;
|
||
cxLabel59: TcxLabel;
|
||
cxLabel6: TcxLabel;
|
||
cxLabel60: TcxLabel;
|
||
cxLabel61: TcxLabel;
|
||
cxLabel62: TcxLabel;
|
||
cxLabel63: TcxLabel;
|
||
cxLabel64: TcxLabel;
|
||
cxLabel65: TcxLabel;
|
||
dx_OutFanSpeed: TcxTextEdit;
|
||
dx_temperature1: TcxTextEdit;
|
||
dx_WidthAmplitude: TcxTextEdit;
|
||
dx_temperature5: TcxTextEdit;
|
||
dx_temperature9: TcxTextEdit;
|
||
dx_RosePower: TcxTextEdit;
|
||
dx_BrushSuperRate: TcxTextEdit;
|
||
dx_Precautions: TcxTextEdit;
|
||
dx_UpSuperRate: TcxTextEdit;
|
||
dx_speed: TcxTextEdit;
|
||
dx_TubePress: TcxTextEdit;
|
||
dx_temperature6: TcxTextEdit;
|
||
dx_CycleFanSpeed: TcxTextEdit;
|
||
dx_DownSuperRate: TcxTextEdit;
|
||
dx_temperature3: TcxTextEdit;
|
||
dx_temperature4: TcxTextEdit;
|
||
dx_temperature7: TcxTextEdit;
|
||
dx_temperature8: TcxTextEdit;
|
||
dx_temperature10: TcxTextEdit;
|
||
dx_temperature2: TcxTextEdit;
|
||
Panel4: TPanel;
|
||
cxLabel100: TcxLabel;
|
||
cxLabel101: TcxLabel;
|
||
cxLabel102: TcxLabel;
|
||
cxLabel103: TcxLabel;
|
||
cxLabel104: TcxLabel;
|
||
cxLabel105: TcxLabel;
|
||
cxLabel106: TcxLabel;
|
||
cxLabel109: TcxLabel;
|
||
cxLabel110: TcxLabel;
|
||
cxLabel111: TcxLabel;
|
||
cxLabel82: TcxLabel;
|
||
cxLabel83: TcxLabel;
|
||
cxLabel84: TcxLabel;
|
||
cxLabel85: TcxLabel;
|
||
cxLabel86: TcxLabel;
|
||
cxLabel87: TcxLabel;
|
||
cxLabel88: TcxLabel;
|
||
cxLabel89: TcxLabel;
|
||
cxLabel90: TcxLabel;
|
||
cxLabel91: TcxLabel;
|
||
cxLabel92: TcxLabel;
|
||
cxLabel93: TcxLabel;
|
||
cxLabel94: TcxLabel;
|
||
cxLabel95: TcxLabel;
|
||
cxLabel96: TcxLabel;
|
||
cxLabel97: TcxLabel;
|
||
cxLabel98: TcxLabel;
|
||
cxLabel99: TcxLabel;
|
||
fs_OutFanSpeed: TcxTextEdit;
|
||
fs_temperature1: TcxTextEdit;
|
||
fs_WidthAmplitude: TcxTextEdit;
|
||
fs_temperature5: TcxTextEdit;
|
||
fs_temperature9: TcxTextEdit;
|
||
fs_RosePower: TcxTextEdit;
|
||
fs_BrushSuperRate: TcxTextEdit;
|
||
fs_Precautions: TcxTextEdit;
|
||
fs_UpSuperRate: TcxTextEdit;
|
||
fs_speed: TcxTextEdit;
|
||
fs_TubePress: TcxTextEdit;
|
||
fs_temperature6: TcxTextEdit;
|
||
fs_CycleFanSpeed: TcxTextEdit;
|
||
fs_DownSuperRate: TcxTextEdit;
|
||
fs_temperature3: TcxTextEdit;
|
||
fs_temperature4: TcxTextEdit;
|
||
fs_temperature7: TcxTextEdit;
|
||
fs_temperature8: TcxTextEdit;
|
||
fs_temperature10: TcxTextEdit;
|
||
fs_temperature2: TcxTextEdit;
|
||
fs_CarPress: TcxTextEdit;
|
||
fs_PressWaterContent: TcxTextEdit;
|
||
Panel5: TPanel;
|
||
cxLabel107: TcxLabel;
|
||
cxLabel108: TcxLabel;
|
||
cxLabel112: TcxLabel;
|
||
cxLabel29: TcxLabel;
|
||
cxLabel30: TcxLabel;
|
||
cxLabel31: TcxLabel;
|
||
cxLabel32: TcxLabel;
|
||
cxLabel33: TcxLabel;
|
||
cxLabel34: TcxLabel;
|
||
cxLabel35: TcxLabel;
|
||
cxLabel36: TcxLabel;
|
||
cxLabel49: TcxLabel;
|
||
cxLabel50: TcxLabel;
|
||
cxLabel51: TcxLabel;
|
||
cxLabel52: TcxLabel;
|
||
cxLabel53: TcxLabel;
|
||
cxLabel54: TcxLabel;
|
||
cxLabel66: TcxLabel;
|
||
cxLabel67: TcxLabel;
|
||
cxLabel68: TcxLabel;
|
||
cxLabel69: TcxLabel;
|
||
cxLabel70: TcxLabel;
|
||
cxLabel71: TcxLabel;
|
||
cxLabel72: TcxLabel;
|
||
cxLabel73: TcxLabel;
|
||
cxLabel74: TcxLabel;
|
||
cxLabel75: TcxLabel;
|
||
cxLabel76: TcxLabel;
|
||
cxLabel77: TcxLabel;
|
||
cxLabel78: TcxLabel;
|
||
cxLabel79: TcxLabel;
|
||
cxLabel80: TcxLabel;
|
||
cxLabel81: TcxLabel;
|
||
fp_OutFanSpeed: TcxTextEdit;
|
||
fp_temperature1: TcxTextEdit;
|
||
fp_WidthAmplitude: TcxTextEdit;
|
||
fp_temperature5: TcxTextEdit;
|
||
fp_temperature9: TcxTextEdit;
|
||
fp_RosePower: TcxTextEdit;
|
||
fp_BrushSuperRate: TcxTextEdit;
|
||
fp_Precautions: TcxTextEdit;
|
||
fp_UpSuperRate: TcxTextEdit;
|
||
fp_speed: TcxTextEdit;
|
||
fp_TubePress: TcxTextEdit;
|
||
fp_temperature6: TcxTextEdit;
|
||
fp_CycleFanSpeed: TcxTextEdit;
|
||
fp_DownSuperRate: TcxTextEdit;
|
||
fp_temperature3: TcxTextEdit;
|
||
fp_temperature4: TcxTextEdit;
|
||
fp_temperature7: TcxTextEdit;
|
||
fp_temperature8: TcxTextEdit;
|
||
fp_temperature10: TcxTextEdit;
|
||
fp_temperature2: TcxTextEdit;
|
||
fp_LeftHeight: TcxTextEdit;
|
||
fp_RightHeight: TcxTextEdit;
|
||
fp_PumbMixElectricFrequency: TcxTextEdit;
|
||
fp_SystemPress: TcxTextEdit;
|
||
fp_MixElectricFrequency: TcxTextEdit;
|
||
fp_GasFlow: TcxTextEdit;
|
||
Panel6: TPanel;
|
||
cxLabel116: TcxLabel;
|
||
cxLabel117: TcxLabel;
|
||
cxLabel118: TcxLabel;
|
||
cxLabel119: TcxLabel;
|
||
cxLabel120: TcxLabel;
|
||
cxLabel121: TcxLabel;
|
||
cxLabel122: TcxLabel;
|
||
cxLabel123: TcxLabel;
|
||
cxLabel124: TcxLabel;
|
||
cxLabel125: TcxLabel;
|
||
cxLabel126: TcxLabel;
|
||
cxLabel127: TcxLabel;
|
||
cxLabel128: TcxLabel;
|
||
cxLabel129: TcxLabel;
|
||
cxLabel130: TcxLabel;
|
||
cxLabel131: TcxLabel;
|
||
cxLabel132: TcxLabel;
|
||
cxLabel133: TcxLabel;
|
||
cxLabel134: TcxLabel;
|
||
cxLabel135: TcxLabel;
|
||
cxLabel136: TcxLabel;
|
||
cxLabel137: TcxLabel;
|
||
cxLabel138: TcxLabel;
|
||
cxLabel139: TcxLabel;
|
||
cxLabel140: TcxLabel;
|
||
cxLabel141: TcxLabel;
|
||
cxLabel142: TcxLabel;
|
||
cxLabel143: TcxLabel;
|
||
gj_temperature1: TcxTextEdit;
|
||
gj_WidthAmplitude: TcxTextEdit;
|
||
gj_temperature5: TcxTextEdit;
|
||
gj_temperature9: TcxTextEdit;
|
||
gj_RosePower: TcxTextEdit;
|
||
gj_BrushSuperRate: TcxTextEdit;
|
||
gj_Precautions: TcxTextEdit;
|
||
gj_UpSuperRate: TcxTextEdit;
|
||
gj_speed: TcxTextEdit;
|
||
gj_TubePress: TcxTextEdit;
|
||
gj_temperature6: TcxTextEdit;
|
||
gj_CycleFanSpeed: TcxTextEdit;
|
||
gj_DownSuperRate: TcxTextEdit;
|
||
gj_temperature3: TcxTextEdit;
|
||
gj_temperature4: TcxTextEdit;
|
||
gj_temperature7: TcxTextEdit;
|
||
gj_temperature8: TcxTextEdit;
|
||
gj_temperature10: TcxTextEdit;
|
||
gj_temperature2: TcxTextEdit;
|
||
gj_LeftHeight: TcxTextEdit;
|
||
gj_RightHeight: TcxTextEdit;
|
||
gj_OutFanSpeed: TcxTextEdit;
|
||
cxtabsheet7: TcxTabSheet;
|
||
cxLabel113: TcxLabel;
|
||
cxLabel114: TcxLabel;
|
||
F_FinishLongitudeDensity: TcxTextEdit;
|
||
F_FinishLatitudeDensity: TcxTextEdit;
|
||
panel7: TPanel;
|
||
cxLabel115: TcxLabel;
|
||
cxLabel144: TcxLabel;
|
||
cxLabel145: TcxLabel;
|
||
cxLabel146: TcxLabel;
|
||
cxLabel147: TcxLabel;
|
||
cxLabel154: TcxLabel;
|
||
cxLabel155: TcxLabel;
|
||
cxLabel156: TcxLabel;
|
||
zm_inoutSpeed: TcxTextEdit;
|
||
zm_needle: TcxTextEdit;
|
||
zm_Precautions: TcxTextEdit;
|
||
zm_frequency: TcxTextEdit;
|
||
zm_WidthAmplitude: TcxTextEdit;
|
||
cxLabel148: TcxLabel;
|
||
qx_Add_Number: TcxTextEdit;
|
||
cxLabel149: TcxLabel;
|
||
cxLabel150: TcxLabel;
|
||
C_Code: TcxTextEdit;
|
||
GPM_2: TcxGridPopupMenu;
|
||
DS_2: TDataSource;
|
||
cds_2: TClientDataSet;
|
||
GPM_3: TcxGridPopupMenu;
|
||
DS_3: TDataSource;
|
||
CDS_3: TClientDataSet;
|
||
Tv3Column1: TcxGridDBColumn;
|
||
Tv1Column1: TcxGridDBColumn;
|
||
Tv2Column1: TcxGridDBColumn;
|
||
cxGrid4: TcxGrid;
|
||
TV4: TcxGridDBTableView;
|
||
cxGridDBColumn1: TcxGridDBColumn;
|
||
cxGridDBColumn2: TcxGridDBColumn;
|
||
cxGridDBColumn11: TcxGridDBColumn;
|
||
cxGridLevel4: TcxGridLevel;
|
||
Panel8: TPanel;
|
||
Panel9: TPanel;
|
||
Label20: TLabel;
|
||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||
DS_GX: TDataSource;
|
||
cds_gx: TClientDataSet;
|
||
Panel10: TPanel;
|
||
Panel11: TPanel;
|
||
Label1: TLabel;
|
||
ToolBar2: TToolBar;
|
||
TbQX: TToolButton;
|
||
TbDX: TToolButton;
|
||
TbFS: TToolButton;
|
||
TbFP: TToolButton;
|
||
TbGJ: TToolButton;
|
||
TbZM: TToolButton;
|
||
TbDelete: TToolButton;
|
||
C_Name: TcxTextEdit;
|
||
dx_UnpackingMethod: TcxComboBox;
|
||
dx_OpenAmplitude: TcxComboBox;
|
||
dx_RollMethod: TcxComboBox;
|
||
fs_UnpackingMethod: TcxComboBox;
|
||
fs_OpenAmplitude: TcxComboBox;
|
||
fs_RollMethod: TcxComboBox;
|
||
zm_UnpackingMethod: TcxComboBox;
|
||
zm_RollMethod: TcxComboBox;
|
||
cxLabel151: TcxLabel;
|
||
cxLabel152: TcxLabel;
|
||
cxLabel153: TcxLabel;
|
||
cxLabel157: TcxLabel;
|
||
cxLabel158: TcxLabel;
|
||
fs_meter: TcxTextEdit;
|
||
fs_useGlub: TcxTextEdit;
|
||
fs_waterDistribution: TcxTextEdit;
|
||
fs_useOneGlub: TcxTextEdit;
|
||
fs_useOneMeter: TcxTextEdit;
|
||
cxLabel159: TcxLabel;
|
||
fp_useOneMeter: TcxTextEdit;
|
||
cxLabel160: TcxLabel;
|
||
fp_useOneGlub: TcxTextEdit;
|
||
cxLabel161: TcxLabel;
|
||
gj_useOneMeter: TcxTextEdit;
|
||
cxLabel162: TcxLabel;
|
||
gj_useOneGlub: TcxTextEdit;
|
||
qx_UnpackingMethod: TcxComboBox;
|
||
qx_RollMethod: TcxComboBox;
|
||
zm_wagCloth: TcxTextEdit;
|
||
fp_RollMethod: TcxComboBox;
|
||
fp_UnpackingMethod: TcxComboBox;
|
||
gj_RollMethod: TcxComboBox;
|
||
gj_UnpackingMethod: TcxComboBox;
|
||
fp_OpenAmplitude: TcxComboBox;
|
||
gj_OpenAmplitude: TcxComboBox;
|
||
ToolBar3: TToolBar;
|
||
TbAdd21: TToolButton;
|
||
TbDel21: TToolButton;
|
||
ToolBar4: TToolBar;
|
||
TbAdd1: TToolButton;
|
||
TbDel1: TToolButton;
|
||
ToolBar5: TToolBar;
|
||
TbAdd3: TToolButton;
|
||
TbDel3: TToolButton;
|
||
TbCPReplace: TcxButton;
|
||
TbDXReplace: TcxButton;
|
||
TbFSReplace: TcxButton;
|
||
TbFPReplace: TcxButton;
|
||
TbGJReplace: TcxButton;
|
||
cxButton1: TcxButton;
|
||
cxButton2: TcxButton;
|
||
cxButton3: TcxButton;
|
||
cxButton4: TcxButton;
|
||
cxButton5: TcxButton;
|
||
procedure FormShow(Sender: TObject);
|
||
procedure TBCloseClick(Sender: TObject);
|
||
procedure TbSaveClick(Sender: TObject);
|
||
procedure CYColorKeyPress(Sender: TObject; var Key: Char);
|
||
procedure CYJGGYBtnDnClick(Sender: TObject);
|
||
procedure C_WidthBtnDnClick(Sender: TObject);
|
||
procedure C_WidthBtnUpClick(Sender: TObject);
|
||
procedure TbUpFileClick(Sender: TObject);
|
||
procedure C_FromNameBtnUpClick(Sender: TObject);
|
||
procedure TbQXClick(Sender: TObject);
|
||
procedure SetXH();
|
||
procedure TbDXClick(Sender: TObject);
|
||
procedure Tv1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||
procedure TbDeleteClick(Sender: TObject);
|
||
procedure TbFSClick(Sender: TObject);
|
||
procedure TbFPClick(Sender: TObject);
|
||
procedure TbGJClick(Sender: TObject);
|
||
procedure TbZMClick(Sender: TObject);
|
||
procedure Tv11fs_unitPropertiesEditValueChanged(Sender: TObject);
|
||
procedure Tv2fp_unitPropertiesEditValueChanged(Sender: TObject);
|
||
procedure Tv3gj_unitPropertiesEditValueChanged(Sender: TObject);
|
||
procedure fs_meterPropertiesChange(Sender: TObject);
|
||
procedure TbAdd2Click(Sender: TObject);
|
||
procedure TbDel2Click(Sender: TObject);
|
||
procedure Tv2fp_NamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||
procedure TbAdd1Click(Sender: TObject);
|
||
procedure TbDel1Click(Sender: TObject);
|
||
procedure TbAdd3Click(Sender: TObject);
|
||
procedure TbDel3Click(Sender: TObject);
|
||
procedure Tv11fs_NamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||
procedure Tv3gj_NamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||
procedure TbCPReplaceClick(Sender: TObject);
|
||
procedure TbDXReplaceClick(Sender: TObject);
|
||
procedure TbFSReplaceClick(Sender: TObject);
|
||
procedure TbFPReplaceClick(Sender: TObject);
|
||
procedure TbGJReplaceClick(Sender: TObject);
|
||
procedure cxButton1Click(Sender: TObject);
|
||
procedure cxButton2Click(Sender: TObject);
|
||
procedure cxButton3Click(Sender: TObject);
|
||
procedure cxButton4Click(Sender: TObject);
|
||
procedure cxButton5Click(Sender: TObject);
|
||
private
|
||
canshu1: string;
|
||
Fint: Integer;
|
||
procedure InitGrid();
|
||
procedure ArrangeTabsByDataset;
|
||
function SaveData(): Boolean;
|
||
function FindLastEditedTextEdit(AParent: TWinControl; const AHint: string): string;
|
||
procedure FillAllTextEditsWithValue(AParent: TWinControl; const AHint, AValue: string; AExclude: TcxTextEdit = nil);
|
||
procedure ClearAllTextEditsByHint(AParent: TWinControl; const AHint: string; AExclude: TcxTextEdit = nil);
|
||
{ Private declarations }
|
||
public
|
||
FBCIID, FCTID, FProcessID: string;
|
||
CopyInt: Integer;
|
||
|
||
{ Public declarations }
|
||
end;
|
||
|
||
var
|
||
frmClothInfoInput: TfrmClothInfoInput;
|
||
|
||
implementation
|
||
|
||
uses
|
||
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_ClothInfoSel,
|
||
U_ProductInfoSel;
|
||
|
||
{$R *.dfm}
|
||
procedure TfrmClothInfoInput.SetXH();
|
||
var
|
||
i: Integer;
|
||
begin
|
||
with CDS_GX do
|
||
begin
|
||
First;
|
||
i := 1;
|
||
while not Eof do
|
||
begin
|
||
with CDS_GX do
|
||
begin
|
||
Edit;
|
||
FieldByName('XHNoTemp').Value := i;
|
||
Post;
|
||
end;
|
||
i := i + 1;
|
||
Next;
|
||
end;
|
||
end;
|
||
|
||
with CDS_GX do
|
||
begin
|
||
CDS_GX.IndexFieldNames := '';
|
||
First;
|
||
i := 1;
|
||
while not Eof do
|
||
begin
|
||
with CDS_GX do
|
||
begin
|
||
Edit;
|
||
FieldByName('SerialNo').Value := FieldByName('XHNoTemp').AsInteger;
|
||
Post;
|
||
end;
|
||
i := i + 1;
|
||
Next;
|
||
end;
|
||
CDS_GX.IndexFieldNames := 'SerialNo';
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.ArrangeTabsByDataset;
|
||
var
|
||
I: Integer;
|
||
TabSheet: TcxTabSheet;
|
||
CurrentIndex: Integer;
|
||
begin
|
||
// <20>̶<EFBFBD><CCB6><EFBFBD>һ<EFBFBD><D2BB>ҳ<EFBFBD><D2B3> A
|
||
cxTabSheet1.PageIndex := 0;
|
||
cxTabSheet1.Visible := True;
|
||
|
||
// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3>
|
||
for I := 1 to cxPageControl1.PageCount - 1 do
|
||
cxPageControl1.Pages[I].TabVisible := False;
|
||
|
||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD><DDBC>Ƿ<C7B7>
|
||
if not (CDS_GX.Active and (CDS_GX.RecordCount > 0)) then
|
||
Exit;
|
||
|
||
// <20><><EFBFBD>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>ʼ<EFBFBD><CABC>0<EFBFBD>ѱ<EFBFBD>Aռ<41>ã<EFBFBD>
|
||
CurrentIndex := 1;
|
||
|
||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>
|
||
CDS_GX.IndexFieldNames := 'serialno';
|
||
CDS_GX.First;
|
||
|
||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD><DDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3>
|
||
while not CDS_GX.Eof do
|
||
begin
|
||
// <20><><EFBFBD>ݹ<EFBFBD><DDB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD>Ӧ<EFBFBD><D3A6>ҳ<EFBFBD><D2B3>
|
||
for I := 0 to cxPageControl1.PageCount - 1 do
|
||
begin
|
||
TabSheet := cxPageControl1.Pages[I] as TcxTabSheet;
|
||
// ƥ<>乤<EFBFBD><E4B9A4><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2>ǵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD>̶<EFBFBD>ҳ<EFBFBD><D2B3>
|
||
if (Trim(TabSheet.Caption) = CDS_GX.FieldByName('gxname').AsString) and (TabSheet <> cxTabSheet1) then
|
||
begin
|
||
TabSheet.PageIndex := CurrentIndex;
|
||
TabSheet.TabVisible := True;
|
||
Inc(CurrentIndex);
|
||
Break;
|
||
end;
|
||
end;
|
||
CDS_GX.Next;
|
||
end;
|
||
// ˢ<><CBA2>ҳ<EFBFBD><D2B3><EFBFBD>ؼ<EFBFBD>
|
||
cxPageControl1.Invalidate;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.InitGrid();
|
||
var
|
||
i: integer;
|
||
begin
|
||
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
SQL.Clear;
|
||
SQL.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
|
||
Open;
|
||
end;
|
||
|
||
SCSHData(ADOQueryTemp, panel1, 2);
|
||
SCSHData(ADOQueryTemp, Panel1, 0);
|
||
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
SQL.Clear;
|
||
SQL.Add('select * from Bs_Cloth_GY_Main where BCIID=''' + Trim(FBCIID) + '''');
|
||
Open;
|
||
end;
|
||
|
||
SCSHData(ADOQueryTemp, Panel2, 2);
|
||
SCSHData(ADOQueryTemp, Panel3, 2);
|
||
SCSHData(ADOQueryTemp, Panel4, 2);
|
||
SCSHData(ADOQueryTemp, Panel5, 2);
|
||
SCSHData(ADOQueryTemp, Panel6, 2);
|
||
SCSHData(ADOQueryTemp, Panel7, 2);
|
||
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select A.* from Bs_Cloth_GY_sub A ');
|
||
sql.Add(' where gytype=''<27><>ˮ'' and A.BCIID=''' + Trim(FBCIID) + '''');
|
||
Open;
|
||
end;
|
||
SCreateCDS(ADOQueryTemp, CDS_1);
|
||
SInitCDSData(ADOQueryTemp, CDS_1);
|
||
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select A.* from Bs_Cloth_GY_sub A ');
|
||
sql.Add(' where gytype=''<27><><EFBFBD><EFBFBD>'' and A.BCIID=''' + Trim(FBCIID) + '''');
|
||
Open;
|
||
end;
|
||
SCreateCDS(ADOQueryTemp, CDS_2);
|
||
SInitCDSData(ADOQueryTemp, CDS_2);
|
||
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select A.* from Bs_Cloth_GY_sub A ');
|
||
sql.Add(' where gytype=''<27>ν<EFBFBD>'' and A.BCIID=''' + Trim(FBCIID) + '''');
|
||
Open;
|
||
end;
|
||
SCreateCDS(ADOQueryTemp, CDS_3);
|
||
SInitCDSData(ADOQueryTemp, CDS_3);
|
||
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select A.* from Bs_Cloth_GX A ');
|
||
sql.Add(' where A.BCIID=''' + Trim(FBCIID) + '''');
|
||
Open;
|
||
end;
|
||
SCreateCDS(ADOQueryTemp, CDS_GX);
|
||
SInitCDSData(ADOQueryTemp, CDS_GX);
|
||
// C_FromName.TxtCode := Trim(ADOQueryTemp.fieldbyname('FromBCIID').AsString);
|
||
// C_FromName.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName').AsString);
|
||
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.FormShow(Sender: TObject);
|
||
var
|
||
MaxBCIID, MaxProcessID, MaxBCPID: string;
|
||
Maxid1, maxid2, maxid3, maxgx: string;
|
||
begin
|
||
InitGrid();
|
||
ArrangeTabsByDataset;
|
||
if CopyInt = 3 then
|
||
begin
|
||
FBCIID := '';
|
||
C_Code.text := '<27>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>';
|
||
end;
|
||
if CopyInt = 1 then //<2F>鿴
|
||
begin
|
||
TbSave.Enabled := False;
|
||
TbUpFile.Enabled := False;
|
||
TbQX.Enabled := False;
|
||
TbDX.Enabled := False;
|
||
TbFS.Enabled := False;
|
||
TbFP.Enabled := False;
|
||
TbGJ.Enabled := False;
|
||
TbZM.Enabled := False;
|
||
TbDelete.Enabled := False;
|
||
end;
|
||
|
||
with CDS_GX do
|
||
begin
|
||
First;
|
||
while not Eof do
|
||
begin
|
||
Edit;
|
||
CDS_GX.fieldbyname('GXID').AsString := '';
|
||
Post;
|
||
Next;
|
||
end;
|
||
end;
|
||
with CDS_1 do
|
||
begin
|
||
First;
|
||
while not Eof do
|
||
begin
|
||
Edit;
|
||
CDS_1.fieldbyname('BCPID').AsString := '';
|
||
Post;
|
||
Next;
|
||
end;
|
||
end;
|
||
with CDS_2 do
|
||
begin
|
||
First;
|
||
while not Eof do
|
||
begin
|
||
Edit;
|
||
CDS_2.fieldbyname('BCPID').AsString := '';
|
||
Post;
|
||
Next;
|
||
end;
|
||
end;
|
||
with CDS_3 do
|
||
begin
|
||
First;
|
||
while not Eof do
|
||
begin
|
||
Edit;
|
||
CDS_3.fieldbyname('BCPID').AsString := '';
|
||
Post;
|
||
Next;
|
||
end;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.fs_meterPropertiesChange(Sender: TObject);
|
||
var
|
||
mfs_meter, mfs_useOneMeter, mfs_useGlub: Double;
|
||
begin
|
||
if fs_meter.Text <> '' then
|
||
begin
|
||
mfs_meter := StrToFloat(fs_meter.Text);
|
||
end
|
||
else
|
||
begin
|
||
fs_meter.Text := '0';
|
||
mfs_meter := 0;
|
||
end;
|
||
|
||
if fs_useOneMeter.Text <> '' then
|
||
begin
|
||
mfs_useOneMeter := StrToFloat(fs_useOneMeter.Text);
|
||
end
|
||
else
|
||
begin
|
||
fs_useOneMeter.Text := '0';
|
||
mfs_useOneMeter := 0;
|
||
end;
|
||
///<2F><><EFBFBD>㲿<EFBFBD><E3B2BF>
|
||
mfs_useGlub := mfs_meter * mfs_useOneMeter / 1000;
|
||
fs_useGlub.Text := FloatToStr(mfs_useGlub);
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TBCloseClick(Sender: TObject);
|
||
begin
|
||
Close;
|
||
end;
|
||
|
||
function TfrmClothInfoInput.SaveData(): Boolean;
|
||
var
|
||
MaxBCIID, MaxProcessID, MaxBCPID: string;
|
||
Maxid1, maxid2, maxid3, maxgx: string;
|
||
begin
|
||
try
|
||
ADOQueryCmd.Connection.BeginTrans;
|
||
//////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //////////////////////
|
||
if Trim(FBCIID) = '' then
|
||
begin
|
||
if GetLSNo(ADOQueryCmd, MaxBCIID, 'Y', 'BS_Cloth_Info', 4, 1) = False then
|
||
begin
|
||
Result := False;
|
||
ADOQueryCmd.Connection.RollbackTrans;
|
||
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
MaxBCIID := Trim(FBCIID);
|
||
end;
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
SQL.Clear;
|
||
sql.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
|
||
Open;
|
||
end;
|
||
with ADOQueryCmd do
|
||
begin
|
||
if Trim(FBCIID) = '' then
|
||
begin
|
||
Append;
|
||
FieldByName('CTID').Value := Trim(FCTID);
|
||
FieldByName('FILLID').Value := Trim(DCode);
|
||
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('BCIID').Value := Trim(MaxBCIID);
|
||
if trim(C_Code.Text) = '<27>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>' then
|
||
C_Code.Text := Trim(MaxBCIID);
|
||
RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', panel1, 2);
|
||
Post;
|
||
end;
|
||
// with ADOQueryCmd do
|
||
// begin
|
||
// Close;
|
||
// SQL.Clear;
|
||
// sql.Add('delete BS_Cloth_Info_Link where ToID=''' + Trim(MaxBCIID) + '''');
|
||
// ExecSQL;
|
||
// end;
|
||
|
||
// with ADOQueryCmd do
|
||
// begin
|
||
// Close;
|
||
// SQL.Clear;
|
||
// sql.Add('select * from BS_Cloth_Info_Link where 1=2');
|
||
// Open;
|
||
// end;
|
||
// with ADOQueryCmd do
|
||
// begin
|
||
// Append;
|
||
// FieldByName('ToID').Value := Trim(MaxBCIID);
|
||
// FieldByName('FromID').Value := Trim(C_FromName.TxtCode);
|
||
// Post;
|
||
// end;
|
||
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select count(*) as AA from BS_Cloth_Info where C_Code=''' + Trim(C_Code.Text) + '''');
|
||
Open;
|
||
if FieldByName('AA').AsInteger > 1 then
|
||
begin
|
||
ADOQueryCmd.Connection.RollbackTrans;
|
||
Result := False;
|
||
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
end;
|
||
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
SQL.Clear;
|
||
sql.Add('select * from Bs_Cloth_GY_Main where BCIID=''' + Trim(FBCIID) + '''');
|
||
Open;
|
||
end;
|
||
with ADOQueryCmd do
|
||
begin
|
||
if Trim(FBCIID) = '' then
|
||
begin
|
||
Append;
|
||
|
||
end
|
||
else
|
||
begin
|
||
Edit;
|
||
|
||
end;
|
||
FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel2, 2);
|
||
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel3, 2);
|
||
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel4, 2);
|
||
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel5, 2);
|
||
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel6, 2);
|
||
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel7, 2);
|
||
Post;
|
||
end;
|
||
|
||
//////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //////////////////////
|
||
///
|
||
///
|
||
///
|
||
///
|
||
/// ///////////////// <20><><EFBFBD>湤<EFBFBD><E6B9A4><EFBFBD>ӱ<EFBFBD> //////////////////////
|
||
with CDS_GX do
|
||
begin
|
||
First;
|
||
while not Eof do
|
||
begin
|
||
|
||
if Trim(CDS_GX.fieldbyname('GXID').AsString) = '' then
|
||
begin
|
||
if GetLSNo(ADOQueryTemp, maxgx, 'GX', 'Bs_Cloth_GX', 5, 1) = False then
|
||
begin
|
||
ADOQueryCmd.Connection.RollbackTrans;
|
||
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
maxgx := Trim(CDS_GX.fieldbyname('GXID').AsString);
|
||
end;
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
SQL.Clear;
|
||
sql.Add('select * from Bs_Cloth_GX where ');
|
||
sql.Add(' GXID=''' + Trim(maxgx) + '''');
|
||
Open;
|
||
end;
|
||
with ADOQueryCmd do
|
||
begin
|
||
if Trim(CDS_GX.fieldbyname('GXID').AsString) = '' then
|
||
begin
|
||
Append;
|
||
|
||
end
|
||
else
|
||
begin
|
||
Edit;
|
||
end;
|
||
|
||
FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||
FieldByName('GXID').Value := Trim(maxgx);
|
||
RTSetSaveDataCDS(ADOQueryCmd, Tv4, CDS_GX, 'Bs_Cloth_GX', 0);
|
||
Post;
|
||
end;
|
||
CDS_GX.Edit;
|
||
CDS_GX.FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||
CDS_GX.FieldByName('GXID').Value := Trim(maxgx);
|
||
|
||
Next;
|
||
end;
|
||
end;
|
||
//////////////// <20><><EFBFBD>湤<EFBFBD><E6B9A4><EFBFBD>ӱ<EFBFBD> //////////////////////
|
||
////////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD>ӱ<EFBFBD> //////////////////////
|
||
with CDS_1 do
|
||
begin
|
||
First;
|
||
while not Eof do
|
||
begin
|
||
|
||
if Trim(CDS_1.fieldbyname('BCPID').AsString) = '' then
|
||
begin
|
||
if GetLSNo(ADOQueryTemp, Maxid1, 'FS', 'Bs_Cloth_GY_Sub', 5, 1) = False then
|
||
begin
|
||
ADOQueryCmd.Connection.RollbackTrans;
|
||
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
Maxid1 := Trim(CDS_1.fieldbyname('BCPID').AsString);
|
||
end;
|
||
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
SQL.Clear;
|
||
sql.Add('select * from Bs_Cloth_GY_Sub where ');
|
||
sql.Add(' BCPID=''' + Trim(Maxid1) + '''');
|
||
Open;
|
||
end;
|
||
with ADOQueryCmd do
|
||
begin
|
||
if Trim(CDS_1.fieldbyname('BCPID').AsString) = '' then
|
||
begin
|
||
Append;
|
||
|
||
end
|
||
else
|
||
begin
|
||
Edit;
|
||
|
||
end;
|
||
FieldByName('GYType').Value := '<27><>ˮ';
|
||
FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||
FieldByName('BCPID').Value := Trim(Maxid1);
|
||
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_1, 'Bs_Cloth_GY_Sub', 0);
|
||
Post;
|
||
end;
|
||
CDS_1.Edit;
|
||
CDS_1.FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||
CDS_1.FieldByName('BCPID').Value := Trim(Maxid1);
|
||
|
||
Next;
|
||
end;
|
||
end;
|
||
//////////////// <20><><EFBFBD><EFBFBD><EFBFBD>ӱ<EFBFBD> //////////////////////
|
||
////////////////// <20><><EFBFBD>淢<EFBFBD><E6B7A2><EFBFBD>ӱ<EFBFBD> //////////////////////
|
||
with CDS_2 do
|
||
begin
|
||
First;
|
||
while not Eof do
|
||
begin
|
||
|
||
if Trim(CDS_2.fieldbyname('BCPID').AsString) = '' then
|
||
begin
|
||
if GetLSNo(ADOQueryTemp, maxid2, 'FP', 'Bs_Cloth_GY_Sub', 5, 1) = False then
|
||
begin
|
||
ADOQueryCmd.Connection.RollbackTrans;
|
||
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
maxid2 := Trim(CDS_2.fieldbyname('BCPID').AsString);
|
||
end;
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
SQL.Clear;
|
||
sql.Add('select * from Bs_Cloth_GY_Sub where ');
|
||
sql.Add(' BCPID=''' + Trim(maxid2) + '''');
|
||
Open;
|
||
end;
|
||
with ADOQueryCmd do
|
||
begin
|
||
if Trim(CDS_2.fieldbyname('BCPID').AsString) = '' then
|
||
begin
|
||
Append;
|
||
|
||
end
|
||
else
|
||
begin
|
||
Edit;
|
||
|
||
end;
|
||
FieldByName('GYType').Value := '<27><><EFBFBD><EFBFBD>';
|
||
FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||
FieldByName('BCPID').Value := Trim(maxid2);
|
||
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_2, 'Bs_Cloth_GY_Sub', 0);
|
||
Post;
|
||
end;
|
||
CDS_2.Edit;
|
||
CDS_2.FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||
CDS_2.FieldByName('BCPID').Value := Trim(maxid2);
|
||
|
||
Next;
|
||
end;
|
||
end;
|
||
//////////////// <20><><EFBFBD>淢<EFBFBD><E6B7A2><EFBFBD>ӱ<EFBFBD> //////////////////////
|
||
///
|
||
/// ////////////////// <20><><EFBFBD><EFBFBD><EFBFBD>ν<EFBFBD><CEBD>ӱ<EFBFBD> //////////////////////
|
||
with CDS_3 do
|
||
begin
|
||
First;
|
||
while not Eof do
|
||
begin
|
||
if copyInt = 1 then
|
||
begin
|
||
CDS_3.Edit;
|
||
// CDS_GX.fieldbyname('GXID').AsString := '';
|
||
// CDS_1.fieldbyname('BCPID').AsString := '';
|
||
// CDS_2.fieldbyname('BCPID').AsString := '';
|
||
CDS_3.fieldbyname('BCPID').AsString := '';
|
||
end;
|
||
if Trim(CDS_3.fieldbyname('BCPID').AsString) = '' then
|
||
begin
|
||
if GetLSNo(ADOQueryTemp, maxid3, 'GJ', 'Bs_Cloth_GY_Sub', 5, 1) = False then
|
||
begin
|
||
ADOQueryCmd.Connection.RollbackTrans;
|
||
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
maxid3 := Trim(CDS_3.fieldbyname('BCPID').AsString);
|
||
end;
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
SQL.Clear;
|
||
sql.Add('select * from Bs_Cloth_GY_Sub where ');
|
||
sql.Add(' BCPID=''' + Trim(maxid3) + '''');
|
||
Open;
|
||
end;
|
||
with ADOQueryCmd do
|
||
begin
|
||
if Trim(CDS_3.fieldbyname('BCPID').AsString) = '' then
|
||
begin
|
||
Append;
|
||
|
||
end
|
||
else
|
||
begin
|
||
Edit;
|
||
|
||
end;
|
||
FieldByName('GYType').Value := '<27>ν<EFBFBD>';
|
||
FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||
FieldByName('BCPID').Value := Trim(maxid3);
|
||
RTSetSaveDataCDS(ADOQueryCmd, Tv3, CDS_3, 'Bs_Cloth_GY_Sub', 0);
|
||
Post;
|
||
end;
|
||
CDS_3.Edit;
|
||
CDS_3.FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||
CDS_3.FieldByName('BCPID').Value := Trim(maxid3);
|
||
|
||
Next;
|
||
end;
|
||
end;
|
||
//////////////// <20><><EFBFBD><EFBFBD><EFBFBD>ν<EFBFBD><CEBD>ӱ<EFBFBD> //////////////////////
|
||
ADOQueryCmd.Connection.CommitTrans;
|
||
FBCIID := MaxBCIID;
|
||
Result := True;
|
||
except
|
||
Result := False;
|
||
ADOQueryCmd.Connection.RollbackTrans;
|
||
Application.MessageBox('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!', '<27><>ʾ', 0);
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.CYJGGYBtnDnClick(Sender: TObject);
|
||
begin
|
||
TBtnEditC(Sender).Text := '';
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbSaveClick(Sender: TObject);
|
||
var
|
||
MC_Code: string;
|
||
begin
|
||
if C_Name.Text = '' then
|
||
begin
|
||
Application.MessageBox('<27><>Ʒ<EFBFBD><C6B7><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
// if trim(C_Code.Text) = '' then
|
||
// begin
|
||
//
|
||
// if GetLSNo(ADOQueryCmd, MC_Code, 'C', 'BS_Cloth_Info', 4, 0) = False then
|
||
// begin
|
||
// Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!', '<27><>ʾ', 0);
|
||
// Exit;
|
||
// end;
|
||
// C_Code.Text := MC_Code;
|
||
//
|
||
// end;
|
||
// SetXH();
|
||
if SaveData() then
|
||
begin
|
||
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD>', '<27><>ʾ', 0);
|
||
ModalResult := 1;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbFSClick(Sender: TObject);
|
||
var
|
||
i: Integer;
|
||
begin
|
||
|
||
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
|
||
i := i + 1;
|
||
if i > 6 then
|
||
begin
|
||
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', MB_OK);
|
||
exit;
|
||
end;
|
||
if CDS_GX.Locate('GXName', '<27><>ˮ', []) = True then
|
||
begin
|
||
Application.MessageBox('<27>Ѵ<EFBFBD><D1B4>ڷ<EFBFBD>ˮ<EFBFBD><CBAE><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
|
||
// CopyAddRow(Tv1, CDS_1);
|
||
with CDS_GX do
|
||
begin
|
||
Append;
|
||
FieldByName('SerialNo').Value := i;
|
||
FieldByName('GXName').Value := '<27><>ˮ';
|
||
Post;
|
||
end;
|
||
SetXH();
|
||
ArrangeTabsByDataset;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbQXClick(Sender: TObject);
|
||
var
|
||
i: Integer;
|
||
begin
|
||
|
||
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
|
||
i := i + 1;
|
||
if i > 6 then
|
||
begin
|
||
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', MB_OK);
|
||
exit;
|
||
end;
|
||
if CDS_GX.Locate('GXName', '<27><>ϴ', []) = True then
|
||
begin
|
||
Application.MessageBox('<27>Ѵ<EFBFBD><D1B4><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
|
||
// CopyAddRow(Tv1, CDS_1);
|
||
with CDS_GX do
|
||
begin
|
||
Append;
|
||
FieldByName('SerialNo').Value := i;
|
||
FieldByName('GXName').Value := '<27><>ϴ';
|
||
Post;
|
||
end;
|
||
SetXH();
|
||
ArrangeTabsByDataset;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbDXClick(Sender: TObject);
|
||
var
|
||
i: Integer;
|
||
begin
|
||
|
||
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
|
||
i := i + 1;
|
||
if i > 6 then
|
||
begin
|
||
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', MB_OK);
|
||
exit;
|
||
end;
|
||
if CDS_GX.Locate('GXName', '<27><><EFBFBD><EFBFBD>', []) = True then
|
||
begin
|
||
Application.MessageBox('<27>Ѵ<EFBFBD><D1B4>ڶ<EFBFBD><DAB6><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
|
||
// CopyAddRow(Tv1, CDS_1);
|
||
with CDS_GX do
|
||
begin
|
||
Append;
|
||
FieldByName('SerialNo').Value := i;
|
||
FieldByName('GXName').Value := '<27><><EFBFBD><EFBFBD>';
|
||
Post;
|
||
end;
|
||
SetXH();
|
||
ArrangeTabsByDataset;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbDXReplaceClick(Sender: TObject);
|
||
begin
|
||
FillAllTextEditsWithValue(panel3, '<27><><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD><EFBFBD>¶<EFBFBD>', FindLastEditedTextEdit(panel3, '<27><><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD><EFBFBD>¶<EFBFBD>'));
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbFPClick(Sender: TObject);
|
||
var
|
||
i: Integer;
|
||
begin
|
||
|
||
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
|
||
i := i + 1;
|
||
if i > 6 then
|
||
begin
|
||
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', MB_OK);
|
||
exit;
|
||
end;
|
||
if CDS_GX.Locate('GXName', '<27><><EFBFBD><EFBFBD>', []) = True then
|
||
begin
|
||
Application.MessageBox('<27>Ѵ<EFBFBD><D1B4>ڷ<EFBFBD><DAB7>ݹ<EFBFBD><DDB9><EFBFBD>!', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
|
||
// CopyAddRow(Tv1, CDS_1);
|
||
with CDS_GX do
|
||
begin
|
||
Append;
|
||
FieldByName('SerialNo').Value := i;
|
||
FieldByName('GXName').Value := '<27><><EFBFBD><EFBFBD>';
|
||
Post;
|
||
end;
|
||
SetXH();
|
||
ArrangeTabsByDataset;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbFPReplaceClick(Sender: TObject);
|
||
begin
|
||
FillAllTextEditsWithValue(panel5, '<27><><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD>¶<EFBFBD>', FindLastEditedTextEdit(panel5, '<27><><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD>¶<EFBFBD>'));
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbGJClick(Sender: TObject);
|
||
var
|
||
i: Integer;
|
||
begin
|
||
|
||
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
|
||
i := i + 1;
|
||
if i > 6 then
|
||
begin
|
||
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', MB_OK);
|
||
exit;
|
||
end;
|
||
if CDS_GX.Locate('GXName', '<27>ν<EFBFBD>', []) = True then
|
||
begin
|
||
Application.MessageBox('<27>Ѵ<EFBFBD><D1B4>ڹν<DAB9><CEBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
|
||
// CopyAddRow(Tv1, CDS_1);
|
||
with CDS_GX do
|
||
begin
|
||
Append;
|
||
FieldByName('SerialNo').Value := i;
|
||
FieldByName('GXName').Value := '<27>ν<EFBFBD>';
|
||
Post;
|
||
end;
|
||
SetXH();
|
||
ArrangeTabsByDataset;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbGJReplaceClick(Sender: TObject);
|
||
begin
|
||
FillAllTextEditsWithValue(panel6, '<27>ν<EFBFBD><CEBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>', FindLastEditedTextEdit(panel6, '<27>ν<EFBFBD><CEBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>'));
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbZMClick(Sender: TObject);
|
||
var
|
||
i: Integer;
|
||
begin
|
||
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
|
||
i := i + 1;
|
||
if i > 6 then
|
||
begin
|
||
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', MB_OK);
|
||
exit;
|
||
end;
|
||
if CDS_GX.Locate('GXName', '<27><>ë', []) = True then
|
||
begin
|
||
Application.MessageBox('<27>Ѵ<EFBFBD><D1B4><EFBFBD><EFBFBD><EFBFBD>ë<EFBFBD><C3AB><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
|
||
// CopyAddRow(Tv1, CDS_1);
|
||
with CDS_GX do
|
||
begin
|
||
Append;
|
||
FieldByName('SerialNo').Value := i;
|
||
FieldByName('GXName').Value := '<27><>ë';
|
||
Post;
|
||
end;
|
||
SetXH();
|
||
ArrangeTabsByDataset;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbDeleteClick(Sender: TObject);
|
||
begin
|
||
if CDS_GX.IsEmpty then
|
||
Exit;
|
||
if Application.MessageBox('ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
||
Exit;
|
||
////////////////////////////////////// <20>ӱ<EFBFBD><D3B1><EFBFBD><EFBFBD>¿<EFBFBD>ʼ//////////////////////
|
||
// if Trim(CDS_GX.fieldbyname('GXID').AsString) <> '' then
|
||
// begin
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('delete Bs_Cloth_GY_Sub where BCIID=''' + Trim(CDS_GX.fieldbyname('BCIID').AsString) + '''');
|
||
sql.Add('and gyType=''' + Trim(CDS_GX.fieldbyname('gxName').AsString) + '''');
|
||
ExecSQL;
|
||
end;
|
||
if CDS_gx.fieldByName('gxname').Value = '<27><>ϴ' then
|
||
begin
|
||
//<2F><>ˮ<EFBFBD>ӱ<EFBFBD><D3B1><EFBFBD><EFBFBD><EFBFBD>
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select A.* from Bs_Cloth_GY_sub A ');
|
||
sql.Add(' where gytype=''<27><>ˮ'' and A.BCIID=''' + Trim(FBCIID) + '''');
|
||
Open;
|
||
end;
|
||
SCreateCDS(ADOQueryTemp, CDS_1);
|
||
SInitCDSData(ADOQueryTemp, CDS_1);
|
||
end
|
||
else if CDS_gx.fieldByName('gxname').Value = '<27><><EFBFBD><EFBFBD>' then
|
||
begin
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ӱ<EFBFBD><D3B1><EFBFBD><EFBFBD><EFBFBD>
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select A.* from Bs_Cloth_GY_sub A ');
|
||
sql.Add(' where gytype=''<27><><EFBFBD><EFBFBD>'' and A.BCIID=''' + Trim(FBCIID) + '''');
|
||
Open;
|
||
end;
|
||
SCreateCDS(ADOQueryTemp, CDS_2);
|
||
SInitCDSData(ADOQueryTemp, CDS_2);
|
||
end
|
||
else if CDS_gx.fieldByName('gxname').Value = '<27>ν<EFBFBD>' then
|
||
begin
|
||
//<2F>ν<EFBFBD><CEBD>ӱ<EFBFBD><D3B1><EFBFBD><EFBFBD><EFBFBD>
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select A.* from Bs_Cloth_GY_sub A ');
|
||
sql.Add(' where gytype=''<27>ν<EFBFBD>'' and A.BCIID=''' + Trim(FBCIID) + '''');
|
||
Open;
|
||
end;
|
||
SCreateCDS(ADOQueryTemp, CDS_3);
|
||
SInitCDSData(ADOQueryTemp, CDS_3);
|
||
// end;
|
||
end;
|
||
// else
|
||
// begin
|
||
// CDS_GX.Delete;
|
||
// end;
|
||
////////////////////////////////////// <20>ӱ<EFBFBD><D3B1><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD>//////////////////////
|
||
/////////////////////////<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD>ʼ/////////////////////////////////
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select * from Bs_Cloth_GY_Main where BCIID=''' + Trim(CDS_GX.fieldbyname('BCIID').AsString) + '''');
|
||
open;
|
||
end;
|
||
if CDS_gx.fieldByName('gxname').Value = '<27><>ϴ' then
|
||
begin
|
||
SClearData(panel2, 2);
|
||
qx_UnpackingMethod.Text := '';
|
||
qx_RollMethod.Text := '';
|
||
end
|
||
else if CDS_gx.fieldByName('gxname').Value = '<27><><EFBFBD><EFBFBD>' then
|
||
begin
|
||
SClearData(panel3, 2);
|
||
dx_UnpackingMethod.Text := '';
|
||
dx_RollMethod.Text := '';
|
||
dx_OpenAmplitude.Text := '';
|
||
end
|
||
else if CDS_gx.fieldByName('gxname').Value = '<27><>ˮ' then
|
||
begin
|
||
SClearData(panel4, 2);
|
||
fs_UnpackingMethod.Text := '';
|
||
fs_RollMethod.Text := '';
|
||
fs_OpenAmplitude.Text := '';
|
||
end
|
||
else if CDS_gx.fieldByName('gxname').Value = '<27><><EFBFBD><EFBFBD>' then
|
||
begin
|
||
SClearData(panel5, 2);
|
||
fp_UnpackingMethod.Text := '';
|
||
fp_RollMethod.Text := '';
|
||
fp_OpenAmplitude.Text := '';
|
||
end
|
||
else if CDS_gx.fieldByName('gxname').Value = '<27>ν<EFBFBD>' then
|
||
begin
|
||
SClearData(panel6, 2);
|
||
gj_UnpackingMethod.Text := '';
|
||
gj_RollMethod.Text := '';
|
||
gj_OpenAmplitude.Text := '';
|
||
end
|
||
else if CDS_gx.fieldByName('gxname').Value = '<27><>ë' then
|
||
begin
|
||
SClearData(panel7, 2);
|
||
zm_UnpackingMethod.Text := '';
|
||
end;
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('delete Bs_Cloth_GX where GXID=''' + Trim(CDS_GX.fieldbyname('GXID').AsString) + '''');
|
||
ExecSQL;
|
||
end;
|
||
// showMessage();
|
||
CDS_GX.Delete;
|
||
SetXH();
|
||
if Trim(CDS_GX.fieldbyname('GXID').AsString) <> '' then
|
||
begin
|
||
SaveData();
|
||
end;
|
||
/////////////////////////////////<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD>//////////////////////////////////
|
||
ArrangeTabsByDataset;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbAdd1Click(Sender: TObject);
|
||
begin
|
||
with CDS_1 do
|
||
begin
|
||
Append;
|
||
CDS_1.FieldByName('serialno').Value := CDS_1.RecordCount + 1;
|
||
CDS_1.FieldByName('fs_unit').Value := '%';
|
||
Post;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbAdd2Click(Sender: TObject);
|
||
begin
|
||
with CDS_2 do
|
||
begin
|
||
Append;
|
||
CDS_2.FieldByName('serialno').Value := CDS_2.RecordCount + 1;
|
||
CDS_2.FieldByName('fp_unit').Value := '%';
|
||
Post;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbAdd3Click(Sender: TObject);
|
||
begin
|
||
with CDS_3 do
|
||
begin
|
||
Append;
|
||
CDS_3.FieldByName('serialno').Value := CDS_3.RecordCount + 1;
|
||
CDS_3.FieldByName('gj_unit').Value := '%';
|
||
Post;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbDel1Click(Sender: TObject);
|
||
var
|
||
i: Integer;
|
||
begin
|
||
if not CDS_1.IsEmpty then
|
||
begin
|
||
|
||
if Application.MessageBox('ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) = IDYES then
|
||
begin
|
||
if Trim(CDS_1.fieldbyname('BCPID').AsString) <> '' then
|
||
begin
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('delete BS_Cloth_GY_Sub where BCPID=''' + Trim(CDS_1.fieldbyname('BCPID').AsString));
|
||
ExecSQL;
|
||
end;
|
||
end;
|
||
CDS_1.Delete;
|
||
end
|
||
else
|
||
exit;
|
||
|
||
i := 0;
|
||
CDS_1.First;
|
||
while not CDS_1.Eof do
|
||
begin
|
||
i := i + 1;
|
||
CDS_1.Edit;
|
||
CDS_1.fieldByName('serialno').value := i;
|
||
CDS_1.Post;
|
||
CDS_1.Next;
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
Application.MessageBox('<27><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbDel2Click(Sender: TObject);
|
||
var
|
||
i: Integer;
|
||
begin
|
||
if not CDS_3.IsEmpty then
|
||
begin
|
||
|
||
if Application.MessageBox('ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) = IDYES then
|
||
begin
|
||
if Trim(CDS_3.fieldbyname('BCPID').AsString) <> '' then
|
||
begin
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('delete BS_Cloth_GY_Sub where BCPID=''' + Trim(CDS_3.fieldbyname('BCPID').AsString) + '''');
|
||
ExecSQL;
|
||
end;
|
||
end;
|
||
CDS_3.Delete;
|
||
end
|
||
else
|
||
exit;
|
||
|
||
i := 0;
|
||
CDS_3.First;
|
||
while not CDS_3.Eof do
|
||
begin
|
||
i := i + 1;
|
||
CDS_3.Edit;
|
||
CDS_3.fieldByName('serialno').value := i;
|
||
CDS_3.Post;
|
||
CDS_3.Next;
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
Application.MessageBox('<27><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbDel3Click(Sender: TObject);
|
||
var
|
||
i: Integer;
|
||
begin
|
||
if not CDS_3.IsEmpty then
|
||
begin
|
||
|
||
if Application.MessageBox('ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) = IDYES then
|
||
begin
|
||
if Trim(CDS_3.fieldbyname('BCPID').AsString) <> '' then
|
||
begin
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('delete BS_Cloth_GY_Sub where BCPID=''' + Trim(CDS_3.fieldbyname('BCPID').AsString) + '''');
|
||
ExecSQL;
|
||
end;
|
||
end;
|
||
CDS_3.Delete;
|
||
end
|
||
else
|
||
exit;
|
||
|
||
i := 0;
|
||
CDS_3.First;
|
||
while not CDS_3.Eof do
|
||
begin
|
||
i := i + 1;
|
||
CDS_3.Edit;
|
||
CDS_3.fieldByName('serialno').value := i;
|
||
CDS_3.Post;
|
||
CDS_3.Next;
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
Application.MessageBox('<27><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.C_FromNameBtnUpClick(Sender: TObject);
|
||
begin
|
||
// try
|
||
// frmClothInfoSel := TfrmClothInfoSel.Create(Application);
|
||
// with frmClothInfoSel do
|
||
// begin
|
||
// FCTType := '<27><><EFBFBD><EFBFBD>';
|
||
// if ShowModal = 1 then
|
||
// begin
|
||
// C_FromName.TxtCode := Trim(CDS_1.fieldbyname('BCIID').AsString);
|
||
// C_FromName.Text := Trim(CDS_1.fieldbyname('C_Name').AsString);
|
||
// end;
|
||
// end;
|
||
// finally
|
||
// frmClothInfoSel.Free;
|
||
// end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbCPReplaceClick(Sender: TObject);
|
||
begin
|
||
FillAllTextEditsWithValue(panel2, '<27><>ϴˮ<CFB4><CBAE>', FindLastEditedTextEdit(panel2, '<27><>ϴˮ<CFB4><CBAE>'));
|
||
end;
|
||
|
||
//function TfrmClothInfoInput.FindLastEditedTextEdit(AParent: TWinControl; const AHint: string): string;
|
||
//var
|
||
// i: Integer;
|
||
// AControl: TControl;
|
||
//begin
|
||
// Result := '';
|
||
// for i := 0 to AParent.ControlCount - 1 do
|
||
// begin
|
||
// AControl := AParent.Controls[i];
|
||
// if (AControl is TcxTextEdit) and ((AControl as TcxTextEdit).Hint = AHint) and ((AControl as TcxTextEdit).Text <> '') then // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
// begin
|
||
// Result := (AControl as TcxTextEdit).text; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ǿտؼ<D5BF><D8BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>֣<EFBFBD>
|
||
// end;
|
||
// end;
|
||
//end;
|
||
|
||
function TfrmClothInfoInput.FindLastEditedTextEdit(AParent: TWinControl; const AHint: string): string;
|
||
var
|
||
i, j: Integer;
|
||
AControl: TControl;
|
||
SortedControls: TList;
|
||
TempControl: TControl;
|
||
begin
|
||
Result := '';
|
||
|
||
// <20><><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>ӿؼ<D3BF><D8BC><EFBFBD>ֱ<EFBFBD>ӷ<EFBFBD><D3B7>ؿ<EFBFBD>
|
||
if AParent.ControlCount = 0 then
|
||
Exit;
|
||
|
||
// ʹ<><CAB9> TList <20>洢<EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݾɰ<DDBE> Delphi<68><69>
|
||
SortedControls := TList.Create;
|
||
try
|
||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿؼ<D3BF><D8BC><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5>б<EFBFBD>
|
||
for i := 0 to AParent.ControlCount - 1 do
|
||
SortedControls.Add(AParent.Controls[i]);
|
||
|
||
// <20>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD> Top<6F><70>Y<EFBFBD><59><EFBFBD>꣩<EFBFBD><EAA3A9> Left<66><74>X<EFBFBD><58><EFBFBD>꣩<EFBFBD><EAA3A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
for i := 0 to SortedControls.Count - 1 do
|
||
begin
|
||
for j := i + 1 to SortedControls.Count - 1 do
|
||
begin
|
||
// <20>Ƚ<EFBFBD><C8BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD> Top <20><> Left
|
||
if (TControl(SortedControls[i]).Top > TControl(SortedControls[j]).Top) or
|
||
((TControl(SortedControls[i]).Top = TControl(SortedControls[j]).Top) and
|
||
(TControl(SortedControls[i]).Left > TControl(SortedControls[j]).Left)) then
|
||
begin
|
||
// <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
||
TempControl := TControl(SortedControls[i]);
|
||
SortedControls[i] := SortedControls[j];
|
||
SortedControls[j] := TempControl;
|
||
end;
|
||
end;
|
||
end;
|
||
|
||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀؼ<C4BF>
|
||
for i := 0 to SortedControls.Count - 1 do
|
||
begin
|
||
AControl := TControl(SortedControls[i]);
|
||
if (AControl is TcxTextEdit) and
|
||
(TcxTextEdit(AControl).Hint = AHint) and
|
||
(TcxTextEdit(AControl).Text <> '') then
|
||
begin
|
||
Result := TcxTextEdit(AControl).Text; // <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļᱻ<C4BB><E1B1BB><EFBFBD><EFBFBD>
|
||
end;
|
||
end;
|
||
finally
|
||
SortedControls.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.FillAllTextEditsWithValue(AParent: TWinControl; const AHint, AValue: string; AExclude: TcxTextEdit = nil); // <20><>ѡ<EFBFBD><D1A1><EFBFBD>ų<EFBFBD><C5B3>ض<EFBFBD><D8B6>ؼ<EFBFBD>
|
||
var
|
||
i: Integer;
|
||
AControl: TControl;
|
||
ATextEdit: TcxTextEdit;
|
||
begin
|
||
for i := 0 to AParent.ControlCount - 1 do
|
||
begin
|
||
AControl := AParent.Controls[i];
|
||
if (AControl is TcxTextEdit) and ((AControl as TcxTextEdit).Text = '') then
|
||
begin
|
||
ATextEdit := AControl as TcxTextEdit;
|
||
if (ATextEdit.Hint = AHint) and (ATextEdit <> AExclude) then
|
||
ATextEdit.Text := AValue;
|
||
end;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.ClearAllTextEditsByHint(AParent: TWinControl; const AHint: string; AExclude: TcxTextEdit = nil);
|
||
var
|
||
i: Integer;
|
||
AControl: TControl;
|
||
begin
|
||
for i := 0 to AParent.ControlCount - 1 do
|
||
begin
|
||
AControl := AParent.Controls[i];
|
||
// <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD> TcxTextEdit<69><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Hint ƥ<>䣬<EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD>ų<EFBFBD><C5B3>Ŀؼ<C4BF>
|
||
if (AControl is TcxTextEdit) and
|
||
(TcxTextEdit(AControl).Hint = AHint) and
|
||
(TcxTextEdit(AControl) <> AExclude) then
|
||
begin
|
||
TcxTextEdit(AControl).Text := ''; // ֱ<><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
end;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.cxButton1Click(Sender: TObject);
|
||
begin
|
||
ClearAllTextEditsByHint(panel4, '<27><>ˮ<EFBFBD><CBAE><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>');
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.cxButton2Click(Sender: TObject);
|
||
begin
|
||
ClearAllTextEditsByHint(panel2, '<27><>ϴˮ<CFB4><CBAE>');
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.cxButton3Click(Sender: TObject);
|
||
begin
|
||
ClearAllTextEditsByHint(panel3, '<27><><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD><EFBFBD>¶<EFBFBD>');
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.cxButton4Click(Sender: TObject);
|
||
begin
|
||
ClearAllTextEditsByHint(panel5, '<27><><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD>¶<EFBFBD>');
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.cxButton5Click(Sender: TObject);
|
||
begin
|
||
ClearAllTextEditsByHint(panel6, '<27>ν<EFBFBD><CEBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>');
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbFSReplaceClick(Sender: TObject);
|
||
begin
|
||
FillAllTextEditsWithValue(panel4, '<27><>ˮ<EFBFBD><CBAE><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>', FindLastEditedTextEdit(panel4, '<27><>ˮ<EFBFBD><CBAE><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>'));
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
|
||
begin
|
||
if Key = #13 then
|
||
begin
|
||
Key := #0;
|
||
SelectNext(ActiveControl as TWinControl, True, True);
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.C_WidthBtnDnClick(Sender: TObject);
|
||
begin
|
||
TBtnEditC(Sender).Text := '';
|
||
TBtnEditC(Sender).TxtCode := '';
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.C_WidthBtnUpClick(Sender: TObject);
|
||
var
|
||
fsj: string;
|
||
FWZ: Integer;
|
||
begin
|
||
fsj := Trim(TEdit(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
|
||
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||
end;
|
||
end;
|
||
finally
|
||
frmZDYHelp.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.TbUpFileClick(Sender: TObject);
|
||
begin
|
||
// if trim(C_Code.Text) = '' then
|
||
// Exit;
|
||
// try
|
||
// frmAttachmentUpload := TfrmAttachmentUpload.Create(Application);
|
||
// with frmAttachmentUpload do
|
||
// begin
|
||
// FEditAuthority := True;
|
||
// fkeyNO := trim(C_Code.Text);
|
||
// fType := '<27><>ƷƷ<C6B7><C6B7><EFBFBD><EFBFBD>';
|
||
// if ShowModal = 1 then
|
||
// begin
|
||
//
|
||
// end;
|
||
// end;
|
||
// finally
|
||
// frmAttachmentUpload.Free;
|
||
// end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.Tv11fs_NamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||
begin
|
||
try
|
||
frmProductInfoSel := TfrmProductInfoSel.Create(Application);
|
||
with frmProductInfoSel do
|
||
begin
|
||
FSTKName := '<27><><EFBFBD><EFBFBD>';
|
||
if ShowModal = 1 then
|
||
begin
|
||
with Self.CDS_1 do
|
||
begin
|
||
Edit;
|
||
FieldByName('fs_Name').Value := frmProductInfoSel.CDS_1.fieldbyname('P_Name').value;
|
||
FieldByName('fs_spel').Value := frmProductInfoSel.CDS_1.fieldbyname('P_Spec').value;
|
||
end;
|
||
end;
|
||
end;
|
||
finally
|
||
frmProductInfoSel.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.Tv11fs_unitPropertiesEditValueChanged(Sender: TObject);
|
||
var
|
||
s: string;
|
||
begin
|
||
s := TcxTextEdit(Sender).EditingText;
|
||
if (s <> '') and (s[Length(s)] <> '%') then
|
||
begin
|
||
Tv1.Controller.FocusedColumn.EditValue := s + '%';
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.Tv1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||
begin
|
||
// try
|
||
// frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||
// with frmZDYHelp do
|
||
// begin
|
||
// flag := 'FtyType';
|
||
// flagname := '<27><><EFBFBD><EFBFBD>';
|
||
// if ShowModal = 1 then
|
||
// begin
|
||
// CDS_1.Edit;
|
||
// CDS_1.fieldbyname('FtyType').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||
// CDS_1.Post;
|
||
// end;
|
||
// end;
|
||
// finally
|
||
// frmZDYHelp.Free;
|
||
// end;
|
||
// tv1.Controller.EditingController.ShowEdit();
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.Tv2fp_NamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||
begin
|
||
try
|
||
frmProductInfoSel := TfrmProductInfoSel.Create(Application);
|
||
with frmProductInfoSel do
|
||
begin
|
||
FSTKName := '<27><><EFBFBD><EFBFBD>';
|
||
if ShowModal = 1 then
|
||
begin
|
||
with Self.CDS_2 do
|
||
begin
|
||
Edit;
|
||
FieldByName('fp_Name').Value := frmProductInfoSel.CDS_1.fieldbyname('P_Name').value;
|
||
FieldByName('fp_spel').Value := frmProductInfoSel.CDS_1.fieldbyname('P_Spec').value;
|
||
end;
|
||
end;
|
||
end;
|
||
finally
|
||
frmProductInfoSel.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.Tv2fp_unitPropertiesEditValueChanged(Sender: TObject);
|
||
var
|
||
s: string;
|
||
begin
|
||
s := TcxTextEdit(Sender).EditingText;
|
||
if (s <> '') and (s[Length(s)] <> '%') then
|
||
begin
|
||
Tv2.Controller.FocusedColumn.EditValue := s + '%';
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.Tv3gj_NamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||
begin
|
||
try
|
||
frmProductInfoSel := TfrmProductInfoSel.Create(Application);
|
||
with frmProductInfoSel do
|
||
begin
|
||
FSTKName := '<27><><EFBFBD><EFBFBD>';
|
||
if ShowModal = 1 then
|
||
begin
|
||
with Self.CDS_3 do
|
||
begin
|
||
Edit;
|
||
FieldByName('gj_Name').Value := frmProductInfoSel.CDS_1.fieldbyname('P_Name').value;
|
||
FieldByName('gj_spel').Value := frmProductInfoSel.CDS_1.fieldbyname('P_Spec').value;
|
||
end;
|
||
end;
|
||
end;
|
||
finally
|
||
frmProductInfoSel.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmClothInfoInput.Tv3gj_unitPropertiesEditValueChanged(Sender: TObject);
|
||
var
|
||
s: string;
|
||
begin
|
||
s := TcxTextEdit(Sender).EditingText;
|
||
if (s <> '') and (s[Length(s)] <> '%') then
|
||
begin
|
||
Tv3.Controller.FocusedColumn.EditValue := s + '%';
|
||
end;
|
||
end;
|
||
|
||
end.
|
||
|