You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4237 lines
139 KiB
Plaintext

11 months ago
unit u_op_railway;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ExtCtrls, XPMenu, Menus, DB, ADODB, dxExEdtr,
dxDBGrid, dxDBTLCl, dxGrClms, dxTL, dxDBCtrl, dxCntner, RxLookup,
StdCtrls, Mask, DBCtrls, ComCtrls, bsSkinTabs, u_op_sate, u_fee,
wwdbdatetimepicker, wwdbedit, Wwdotdot, Wwdbcomb, u_op_letter_free,
wwdblook, bsdbctrls, Grids, DBGridEh, Wwdbigrd, Wwdbgrid, u_op_card,
bsSkinBoxCtrls,DateUtils, cxStyles, cxCustomData, cxGraphics, cxFilter,
cxData, cxDataStorage, cxEdit, cxDBData, cxMaskEdit, cxCalendar,
cxTextEdit, cxGridDBTableView, cxGridLevel, cxGridCustomTableView,
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
cxClasses, cxControls, cxGridCustomView, cxGrid, DBGrids, DBCtrlsEh,IniFiles,ComObj;
type
Tfrm_op_railway = class(TForm)
Panel2: TPanel;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Notebook1: TNotebook;
t_op_railway: TADOQuery;
t_op_railway1: TDataSource;
PopupMenu1: TPopupMenu;
t_ch_fee: TADOQuery;
XPMenu1: TXPMenu;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridDateColumn;
dxDBGrid1Column5: TdxDBGridDateColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridMaskColumn;
dxDBGrid1Column23: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridDateColumn;
dxDBGrid1Column26: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridColumn;
bsSkinPanel1: TbsSkinPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label37: TLabel;
Label5: TLabel;
Label4: TLabel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit8: TDBEdit;
DBEdit4: TDBEdit;
RxDBLookupCombo1: TRxDBLookupCombo;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinTabSheet3: TbsSkinTabSheet;
fra_fee1: Tfra_fee;
fra_op_state1: Tfra_op_state;
dxDBGrid1Column27: TdxDBGridColumn;
Label65: TLabel;
DBEdit18: TDBEdit;
dxDBGrid1Column28: TdxDBGridColumn;
bsSkinButton13: TbsSkinButton;
Label41: TLabel;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
PopupMenu3: TPopupMenu;
N37: TMenuItem;
N38: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
RxDBLookupCombo31: TRxDBLookupCombo;
bsSkinTabSheet4: TbsSkinTabSheet;
fra_op_letter_free1: Tfra_op_letter_free;
N8: TMenuItem;
N9: TMenuItem;
N19: TMenuItem;
N20: TMenuItem;
N21: TMenuItem;
N22: TMenuItem;
N23: TMenuItem;
N24: TMenuItem;
dxDBGrid1Column29: TdxDBGridColumn;
bsSkinPanel2: TbsSkinPanel;
bsSkinDBText1: TbsSkinDBText;
N26: TMenuItem;
bsSkinSpeedButton1: TbsSkinSpeedButton;
bsSkinTabSheet7: TbsSkinTabSheet;
fra_op_card1: Tfra_op_card;
Label7: TLabel;
Label53: TLabel;
wwDBComboBox7: TwwDBComboBox;
Label8: TLabel;
DBEdit5: TDBEdit;
t_op_railway_fen1: TDataSource;
t_op_railway_fen: TADOQuery;
bsSkinScrollBox1: TbsSkinScrollBox;
bsSkinScrollBar1: TbsSkinScrollBar;
dxDBGrid1Column20: TdxDBGridColumn;
cxGrid1: TcxGrid;
cxGrid1DBBandedTableView1: TcxGridDBBandedTableView;
cxStyleRepository1: TcxStyleRepository;
cxStyle1: TcxStyle;
cxStyle2: TcxStyle;
cxStyle3: TcxStyle;
cxStyle4: TcxStyle;
cxStyle5: TcxStyle;
cxGrid1Level1: TcxGridLevel;
cxGrid1DBTableView1: TcxGridDBTableView;
cxGrid1DBTableView1DBColumn: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn1: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn2: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn3: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn4: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn5: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn6: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn7: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn8: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn9: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn10: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn11: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn12: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn13: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn14: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn15: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn16: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn17: TcxGridDBColumn;
cxGrid1Level2: TcxGridLevel;
v_op_railway_detail: TADOQuery;
v_op_railway_detail1: TDataSource;
bsSkinTabSheet6: TbsSkinTabSheet;
bsSkinPanel8: TbsSkinPanel;
bsSkinScrollBar2: TbsSkinScrollBar;
bsSkinScrollBox2: TbsSkinScrollBox;
Label34: TLabel;
Label164: TLabel;
Label110: TLabel;
Label35: TLabel;
Label98: TLabel;
Label99: TLabel;
Label100: TLabel;
Label101: TLabel;
Label102: TLabel;
Label103: TLabel;
Label105: TLabel;
Label106: TLabel;
Label107: TLabel;
Label108: TLabel;
Label57: TLabel;
Label58: TLabel;
Label59: TLabel;
RxDBLookupCombo16: TRxDBLookupCombo;
DBMemo3: TDBMemo;
RxDBLookupCombo11: TRxDBLookupCombo;
DBMemo18: TDBMemo;
RxDBLookupCombo17: TRxDBLookupCombo;
DBMemo4: TDBMemo;
DBEdit43: TDBEdit;
DBRichEdit2: TDBRichEdit;
DBEdit45: TDBEdit;
DBMemo6: TDBMemo;
DBMemo7: TDBMemo;
DBMemo8: TDBMemo;
DBRichEdit4: TDBRichEdit;
DBMemo9: TDBMemo;
DBEdit46: TDBEdit;
DBEdit47: TDBEdit;
DBMemo2: TDBMemo;
DBRichEdit1: TDBRichEdit;
DBMemo5: TDBMemo;
bsSkinPageControl2: TbsSkinPageControl;
tab1: TbsSkinTabSheet;
bsSkinPanel3: TbsSkinPanel;
bsSkinGroupBox10: TbsSkinGroupBox;
Label51: TLabel;
Label52: TLabel;
Label10: TLabel;
Label23: TLabel;
Label13: TLabel;
Label27: TLabel;
Label42: TLabel;
Label17: TLabel;
Label16: TLabel;
wwDBDateTimePicker12: TwwDBDateTimePicker;
wwDBComboBox2: TwwDBComboBox;
RxDBLookupCombo7: TRxDBLookupCombo;
wwDBComboBox3: TwwDBComboBox;
RxDBLookupCombo29: TRxDBLookupCombo;
RxDBLookupCombo30: TRxDBLookupCombo;
wwDBComboBox4: TwwDBComboBox;
bsSkinPanel4: TbsSkinPanel;
tab2: TbsSkinTabSheet;
t_op_railway2: TDataSource;
bsSkinPanel7: TbsSkinPanel;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column1: TdxDBGridColumn;
dxDBGrid2Column2: TdxDBGridColumn;
dxDBGrid2Column3: TdxDBGridColumn;
dxDBGrid2Column4: TdxDBGridColumn;
dxDBGrid2Column5: TdxDBGridColumn;
bsSkinButton36: TbsSkinButton;
bsSkinButton34: TbsSkinButton;
bsSkinButton33: TbsSkinButton;
bsSkinButton32: TbsSkinButton;
bsSkinButton31: TbsSkinButton;
dxDBGrid2Column6: TdxDBGridColumn;
dxDBGrid2Column7: TdxDBGridColumn;
dxDBGrid2Column8: TdxDBGridColumn;
dxDBGrid2Column9: TdxDBGridColumn;
dxDBGrid2Column10: TdxDBGridColumn;
dxDBGrid2Column11: TdxDBGridColumn;
bsSkinGroupBox2: TbsSkinGroupBox;
Label85: TLabel;
Label9: TLabel;
Label11: TLabel;
Label12: TLabel;
Label6: TLabel;
Label36: TLabel;
Label38: TLabel;
Label40: TLabel;
Label39: TLabel;
Label43: TLabel;
Label44: TLabel;
Label45: TLabel;
Label46: TLabel;
Label47: TLabel;
wwDBLookupCombo52: TwwDBLookupCombo;
DBEdit6: TDBEdit;
DBEdit7: TDBEdit;
wwDBLookupCombo2: TwwDBLookupCombo;
DBEdit9: TDBEdit;
DBEdit10: TDBEdit;
RxDBLookupCombo3: TRxDBLookupCombo;
RxDBLookupCombo4: TRxDBLookupCombo;
wwDBComboBox1: TwwDBComboBox;
DBEdit21: TDBEdit;
DBEdit81: TDBEdit;
wwDBLookupCombo61: TwwDBLookupCombo;
DBEdit82: TDBEdit;
DBEdit83: TDBEdit;
RxDBLookupCombo5: TRxDBLookupCombo;
DBEdit22: TDBEdit;
bsSkinGroupBox3: TbsSkinGroupBox;
Label22: TLabel;
Label15: TLabel;
Label18: TLabel;
Label26: TLabel;
Label60: TLabel;
Label61: TLabel;
wwDBDateTimePicker4: TwwDBDateTimePicker;
DBEdit12: TDBEdit;
DBEdit13: TDBEdit;
wwDBDateTimePicker6: TwwDBDateTimePicker;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBDateTimePicker14: TwwDBDateTimePicker;
bsSkinGroupBox4: TbsSkinGroupBox;
Label14: TLabel;
Label19: TLabel;
Label25: TLabel;
Label20: TLabel;
Label21: TLabel;
Label50: TLabel;
Label24: TLabel;
Label95: TLabel;
DBEdit11: TDBEdit;
DBEdit15: TDBEdit;
wwDBDateTimePicker2: TwwDBDateTimePicker;
wwDBDateTimePicker3: TwwDBDateTimePicker;
DBEdit16: TDBEdit;
wwDBDateTimePicker11: TwwDBDateTimePicker;
wwDBLookupCombo5: TwwDBLookupCombo;
wwDBLookupCombo6: TwwDBLookupCombo;
DBEdit44: TDBEdit;
bsSkinGroupBox5: TbsSkinGroupBox;
Label104: TLabel;
Label56: TLabel;
DBRichEdit3: TDBRichEdit;
DBMemo1: TDBMemo;
dxDBGrid1Column21: TdxDBGridColumn;
cxGrid1DBTableView1DBColumn18: TcxGridDBColumn;
dxDBGrid2Column12: TdxDBGridColumn;
dxDBGrid2Column13: TdxDBGridColumn;
dxDBGrid2Column14: TdxDBGridColumn;
dxDBGrid2Column15: TdxDBGridColumn;
dxDBGrid2Column16: TdxDBGridColumn;
dxDBGrid2Column17: TdxDBGridColumn;
dxDBGrid2Column18: TdxDBGridColumn;
dxDBGrid2Column19: TdxDBGridColumn;
dxDBGrid2Column20: TdxDBGridColumn;
dxDBGrid2Column21: TdxDBGridColumn;
dxDBGrid2Column22: TdxDBGridColumn;
dxDBGrid2Column23: TdxDBGridColumn;
dxDBGrid2Column24: TdxDBGridColumn;
dxDBGrid2Column25: TdxDBGridColumn;
dxDBGrid2Column26: TdxDBGridColumn;
dxDBGrid2Column27: TdxDBGridColumn;
dxDBGrid2Column28: TdxDBGridColumn;
dxDBGrid2Column29: TdxDBGridColumn;
dxDBGrid2Column30: TdxDBGridColumn;
dxDBGrid2Column31: TdxDBGridColumn;
dxDBGrid2Column32: TdxDBGridColumn;
dxDBGrid2Column33: TdxDBGridColumn;
cxGrid1DBTableView3: TcxGridDBTableView;
cxGrid1DBTableView3DBColumn: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn1: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn2: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn3: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn4: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn5: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn6: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn7: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn8: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn9: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn10: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn11: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn12: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn13: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn14: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn15: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn16: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn17: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn18: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn19: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn20: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn21: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn22: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn23: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn24: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn25: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn26: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn27: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn28: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn29: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn30: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn31: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn32: TcxGridDBColumn;
cxStyleRepository2: TcxStyleRepository;
cxStyle6: TcxStyle;
cxStyle7: TcxStyle;
cxStyle8: TcxStyle;
cxStyle9: TcxStyle;
cxGrid1DBTableView1DBColumn19: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn20: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn21: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn22: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn23: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn24: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn25: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn26: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn27: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn28: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn29: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn30: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn31: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn32: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn33: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn34: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn35: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn36: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn37: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn38: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn39: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn40: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn41: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn42: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn43: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn44: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn45: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn46: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn47: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn48: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn33: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn34: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn35: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn40: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn41: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn42: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn43: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn36: TcxGridDBColumn;
cxGrid1DBTableView3DBColumn37: TcxGridDBColumn;
PopupMenu4: TPopupMenu;
N29: TMenuItem;
N28: TMenuItem;
N27: TMenuItem;
N61: TMenuItem;
N76: TMenuItem;
N77: TMenuItem;
N78: TMenuItem;
N79: TMenuItem;
N80: TMenuItem;
N30: TMenuItem;
N32: TMenuItem;
N33: TMenuItem;
N39: TMenuItem;
N40: TMenuItem;
N41: TMenuItem;
N42: TMenuItem;
Label55: TLabel;
wwDBDateTimePicker15: TwwDBDateTimePicker;
bsSkinButton38: TbsSkinButton;
cxGrid1DBTableView1DBColumn49: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn50: TcxGridDBColumn;
Label78: TLabel;
RxDBLookupCombo10: TRxDBLookupCombo;
cxGrid1DBTableView1DBColumn52: TcxGridDBColumn;
bsSkinButton14: TbsSkinButton;
dxDBGrid2Column34: TdxDBGridColumn;
dxDBGrid2Column35: TdxDBGridColumn;
dxDBGrid2Column36: TdxDBGridColumn;
dxDBGrid2Column37: TdxDBGridColumn;
dxDBGrid2Column38: TdxDBGridColumn;
bsSkinTabSheet8: TbsSkinTabSheet;
bsSkinButton12: TbsSkinButton;
bsSkinPanel5: TbsSkinPanel;
bsSkinComboBox1: TbsSkinComboBox;
bsSkinStdLabel1: TbsSkinStdLabel;
bsSkinButton16: TbsSkinButton;
bsSkinDateEdit1: TbsSkinDateEdit;
bsSkinStdLabel2: TbsSkinStdLabel;
bsSkinButton17: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
dxDBGrid2Column39: TdxDBGridColumn;
DBComboBoxEh1: TDBComboBoxEh;
wwDBLookupCombo49: TwwDBLookupCombo;
Label125: TLabel;
Label113: TLabel;
wwDBDateTimePicker21: TwwDBDateTimePicker;
Label114: TLabel;
wwDBDateTimePicker22: TwwDBDateTimePicker;
Label115: TLabel;
DBEdit48: TDBEdit;
DBEdit49: TDBEdit;
Label116: TLabel;
bsSkinButton21: TbsSkinButton;
N25: TMenuItem;
N31: TMenuItem;
Label117: TLabel;
DBMemo11: TDBMemo;
DBEdit51: TDBEdit;
bsSkinButton18: TbsSkinButton;
bsSkinGroupBox6: TbsSkinGroupBox;
bsSkinButton19: TbsSkinButton;
bsSkinButton20: TbsSkinButton;
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox2: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox3: TbsSkinCheckRadioBox;
bsSkinGroupBox1: TbsSkinGroupBox;
Label62: TLabel;
Label54: TLabel;
Label63: TLabel;
Label64: TLabel;
Label66: TLabel;
Label67: TLabel;
Label68: TLabel;
Label69: TLabel;
Label70: TLabel;
Label71: TLabel;
Label72: TLabel;
Label73: TLabel;
Label74: TLabel;
Label75: TLabel;
Label76: TLabel;
Label77: TLabel;
Label80: TLabel;
Label81: TLabel;
Label83: TLabel;
Label84: TLabel;
Label86: TLabel;
Label87: TLabel;
Label88: TLabel;
Label89: TLabel;
Label90: TLabel;
Label91: TLabel;
Label92: TLabel;
Label93: TLabel;
Label94: TLabel;
Label96: TLabel;
Label97: TLabel;
Label109: TLabel;
Label111: TLabel;
Label112: TLabel;
DBMemo10: TDBMemo;
RxDBLookupCombo6: TRxDBLookupCombo;
wwDBLookupCombo1: TwwDBLookupCombo;
DBEdit14: TDBEdit;
wwDBDateTimePicker13: TwwDBDateTimePicker;
wwDBDateTimePicker16: TwwDBDateTimePicker;
wwDBDateTimePicker17: TwwDBDateTimePicker;
DBEdit23: TDBEdit;
DBEdit24: TDBEdit;
DBEdit25: TDBEdit;
RxDBLookupCombo9: TRxDBLookupCombo;
DBEdit26: TDBEdit;
DBEdit27: TDBEdit;
DBEdit28: TDBEdit;
DBEdit29: TDBEdit;
DBEdit30: TDBEdit;
DBEdit31: TDBEdit;
wwDBLookupCombo3: TwwDBLookupCombo;
DBEdit32: TDBEdit;
RxDBLookupCombo12: TRxDBLookupCombo;
DBEdit33: TDBEdit;
DBEdit34: TDBEdit;
DBEdit35: TDBEdit;
DBEdit36: TDBEdit;
wwDBDateTimePicker20: TwwDBDateTimePicker;
DBEdit37: TDBEdit;
DBEdit38: TDBEdit;
DBEdit39: TDBEdit;
DBComboBox1: TDBComboBox;
DBComboBox2: TDBComboBox;
RxDBLookupCombo14: TRxDBLookupCombo;
RxDBLookupCombo15: TRxDBLookupCombo;
DBEdit40: TDBEdit;
DBEdit41: TDBEdit;
RxDBLookupCombo18: TRxDBLookupCombo;
DBEdit42: TDBEdit;
bsSkinGroupBox7: TbsSkinGroupBox;
Label118: TLabel;
wwDBDateTimePicker23: TwwDBDateTimePicker;
Label119: TLabel;
wwDBDateTimePicker24: TwwDBDateTimePicker;
Label120: TLabel;
wwDBDateTimePicker25: TwwDBDateTimePicker;
Label121: TLabel;
wwDBDateTimePicker26: TwwDBDateTimePicker;
Label122: TLabel;
DBEdit50: TDBEdit;
Label123: TLabel;
wwDBDateTimePicker27: TwwDBDateTimePicker;
Label124: TLabel;
wwDBDateTimePicker28: TwwDBDateTimePicker;
RxDBLookupCombo19: TRxDBLookupCombo;
Label126: TLabel;
Label127: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
Label128: TLabel;
wwDBDateTimePicker29: TwwDBDateTimePicker;
Label129: TLabel;
wwDBDateTimePicker30: TwwDBDateTimePicker;
Label130: TLabel;
DBEdit52: TDBEdit;
Label131: TLabel;
wwDBDateTimePicker31: TwwDBDateTimePicker;
Label132: TLabel;
wwDBDateTimePicker32: TwwDBDateTimePicker;
Label133: TLabel;
DBEdit53: TDBEdit;
Label134: TLabel;
wwDBDateTimePicker33: TwwDBDateTimePicker;
Label135: TLabel;
wwDBComboBox5: TwwDBComboBox;
Label136: TLabel;
wwDBDateTimePicker34: TwwDBDateTimePicker;
Label137: TLabel;
RxDBLookupCombo20: TRxDBLookupCombo;
Label138: TLabel;
wwDBDateTimePicker35: TwwDBDateTimePicker;
Label139: TLabel;
wwDBDateTimePicker36: TwwDBDateTimePicker;
Label140: TLabel;
wwDBDateTimePicker37: TwwDBDateTimePicker;
Label141: TLabel;
Label142: TLabel;
RxDBLookupCombo22: TRxDBLookupCombo;
DBEdit54: TDBEdit;
bsSkinExPanel1: TbsSkinExPanel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
Label33: TLabel;
Label48: TLabel;
Label49: TLabel;
Label79: TLabel;
Label82: TLabel;
Label143: TLabel;
DBEdit17: TDBEdit;
DBEdit19: TDBEdit;
wwDBDateTimePicker7: TwwDBDateTimePicker;
wwDBDateTimePicker8: TwwDBDateTimePicker;
DBEdit20: TDBEdit;
wwDBDateTimePicker9: TwwDBDateTimePicker;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker10: TwwDBDateTimePicker;
wwDBDateTimePicker18: TwwDBDateTimePicker;
wwDBDateTimePicker19: TwwDBDateTimePicker;
DBEdit55: TDBEdit;
bsSkinCheckRadioBox4: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox5: TbsSkinCheckRadioBox;
Label144: TLabel;
DBEdit56: TDBEdit;
Label145: TLabel;
DBEdit57: TDBEdit;
Label146: TLabel;
DBEdit58: TDBEdit;
dxDBGrid2Column40: TdxDBGridColumn;
cxGrid1DBTableView3DBColumn38: TcxGridDBColumn;
N43: TMenuItem;
N44: TMenuItem;
N45: TMenuItem;
N46: TMenuItem;
cxGrid1DBTableView1DBColumn51: TcxGridDBColumn;
Label147: TLabel;
DBEdit59: TDBEdit;
Label148: TLabel;
DBEdit60: TDBEdit;
Label149: TLabel;
DBEdit61: TDBEdit;
Label150: TLabel;
DBEdit62: TDBEdit;
cxGrid1DBTableView1DBColumn53: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn54: TcxGridDBColumn;
Label151: TLabel;
DBEdit63: TDBEdit;
bsSkinExPanel2: TbsSkinExPanel;
bsSkinGroupBox8: TbsSkinGroupBox;
bsSkinGroupBox9: TbsSkinGroupBox;
bsSkinGroupBox11: TbsSkinGroupBox;
Label152: TLabel;
wwDBLookupCombo4: TwwDBLookupCombo;
Label153: TLabel;
DBEdit64: TDBEdit;
Label154: TLabel;
DBEdit65: TDBEdit;
Label155: TLabel;
RxDBLookupCombo23: TRxDBLookupCombo;
Label156: TLabel;
wwDBDateTimePicker38: TwwDBDateTimePicker;
Label157: TLabel;
wwDBDateTimePicker39: TwwDBDateTimePicker;
wwDBLookupCombo7: TwwDBLookupCombo;
wwDBLookupCombo8: TwwDBLookupCombo;
Label158: TLabel;
Label159: TLabel;
Label163: TLabel;
RxDBLookupCombo26: TRxDBLookupCombo;
Label165: TLabel;
RxDBLookupCombo27: TRxDBLookupCombo;
DBMemo12: TDBMemo;
Label166: TLabel;
bsSkinButton22: TbsSkinButton;
Label167: TLabel;
wwDBDateTimePicker40: TwwDBDateTimePicker;
Label168: TLabel;
wwDBDateTimePicker41: TwwDBDateTimePicker;
Label169: TLabel;
wwDBLookupCombo9: TwwDBLookupCombo;
Label170: TLabel;
DBEdit67: TDBEdit;
Label160: TLabel;
Label161: TLabel;
Label162: TLabel;
wwDBDateTimePicker42: TwwDBDateTimePicker;
Label171: TLabel;
wwDBDateTimePicker43: TwwDBDateTimePicker;
Label172: TLabel;
DBEdit66: TDBEdit;
bsSkinCheckRadioBox6: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox7: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox8: TbsSkinCheckRadioBox;
Label173: TLabel;
wwDBDateTimePicker44: TwwDBDateTimePicker;
Label174: TLabel;
Label175: TLabel;
DBEdit68: TDBEdit;
RxDBLookupCombo25: TRxDBLookupCombo;
RxDBLookupCombo28: TRxDBLookupCombo;
RxDBLookupCombo32: TRxDBLookupCombo;
RxDBLookupCombo21: TRxDBLookupCombo;
cxGrid1DBTableView1DBColumn55: TcxGridDBColumn;
bsSkinButton23: TbsSkinButton;
DBComboBoxEh2: TDBComboBoxEh;
DBComboBoxEh3: TDBComboBoxEh;
bsSkinButton24: TbsSkinButton;
cxGrid1DBTableView1DBColumn56: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn57: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn58: TcxGridDBColumn;
N47: TMenuItem;
N48: TMenuItem;
wwDBLookupCombo10: TwwDBLookupCombo;
Label176: TLabel;
wwDBDateTimePicker45: TwwDBDateTimePicker;
Label177: TLabel;
bsSkinButton25: TbsSkinButton;
bsSkinPanel6: TbsSkinPanel;
bsSkinButton26: TbsSkinButton;
Label178: TLabel;
wwDBLookupCombo11: TwwDBLookupCombo;
Label179: TLabel;
wwDBLookupCombo12: TwwDBLookupCombo;
Label180: TLabel;
wwDBDateTimePicker46: TwwDBDateTimePicker;
Label181: TLabel;
wwDBLookupCombo13: TwwDBLookupCombo;
Label182: TLabel;
Label183: TLabel;
RxDBLookupCombo8: TRxDBLookupCombo;
Label184: TLabel;
bsSkinComboBox2: TbsSkinComboBox;
bsSkinStdLabel3: TbsSkinStdLabel;
bsSkinStdLabel4: TbsSkinStdLabel;
bsSkinDateEdit2: TbsSkinDateEdit;
bsSkinButton27: TbsSkinButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
p_op_gain: TADOQuery;
bsSkinButton28: TbsSkinButton;
OpenDialog1: TOpenDialog;
v_op_ctnmg_detail: TADOQuery;
t_op_ctnmg_status: TADOQuery;
t_ch_fee_audit: TADOQuery;
t_ch_fee_audit1: TDataSource;
DBEdit69: TDBEdit;
dxDBGrid2Column41: TdxDBGridColumn;
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure Panel2Resize(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure t_op_railwayBeforeEdit(DataSet: TDataSet);
procedure t_op_railwayBeforePost(DataSet: TDataSet);
procedure bsSkinButton10Click(Sender: TObject);
procedure dxDBGrid1Column3CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure dxDBGrid1Column2CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit3KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo13KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit7KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker2KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker1KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo11KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo7KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit18KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit2Change(Sender: TObject);
procedure DBEdit3Change(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure bsSkinButton13Click(Sender: TObject);
procedure N17Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure N36Click(Sender: TObject);
procedure N37Click(Sender: TObject);
procedure wwDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure N9Click(Sender: TObject);
procedure N20Click(Sender: TObject);
procedure t_op_railwayBeforeCancel(DataSet: TDataSet);
procedure N21Click(Sender: TObject);
procedure N24Click(Sender: TObject);
procedure dxDBGrid1Column29CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure N26Click(Sender: TObject);
procedure RxDBLookupCombo16Change(Sender: TObject);
procedure RxDBLookupCombo17Change(Sender: TObject);
procedure RxDBLookupCombo16KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo17KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo16Enter(Sender: TObject);
procedure RxDBLookupCombo16Exit(Sender: TObject);
procedure bsSkinSpeedButton1Click(Sender: TObject);
procedure bsSkinPageControl1Change(Sender: TObject);
procedure RxDBLookupCombo11Change(Sender: TObject);
procedure DBEdit6KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure N29Click(Sender: TObject);
procedure wwDBLookupCombo52Change(Sender: TObject);
procedure wwDBLookupCombo2Change(Sender: TObject);
procedure wwDBLookupCombo5Change(Sender: TObject);
procedure wwDBLookupCombo6Change(Sender: TObject);
procedure RxDBLookupCombo3Change(Sender: TObject);
procedure t_op_railway_fenAfterPost(DataSet: TDataSet);
procedure t_op_railway_fenAfterOpen(DataSet: TDataSet);
procedure cxGrid1DBTableView1CellClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
procedure wwDBComboBox4Change(Sender: TObject);
procedure dxDBGrid2DblClick(Sender: TObject);
procedure bsSkinButton32Click(Sender: TObject);
procedure t_op_railwayAfterOpen(DataSet: TDataSet);
procedure bsSkinButton33Click(Sender: TObject);
procedure bsSkinButton34Click(Sender: TObject);
procedure bsSkinButton31Click(Sender: TObject);
procedure t_op_railway_fenBeforeCancel(DataSet: TDataSet);
procedure t_op_railway_fenBeforePost(DataSet: TDataSet);
procedure N27Click(Sender: TObject);
procedure N76Click(Sender: TObject);
procedure N78Click(Sender: TObject);
procedure N80Click(Sender: TObject);
procedure N32Click(Sender: TObject);
procedure N41Click(Sender: TObject);
procedure N39Click(Sender: TObject);
procedure bsSkinButton38Click(Sender: TObject);
procedure wwDBComboBox2Change(Sender: TObject);
procedure wwDBLookupCombo1Change(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure fra_op_letter_free1bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure bsSkinButton36Click(Sender: TObject);
procedure t_op_railwayBeforeDelete(DataSet: TDataSet);
procedure fra_fee1bsSkinButton8Click(Sender: TObject);
procedure RxDBLookupCombo1Change(Sender: TObject);
procedure Notebook1PageChanged(Sender: TObject);
procedure DBComboBoxEh1Change(Sender: TObject);
procedure DBComboBoxEh1DropDown(Sender: TObject);
procedure DBEdit49Change(Sender: TObject);
procedure bsSkinButton21Click(Sender: TObject);
procedure DBEdit50Change(Sender: TObject);
procedure N31Click(Sender: TObject);
procedure DBEdit51Change(Sender: TObject);
procedure bsSkinButton19Click(Sender: TObject);
procedure bsSkinButton20Click(Sender: TObject);
procedure bsSkinButton18Click(Sender: TObject);
procedure RxDBLookupCombo4Change(Sender: TObject);
procedure t_op_railway_fenBeforeDelete(DataSet: TDataSet);
procedure N44Click(Sender: TObject);
procedure N46Click(Sender: TObject);
procedure RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo2Enter(Sender: TObject);
procedure RxDBLookupCombo23Enter(Sender: TObject);
procedure RxDBLookupCombo23Exit(Sender: TObject);
procedure bsSkinButton22Click(Sender: TObject);
procedure DBEdit1Change(Sender: TObject);
procedure RxDBLookupCombo25Enter(Sender: TObject);
procedure RxDBLookupCombo25Exit(Sender: TObject);
procedure RxDBLookupCombo28Enter(Sender: TObject);
procedure RxDBLookupCombo28Exit(Sender: TObject);
procedure RxDBLookupCombo24Enter(Sender: TObject);
procedure RxDBLookupCombo24Exit(Sender: TObject);
procedure RxDBLookupCombo21Enter(Sender: TObject);
procedure RxDBLookupCombo21Exit(Sender: TObject);
procedure bsSkinButton23Click(Sender: TObject);
procedure DBComboBoxEh2DropDown(Sender: TObject);
procedure DBComboBoxEh3Change(Sender: TObject);
procedure bsSkinButton24Click(Sender: TObject);
procedure N48Click(Sender: TObject);
procedure bsSkinButton25Click(Sender: TObject);
procedure bsSkinButton27Click(Sender: TObject);
procedure bsSkinButton26Click(Sender: TObject);
procedure wwDBLookupCombo11Change(Sender: TObject);
procedure wwDBLookupCombo13Change(Sender: TObject);
procedure bsSkinButton28Click(Sender: TObject);
private
// procedure update_railctn(table:Tadoquery);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Letter_flag:integer;
procedure t_raildatecharge(Sender:TField);
procedure t_railfcdatechange(Sender:TField);
procedure t_railkgscharge(Sender:TField);
{ Private declarations }
public
{ Public declarations }
function getband(bandid:integer):boolean ;
procedure setconcolor;
end;
var
frm_op_railway: Tfrm_op_railway;
railwayopen:boolean;
implementation
uses u_main, my_sys_function, u_data_share, u_sys_progress,
u_op_date_change, u_op_railway_add,u_op_railwayctn_history,
u_ch_fee_zhupiao, u_op_letter, u_op_givectn_add, u_sys_grid_cx,
u_op_railway_batchfee;
{$R *.dfm}
{
procedure Tfrm_op_railway.update_railctn(table:Tadoquery);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
var
ctn_string:widestring;
bok:Tbookmark;
pkgs:integer;
kgs,cbm:double;
begin
pkgs:=0;
kgs:=0;
cbm:=0;
if table.IsEmpty then
begin
try
table.DataSource.DataSet.Edit;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>1']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>2']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>3']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>4']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>5']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>6']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>7']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>8']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>9']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>10']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
table.DataSource.DataSet['<27><>TEU']:=0;
table.DataSource.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
table.DataSource.DataSet.post;
except
showmessage('<27><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
abort;
end;
end
else
begin
frm_main.t_sum_ctn.close;
frm_main.t_sum_ctn.open;
bok:=table.GetBookmark;
try
table.DataSource.DataSet.Edit;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>1']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>2']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>3']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>4']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>5']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>6']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>7']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>8']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>9']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>10']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
table.DataSource.DataSet['<27><>TEU']:=0;
table.DataSource.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
table.first;
while not table.eof do
begin
if table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring<>'' then begin
if table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>1').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>1']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>1']+1;
// table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>2').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>2']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>2']+1;
// table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>3').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>3']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>3']+1;
// table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>4').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>4']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>4']+1;
// table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>5').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>5']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>5']+1;
// table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>6').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>6']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>6']+1;
// table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>7').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>7']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>7']+1;
// table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>8').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>8']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>8']+1;
// table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>9').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>9']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>9']+1;
// table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>10').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>10']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>10']+1;
// table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+1;
// table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end;
if not frm_main.t_sum_ctn.locate('<27><><EFBFBD><EFBFBD>',table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring,[]) then
begin
frm_main.t_sum_ctn.insert;
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>']:=table.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring;
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>']:=1;
frm_main.t_sum_ctn.post;
end
else
begin
frm_main.t_sum_ctn.edit;
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>']:=frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>']+1;
frm_main.t_sum_ctn.post;
end;
end;
pkgs:=pkgs+table.fieldbyname('<27><><EFBFBD><EFBFBD>').AsInteger;
kgs:=kgs+table.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat;
cbm:=cbm+table.fieldbyname('<27><><EFBFBD><EFBFBD>').Asfloat;
table.next;
end;
ctn_string:='';
if not frm_main.t_sum_ctn.IsEmpty then begin
frm_main.t_sum_ctn.first;
while not frm_main.t_sum_ctn.eof do
begin
if ctn_string='' then
begin
ctn_string:=frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring+'*'+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end
else
begin
ctn_string:=ctn_string+' '+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring+'*'+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end;
frm_main.t_sum_ctn.next;
end;
end;
table.DataSource.DataSet['<27><>װ<EFBFBD><D7B0>']:=ctn_string;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=pkgs;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=kgs;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=cbm;
table.DataSource.DataSet.post;
except
showmessage('<27><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
table.GotoBookmark(bok);
abort;
end;
table.GotoBookmark(bok);
end;
end;
}
procedure Tfrm_op_railway.bsSkinButton7Click(Sender: TObject);
begin
table_Prior(TAdoQuery(t_op_railway1.DataSet));
end;
procedure Tfrm_op_railway.bsSkinButton6Click(Sender: TObject);
begin
table_next(TAdoQuery(t_op_railway1.DataSet));
end;
procedure Tfrm_op_railway.bsSkinButton2Click(Sender: TObject);
begin
table_post(TAdoQuery(t_op_railway1.DataSet));
table_post(TAdoQuery(t_op_railway_fen1.DataSet));
end;
procedure Tfrm_op_railway.bsSkinButton4Click(Sender: TObject);
begin
if t_op_railway.FieldByName('װ<>˷<EFBFBD>ʽ').asstring='<27><>·<EFBFBD><C2B7>Ʊ'then
begin
if not t_op_railway_fen.IsEmpty then
begin
showmessage('<27><>·<EFBFBD><C2B7>Ʊ<EFBFBD><C6B1><EFBFBD>ڷ<EFBFBD>Ʊ<EFBFBD><C6B1>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
end;
t_ch_fee.close;
t_ch_fee.Parameters[0].value:=t_op_railway1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee.open;
if not t_ch_fee.IsEmpty then
begin
showmessage('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
table_delete(TAdoQuery(t_op_railway1.DataSet));
end;
procedure Tfrm_op_railway.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(TAdoQuery(t_op_railway1.DataSet));
end;
procedure Tfrm_op_railway.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_railway.FormClose(Sender: TObject;
var Action: TCloseAction);
var
seabandini:tinifile ;
begin
seabandini:=Tinifile.Create(ExtractFilePath(application.ExeName)+'GroupBoxVisible.ini');
try
seabandini.Writebool('railway','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢROLL',bsSkinExPanel1.RollState);
finally
freeandnil(seabandini);
end;
savecxgridview(cxGrid1DBTableView1,'cx'+caption+'1');
savecxgridview(cxGrid1DBTableView3,'cx'+caption+'3');
savereggrid(dxdbgrid1,caption);
savereggrid(dxdbgrid2,caption+'2');
savewwgrid(fra_fee1.wwDBGrid1,'<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
savewwgrid(fra_fee1.wwDBGrid2,'<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
railwayopen:=false;
frm_op_railway.Hide;
frm_op_railway.ManualFloat(frm_op_railway.BoundsRect );
frm_main.freeTabs('frm_op_railway');
if assigned(frm_op_letter) then
frm_op_letter.close;
action:=cafree;
frm_op_railway:=nil;
end;
procedure Tfrm_op_railway.FormShow(Sender: TObject);
var
seabandini:tinifile ;
begin
bsSkinPanel5.Visible:=false;
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
Notebook1.PageIndex:=0;
frm_sys_progress.bsSkinGauge1.MaxValue:=16;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then begin
DBEdit8.Width:=110;
bsSkinSpeedButton1.Visible:=false;
if frm_data_share.t_sys_noset.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6>༭').AsBoolean then begin
DBEdit8.ReadOnly:=false;
end else begin
DBEdit8.ReadOnly:=true;
end;
end else if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>ֶ<EFBFBD>ȡ<EFBFBD><C8A1>' then begin
DBEdit8.Width:=90;
bsSkinSpeedButton1.Visible:=true;
if frm_data_share.t_sys_noset.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6>༭').AsBoolean then begin
DBEdit8.ReadOnly:=false;
end else begin
DBEdit8.ReadOnly:=true;
end;
end else if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>ֶ<EFBFBD><D6B6>༭' then begin
DBEdit8.ReadOnly:=false;
DBEdit8.Width:=110;
bsSkinSpeedButton1.Visible:=false;
end;
t_op_railway.Close;
t_op_railway.SQL.clear;
if strtobool(get_parameters_value(132,'true')) then begin
t_op_railway.SQL.Add('select top 100 * from t_op_railway where <20><><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and '
+'(¼<><C2BC><EFBFBD><EFBFBD>='+''''+employee+''''
+' or <20><><EFBFBD><EFBFBD>Ա='+''''+employee+''''
+' or <20>ͷ<EFBFBD>Ա='+''''+employee+''''+')'
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC');
end else begin
t_op_railway.SQL.Add('select * from t_op_railway where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> and '
+' SUBSTRING(CONVERT(char(15),<2C>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>,111),1,7)='''+FormatDateTime('YYYY',Date)+'/'+FormatDateTime('MM',Date)+''' and '
+open_data('0006','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' order by <20>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD> DESC');
end;
t_op_railway.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_op_letter_free1.op_type.Text:='<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>';
fra_op_letter_free1.t_op_letter.DataSource:=t_op_railway1;
fra_op_letter_free1.t_op_letter.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_op_letter_free1.t_op_letter_free_detail.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_op_railway_fen.open;
t_ch_fee_audit.Open;
v_op_railway_detail.close;
v_op_railway_detail.sql.text:='select * from t_op_railway where <20><><EFBFBD><EFBFBD><><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD> in (select top 1000 '
+' <20><><EFBFBD><EFBFBD> from t_op_railway where 1=1 and '
+'(¼<><C2BC><EFBFBD><EFBFBD>='+''''+employee+''''
+' or <20><><EFBFBD><EFBFBD>Ա='+''''+employee+''''
+' or <20>ͷ<EFBFBD>Ա='+''''+employee+''''+')) order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
v_op_railway_detail.open;
loadreggrid(dxdbgrid1,false,caption);
loadreggrid(dxdbgrid2,false,caption+'2');
loadcxgridview(cxGrid1DBTableView1,'cx'+caption+'1');
loadcxgridview(cxGrid1DBTableView3,'cx'+caption+'3');
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
if if_open('297') or if_open('298') then
begin
fra_fee1.edit_type.text:='6';
fra_fee1.edit_data.text:='0006';
fra_fee1.edit_report.text:='<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>';
fra_fee1.t_ch_accept.DataSource:=t_op_railway1;
if strtobool(get_parameters_value(150,'false')) then
fra_fee1.bsSkinPanel3.Visible:=true;
fra_fee1.DBEdit48.DataSource:=t_op_railway1;
fra_fee1.DBEdit43.DataSource:=t_op_railway1;
if if_open('297') then
begin
fra_fee1.t_ch_accept.DataSource:=t_op_railway1;
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('209')=false) then
begin
fra_fee1.t_ch_accept.close;
fra_fee1.t_ch_accept.SQL.Clear;
fra_fee1.t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
end;
fra_fee1.t_ch_accept.open;
fra_fee1.a_shen_delete.open;
fra_fee1.a_shen_modify_old.open;
fra_fee1.a_shen_modify_new.open;
fra_fee1.Panel3.visible:=true;
end
else
fra_fee1.Panel3.visible:=false;
if if_open('298') then
begin
fra_fee1.t_ch_pay.DataSource:=t_op_railway1;
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('209')=false) then
begin
fra_fee1.t_ch_pay.close;
fra_fee1.t_ch_pay.SQL.Clear;
fra_fee1.t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
end;
fra_fee1.t_ch_pay.open;
fra_fee1.p_shen_delete.open;
fra_fee1.p_shen_modify_old.open;
fra_fee1.p_shen_modify_new.open;
fra_fee1.Panel1.visible:=true;
end
else
fra_fee1.Panel1.visible:=false;
if fra_fee1.Panel1.visible and
fra_fee1.Panel3.visible then
begin
if if_open('228') then begin
fra_fee1.Panel8.Visible:=true;
fra_fee1.Panel8.Height:=20;
end else
fra_fee1.Panel8.Visible:=false;
fra_fee1.t_op_gain.DataSource:=t_op_railway1;
fra_fee1.t_op_gain.open;
fra_fee1.t_op_gain_main.DataSource:=t_op_railway1;
fra_fee1.t_op_gain_main.open;
fra_fee1.Panel9.Visible:=false;
end
else
begin
fra_fee1.Panel8.Visible:=false;
end;
end
else
begin
fra_fee1.Visible:=false;
end;
loadwwgrid(fra_fee1.wwDBGrid1,'<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
loadwwgrid(fra_fee1.wwDBGrid2,'<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_op_state1.edit_state.text:='6';
fra_op_state1.t_op_state.DataSource:=t_op_railway1;
fra_op_state1.t_op_state.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_op_card1.t_op_card.DataSource:=t_op_railway1;
fra_op_card1.t_op_card.open;
frm_data_share.t_crm_client.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_crm_client_weituo.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_crm_client_shiper.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_crm_client_shouhuo.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_code_source.requery;
if not frm_data_share.t_code_railport.Active then
frm_data_share.t_code_railport.open
else
frm_data_share.t_code_railport.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_sys_employee.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_code_code.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_code_fee.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
if not frm_data_share.t_code_railwayctnsource.Active then
frm_data_share.t_code_railwayctnsource.open;
if not frm_data_share.t_code_railwaypath.Active then
frm_data_share.t_code_railwaypath.open;
frm_data_share.t_code_currency.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
bsSkinTabSheet2.TabVisible:=if_open('297') or if_open('298');
seabandini:=Tinifile.Create(ExtractFilePath(application.ExeName)+'GroupBoxVisible.ini');
try
bsSkinCheckRadioBox1.Checked:=seabandini.ReadBool('railway','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ',true);
bsSkinCheckRadioBox2.Checked:=seabandini.ReadBool('railway','ɽ<>ڿڰ<DABF><DAB0><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>Ϣ',true);
bsSkinCheckRadioBox3.Checked:=seabandini.ReadBool('railway','<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ',true);
bsSkinCheckRadioBox4.Checked:=seabandini.ReadBool('railway','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ',true);
bsSkinCheckRadioBox5.Checked:=seabandini.ReadBool('railway','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢROLL',true);
finally
freeandnil(seabandini);
end;
railwayopen:=true;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
procedure Tfrm_op_railway.bsSkinButton11Click(Sender: TObject);
var
answer:TModalResult;
begin
if bsSkinButton11.Caption='<27><EFBFBD>޸<EFBFBD>' then
begin
Notebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
wwDBComboBox4.OnChange(nil);
DBEdit51.OnChange(nil);
Exit;
end;
if bsSkinButton11.Caption='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>' then
begin
if (t_op_railway.State=dsinsert)or(t_op_railway.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
t_op_railway.post;
end;
if answer=mrNo then
begin
t_op_railway.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
Notebook1.PageIndex:=0;
bsSkinButton11.Caption:='<27><EFBFBD>޸<EFBFBD>';
end;
if bsSkinButton11.Caption='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ' then
begin
if (t_op_railway_fen.State=dsinsert)or(t_op_railway_fen.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
t_op_railway_fen.post;
end;
if answer=mrNo then
begin
t_op_railway_fen.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
try
t_op_railway1.Enabled:=false;
t_op_railway1.DataSet:=t_op_railway;
finally
t_op_railway1.Enabled:=true;
end;
Notebook1.PageIndex:=1;
exit;
end;
end;
procedure Tfrm_op_railway.bsSkinButton8Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton8.ClientToScreen(Point(0,bsSkinButton8.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_railway.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.Width/14);
bsSkinButton7.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton9.Width:=i;
bsSkinButton10.Width:=i;
bsSkinButton1.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton38.Width:=i;
bsSkinButton12.Width:=i;
bsSkinButton23.Width:=i;
bsSkinButton13.Left:=Panel2.Width-bsSkinButton13.Width-20;
end;
procedure Tfrm_op_railway.bsSkinButton1Click(Sender: TObject);
begin
if t_op_railway1.DataSet=nil then
exit;
if (t_op_railway1.DataSet.State=dsinsert)or(t_op_railway1.DataSet.State=dsedit) then
t_op_railway1.DataSet.post;
try
frm_op_railway_add:=Tfrm_op_railway_add.Create (self);
if not t_op_railway1.DataSet.IsEmpty then
begin
frm_op_railway_add.shiptype:='';
frm_op_railway_add.bstype:='';
frm_op_railway_add.PNO:='';
frm_op_railway_add.shiptype:=t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
frm_op_railway_add.bstype:=t_op_railway1.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString;
frm_op_railway_add.PNO:=t_op_railway1.DataSet.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString;
end;
if t_op_railway1.DataSet=t_op_railway then
begin
frm_op_railway_add.data1.Enabled:=false;
frm_op_railway_add.data1.DataSet:=t_op_railway;
frm_op_railway_add.data1.Enabled:=true;
frm_op_railway_add_num:=1;
end
else
begin
frm_op_railway_add.data1.Enabled:=false;
frm_op_railway_add.data1.DataSet:=t_op_railway_fen;
frm_op_railway_add.data1.Enabled:=true;
frm_op_railway_add.bsSkinCheckRadioBox6.Checked:=true;
frm_op_railway_add.bsSkinCheckRadioBox1.Enabled:=false;
frm_op_railway_add.bsSkinCheckRadioBox5.Enabled:=false;
frm_op_railway_add.bsSkinCheckRadioBox6.Enabled:=false;
frm_op_railway_add_num:=2;
end;
if frm_op_railway_add.ShowModal<>mrCancel then begin
if not frm_op_railway.bsSkinTabSheet1.Showing then
frm_op_railway.bsSkinTabSheet1.Show;
end;
finally
frm_op_railway_add.Free;
end;
end;
procedure Tfrm_op_railway.t_op_railwayBeforeEdit(DataSet: TDataSet);
begin
op_befor_post(Tadoquery(t_op_railway1.dataset),'0006');
end;
procedure Tfrm_op_railway.t_op_railwayBeforePost(DataSet: TDataSet);
var
opcomp:string;
begin
table_before_post(t_op_railway,'ί<>е<EFBFBD>λ');
table_before_post(t_op_railway,'<27><><EFBFBD><EFBFBD>Ա');
table_before_post(t_op_railway,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
// table_before_post(t_op_railway,'<27>ͷ<EFBFBD>Ա');
// table_before_post(t_op_airtruck,'<27><><EFBFBD><EFBFBD><E1B5A5>');
// table_before_post(t_op_airtruck,'<27><><EFBFBD><EFBFBD><E1B5A5>');
table_before_post(t_op_railway,'<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>');
// table_before_post(t_op_railway,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_railway,'ҵ<><D2B5><EFBFBD><EFBFBD>Դ');
table_before_post(t_op_railway,'<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>');
table_before_post(t_op_railway,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
if trim(t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)<>'' then
if not frm_data_share.t_sys_employee.Locate('<27><><EFBFBD><EFBFBD>',trim(t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring),[]) then
begin
showmessage('ϵͳ<CFB5>в<EFBFBD><D0B2><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>˶<EFBFBD>');
abort;
end;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then
if t_op_railway.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull or (trim(t_op_railway['ί<>б<EFBFBD><D0B1><EFBFBD>'])='') then begin
opcomp:= t_op_railway.FieldByName('<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>').AsString;
if opcomp='' then
opcomp:=subComp;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_op_railway['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(5,opcomp,department,employee,t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_op_railway['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(5,opcomp,department,employee,t_op_railway['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']);
end;
if (not t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').isnull) and (t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').oldvalue<>t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value) then
if (t_op_railway.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>'<27><><EFBFBD>ĵ<EFBFBD>') and (Logininfo.endday>=t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime) then begin
showmessage('<27>˽ӵ<CBBD><D3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>ҵ<EFBFBD>񣡣<EFBFBD>');
abort;
end;
if op_empty('t_op_railway',t_op_railway) then
Abort;
if t_op_railway.FieldByName('ί<>е<EFBFBD>λ').OldValue<>t_op_railway.FieldByName('ί<>е<EFBFBD>λ').asstring then
begin
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_railway.FieldByName('ί<>е<EFBFBD>λ').asstring,[])then
begin
if frm_data_share.t_crm_client_all.fieldbyname('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>'then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5>ί<EFBFBD>е<EFBFBD>λ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><E6A3AC><EFBFBD><EFBFBD><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>лָ<D0BB><D6B8>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
end;
if t_op_railway.State=dsinsert then
begin
if t_op_railway.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
begin
t_op_railway['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.RailWayBsNo,'RW'));
end;
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_railway['<27><><EFBFBD><EFBFBD>'];
t_op_railway['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
t_op_railway['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
if strtobool(get_parameters_value(45,'false')) then
begin
if (trim(t_op_railway.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='') or (t_op_railway.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ĵ<EFBFBD>') then
begin
t_op_railway['ί<>б<EFBFBD>׼']:=t_op_railway['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_railway['ί<>б<EFBFBD>׼']:=t_op_railway['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_op_railway['ί<>б<EFBFBD>׼']:=t_op_railway['<27><><EFBFBD><EFBFBD>'];
end;
// t_op_railway['upload']:=1;
end;
procedure Tfrm_op_railway.bsSkinButton10Click(Sender: TObject);
begin
query_railway(1,'0006');
end;
procedure Tfrm_op_railway.dxDBGrid1Column3CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=dxgrid_color_fee(ANode.strings[dxDBGrid1Column3.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_op_railway.dxDBGrid1Column2CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=dxgrid_color('<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>',ANode.Strings[dxDBGrid1Column2.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_op_railway.DBEdit1KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit2);
end;
procedure Tfrm_op_railway.DBEdit2KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit3);
end;
procedure Tfrm_op_railway.DBEdit3KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit4);
end;
procedure Tfrm_op_railway.DBEdit4KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit4);
end;
procedure Tfrm_op_railway.RxDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo31);
end;
procedure Tfrm_op_railway.RxDBLookupCombo13KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit8);
end;
procedure Tfrm_op_railway.DBEdit7KeyPress(Sender: TObject; var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker2);
end;
procedure Tfrm_op_railway.wwDBDateTimePicker2KeyPress(Sender: TObject;
var Key: Char);
begin
if key = #13 then
begin
Key :=#0;
Perform(CM_DialogKey,VK_TAB,0);
end;
end;
procedure Tfrm_op_railway.wwDBDateTimePicker1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo7);
end;
procedure Tfrm_op_railway.RxDBLookupCombo11KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo18);
end;
procedure Tfrm_op_railway.RxDBLookupCombo7KeyPress(Sender: TObject;
var Key: Char);
begin
// key_wwDBLookupCombo(Key,wwDBLookupCombo10);
end;
procedure Tfrm_op_railway.DBEdit18KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
end;
procedure Tfrm_op_railway.DBEdit2Change(Sender: TObject);
begin
DBEdit2.Color:=dxgrid_color('<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>',DBEdit2.text);
end;
procedure Tfrm_op_railway.DBEdit3Change(Sender: TObject);
begin
DBEdit3.Color:=dxgrid_color_fee(DBEdit3.text);
end;
procedure Tfrm_op_railway.N10Click(Sender: TObject);
begin
// cxGrid1DBTableView1.
cxGrid1DBTableView1.Columns[cxGrid1DBTableView1.DataController.FocusedRowIndex].Visible:=false;
// update_grid_view_no(dxdbgrid1);
// cxGrid1DBTableView1.CopyToClipboard(true);
end;
procedure Tfrm_op_railway.N14Click(Sender: TObject);
var
i:integer;
begin
for i:=0 to cxGrid1DBTableView1.ColumnCount-1 do begin
cxGrid1DBTableView1.Columns[i].Visible:=true;
end;
// update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_railway.N12Click(Sender: TObject);
var i,j:integer ;
scaption:string ;
begin
inherited;
frm_sys_grid_cx:=Tfrm_sys_grid_cx.create(self);
frm_sys_grid_cx.CheckListBox1.Items.Clear ;
for i:=0 to cxGrid1DBTableView1.ColumnCount-1 do
begin
frm_sys_grid_cx.CheckListBox1.Items.Add(cxGrid1DBTableView1.Columns[i].Caption) ;
j:=frm_sys_grid_cx.CheckListBox1.Items.Count-1 ;
frm_sys_grid_cx.CheckListBox1.Checked[j]:=cxGrid1DBTableView1.Columns[i].Visible;
end ;
frm_sys_grid_cx.showmodal ;
if frm_sys_grid_cx.modalresult=mrok then
begin
cxGrid1DBTableView1.BeginUpdate ;
for i:=0 to cxGrid1DBTableView1.ColumnCount-1 do cxGrid1DBTableView1.Columns[i].Visible:=false ;
for i:=0 to frm_sys_grid_cx.CheckListBox1.Items.Count-1 do
begin
if frm_sys_grid_cx.CheckListBox1.Checked[i] then
begin
for j:=0 to cxGrid1DBTableView1.ColumnCount-1 do
begin
scaption:=frm_sys_grid_cx.CheckListBox1.items[i] ;
if cxGrid1DBTableView1.Columns[j].Caption=scaption then
cxGrid1DBTableView1.Columns[j].Visible:=true ;
end;
end ;
end ;
end ;
cxGrid1DBTableView1.EndUpdate ;
frm_sys_grid_cx.free ;
end;
procedure Tfrm_op_railway.N16Click(Sender: TObject);
begin
cxgrid_save_xls(cxGrid1);
end;
procedure Tfrm_op_railway.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_op_railway,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_railway.bsSkinButton13Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton13.ClientToScreen(Point(0,bsSkinButton13.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_railway.N17Click(Sender: TObject);
begin
t_op_railway.Close;
t_op_railway.SQL.clear;
t_op_railway.SQL.Add('select * from t_op_railway where '
+open_data('0006','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬='
+''''+'¼<><C2BC>״̬'+''''+') '
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_railway.open;
end;
procedure Tfrm_op_railway.N34Click(Sender: TObject);
begin
t_op_railway.Close;
t_op_railway.SQL.clear;
t_op_railway.SQL.Add('select * from t_op_railway where '
+open_data('0006','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬ in ('
+''''+'<27><><EFBFBD><EFBFBD><EFBFBD>ύ'+''''+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''+')) '
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_railway.open;
end;
procedure Tfrm_op_railway.N36Click(Sender: TObject);
begin
t_op_railway.Close;
t_op_railway.SQL.clear;
t_op_railway.SQL.Add('select * from t_op_railway where '
+open_data('0006','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬ in ('
+''''+'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''+','+''''+'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'+''''+','+''''+'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'+''''+')) '
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_railway.open;
end;
procedure Tfrm_op_railway.N37Click(Sender: TObject);
begin
t_op_railway.Close;
t_op_railway.SQL.clear;
t_op_railway.SQL.Add('select * from t_op_railway where '
+open_data('0006','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_op_state where <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><>1) '
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_railway.open;
end;
procedure Tfrm_op_railway.wwDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo16);
end;
procedure Tfrm_op_railway.N9Click(Sender: TObject);
begin
t_op_railway.Close;
t_op_railway.SQL.clear;
t_op_railway.SQL.Add('select * from t_op_railway where '
+open_data('0006','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD> not in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''+')'
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_railway.open;
end;
procedure Tfrm_op_railway.N20Click(Sender: TObject);
begin
t_op_railway.Close;
t_op_railway.SQL.clear;
t_op_railway.SQL.Add('select * from t_op_railway where '
+open_data('0006','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD> not in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''+')'
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_railway.open;
end;
procedure Tfrm_op_railway.t_op_railwayBeforeCancel(DataSet: TDataSet);
begin
delete_no(t_op_railway);
if t_op_railway.State=dsinsert then
if not t_op_railway.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_railway['ί<>б<EFBFBD><D0B1><EFBFBD>']);
end;
procedure Tfrm_op_railway.N21Click(Sender: TObject);
begin
t_op_railway.Close;
t_op_railway.SQL.clear;
t_op_railway.SQL.Add('select * from t_op_railway where '
+open_data('0006','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD> not in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee )'
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_railway.open;
end;
procedure Tfrm_op_railway.N24Click(Sender: TObject);
begin
t_op_railway.Close;
t_op_railway.SQL.clear;
t_op_railway.SQL.Add('select * from t_op_railway where '
+open_data('0006','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+')'
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_railway.open;
end;
procedure Tfrm_op_railway.dxDBGrid1Column29CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
if Trim(ANode.Strings[dxDBGrid1Column29.Index])='<27><><EFBFBD>ĵ<EFBFBD>' then
AColor:=clred;
AFont.Color:=clblack;
end;
procedure Tfrm_op_railway.N26Click(Sender: TObject);
begin
if t_op_railway.IsEmpty then
exit;
if not do_data('0006',t_op_railway.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_op_railway.FieldByName('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_op_railway.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_op_railway.FieldByName('<27>ͷ<EFBFBD>Ա').asstring
,'','') then
begin
showmessage('<27><><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
if t_op_railway1.dataset.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊҵ<CEAA><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8>');
abort;
end;
if t_op_railway1=nil then
exit;
if (t_op_railway.State=dsinsert)or(t_op_railway.State=dsedit) then
t_op_railway.post;
try
frm_op_date_change:=tfrm_op_date_change.Create (self);
frm_op_date_change.DataSource1.Enabled:=false;
frm_op_date_change.DataSource1.DataSet:=t_op_railway1.DataSet;
frm_op_date_change.DataSource1.Enabled:=true;
frm_op_date_change.ShowModal;
finally
frm_op_date_change.Free;
frm_op_date_change:=nil;
end;
end;
procedure Tfrm_op_railway.RxDBLookupCombo16Change(Sender: TObject);
begin
if t_op_railway1.DataSet=nil then
exit;
if (t_op_railway1.DataSet.State=dsinsert)or(t_op_railway1.DataSet.State=dsedit)then
begin
if RxDBLookupCombo16.DisplayValue<>'' then
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_shiper.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
end;
end;
procedure Tfrm_op_railway.RxDBLookupCombo17Change(Sender: TObject);
begin
if t_op_railway1.DataSet=nil then
exit;
if (t_op_railway1.DataSet.State=dsinsert)or(t_op_railway1.DataSet.State=dsedit)then
begin
if RxDBLookupCombo17.DisplayValue<>'' then
t_op_railway1.DataSet['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_shouhuo.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
end;
end;
procedure Tfrm_op_railway.RxDBLookupCombo16KeyPress(Sender: TObject;
var Key: Char);
begin
if key = #13 then
begin
Key :=#0;
Perform(CM_DialogKey,VK_TAB,0);
end;
end;
procedure Tfrm_op_railway.RxDBLookupCombo17KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo4);
end;
procedure Tfrm_op_railway.RxDBLookupCombo16Enter(Sender: TObject);
begin
RxLookupComboEnter(TRxDBLookupCombo(Sender));
if not do_data('0006',t_op_railway.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_op_railway.FieldByName('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_op_railway.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_op_railway.FieldByName('<27>ͷ<EFBFBD>Ա').asstring
,'','') then
begin
RxDBLookupCombo1.Enabled:=false;
end
else
begin
RxDBLookupCombo1.Enabled:=true;
end;
end;
procedure Tfrm_op_railway.RxDBLookupCombo16Exit(Sender: TObject);
begin
RxLookupComboExit(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_railway.bsSkinSpeedButton1Click(Sender: TObject);
begin
if t_op_railway1.DataSet.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull or (t_op_railway1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']='') then begin
t_op_railway1.DataSet.edit;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_op_railway1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(5,subComp,department,employee,t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_op_railway1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(5,subComp,department,employee,t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
end;
end;
procedure Tfrm_op_railway.bsSkinPageControl1Change(Sender: TObject);
var
inifile1:Tinifile;
begin
if not railwayopen then exit;
if bsSkinPageControl1.ActivePage=bsSkinTabSheet1 then
begin
bsSkinGroupBox3.Visible:=bsSkinCheckRadioBox1.Checked;
bsSkinGroupBox4.Visible:=bsSkinCheckRadioBox2.Checked;
bsSkinGroupBox7.Visible:=bsSkinCheckRadioBox3.Checked;
end;
if bsSkinPageControl1.ActivePage=bsSkinTabSheet8 then
begin
if Letter_flag=0 then
begin
frm_op_letter:=tfrm_op_letter.Create (self);
frm_op_letter.bsTypeid:=1;
if t_op_railway1.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString<>'<27><>·<EFBFBD><C2B7>Ʊ' then
frm_op_letter.t_op_letter.DataSource:=t_op_railway1
else frm_op_letter.t_op_letter.DataSource:=t_op_railway_fen1;
frm_op_letter.ManualDock(bsSkinTabSheet8,nil,alClient);
frm_op_letter.show;
Letter_flag:=1;
end;
exit;
end;
if bsSkinPageControl1.ActivePage<>bsSkinTabSheet1 then begin
if t_op_railway.State in [dsedit,dsinsert] then
t_op_railway.Post;
end else begin
t_op_railway.Refresh;
end;
if bsSkinPageControl1.ActivePage=bsSkinTabSheet2 then
begin
if strtobool(get_parameters_value(190,'false')) then
begin
fra_fee1.bsSkinButton20.Visible:=true;
fra_fee1.bsSkinButton21.Visible:=true;
end
else
begin
fra_fee1.bsSkinButton20.Visible:=False;
fra_fee1.bsSkinButton21.Visible:=False;
end;
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
if strtoint(get_parameters_value(197,'0'))<>0 then
fra_fee1.bsSkinComboBox1.ItemIndex:=strtoint(get_parameters_value(197,'0'))-1
else fra_fee1.bsSkinComboBox1.ItemIndex:=inifile1.ReadInteger('FEE','FEEVAT',0);
inifile1.Free;
end;
end;
procedure Tfrm_op_railway.RxDBLookupCombo11Change(Sender: TObject);
begin
if t_op_railway1.DataSet=nil then
exit;
if (t_op_railway1.DataSet.state=dsinsert)or(t_op_railway1.DataSet.state=dsedit)then
begin
if RxDBLookupCombo11.DisplayValue='' then
exit;
t_op_railway1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=t_op_railway1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+#13#10+frm_data_share.t_code_goods['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_railway.DBEdit6KeyPress(Sender: TObject; var Key: Char);
begin
if key = #13 then
begin
Key :=#0;
Perform(CM_DialogKey,VK_TAB,0);
end;
end;
procedure Tfrm_op_railway.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>',2,t_op_railway1,nil,nil,nil,t_op_railway_fen1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_railway.bsSkinButton15Click(Sender: TObject);
begin
// sys_print('<27><>·<EFBFBD><C2B7><EFBFBD>伯װ<E4BCAF><EFBFBD><E4B5A5>',2,t_op_railway1,nil,nil,nil,t_op_railway_fen1,nil,nil,nil,nil,nil,nil);
if (t_op_railway_fen.State=dsinsert)or(t_op_railway_fen.State=dsedit) then
t_op_railway_fen.post;
end;
procedure Tfrm_op_railway.N29Click(Sender: TObject);
begin
if t_op_railway_fen.IsEmpty then
exit;
t_op_railway_fen.edit;
t_op_railway_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_railway_fen['<27><><EFBFBD><EFBFBD>'];
t_op_railway_fen.post;
t_op_railway_fen.Requery();
end;
procedure Tfrm_op_railway.wwDBLookupCombo52Change(Sender: TObject);
begin
if (t_op_railway1.DataSet.state=dsinsert)or(t_op_railway1.DataSet.state=dsedit)then
begin
if wwDBLookupCombo52.text='' then
exit;
if frm_data_share.t_code_railport.locate('<27>ڰ<EFBFBD><DAB0><EFBFBD><EFBFBD><EFBFBD>',wwDBLookupCombo52.text,[]) then begin
t_op_railway1.DataSet['<27><>վ']:=frm_data_share.t_code_railport['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_op_railway1.DataSet['<27><>վӢ<D5BE><D3A2>']:=frm_data_share.t_code_railport['Ӣ<><D3A2><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_railway.wwDBLookupCombo2Change(Sender: TObject);
begin
if (t_op_railway1.DataSet.state=dsinsert)or(t_op_railway1.DataSet.state=dsedit)then
begin
if wwDBLookupCombo2.text='' then
exit;
if frm_data_share.t_code_railport.locate('<27>ڰ<EFBFBD><DAB0><EFBFBD><EFBFBD><EFBFBD>',wwDBLookupCombo2.text,[]) then begin
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD>վ']:=frm_data_share.t_code_railport['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD>վӢ<D5BE><D3A2>']:=frm_data_share.t_code_railport['Ӣ<><D3A2><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_railway.wwDBLookupCombo5Change(Sender: TObject);
begin
if (t_op_railway1.DataSet.state=dsinsert)or(t_op_railway1.DataSet.state=dsedit)then
begin
if wwDBLookupCombo5.text='' then
exit;
if frm_data_share.t_code_railport.locate('<27>ڰ<EFBFBD><DAB0><EFBFBD><EFBFBD><EFBFBD>',wwDBLookupCombo5.text,[]) then begin
t_op_railway1.DataSet['<27><><EFBFBD>ڿڰ<DABF>']:=frm_data_share.t_code_railport['<27><>ϸ<EFBFBD><CFB8><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_railway.wwDBLookupCombo6Change(Sender: TObject);
begin
if (t_op_railway1.DataSet.state=dsinsert)or(t_op_railway1.DataSet.state=dsedit)then
begin
if wwDBLookupCombo6.text='' then
exit;
if frm_data_share.t_code_railport.locate('<27>ڰ<EFBFBD><DAB0><EFBFBD><EFBFBD><EFBFBD>',wwDBLookupCombo6.text,[]) then begin
t_op_railway1.DataSet['<27><>תվ']:=frm_data_share.t_code_railport['Ӣ<><D3A2><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_railway.RxDBLookupCombo3Change(Sender: TObject);
begin
if (t_op_railway1.DataSet.state=dsinsert)or(t_op_railway1.DataSet.state=dsedit)then
begin
if RxDBLookupCombo3.DisplayValue='' then
exit;
t_op_railway1.DataSet['<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD>'];
t_op_railway1.DataSet['<27><>Ƥ<EFBFBD><C6A4>']:=frm_data_share.t_code_ctn['<27><>Ƥ<EFBFBD><C6A4>'];
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>'];
t_op_railway1.DataSet['<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>']:=frm_data_share.t_code_ctn['Ӣ<><D3A2>˵<EFBFBD><CBB5>'];
end;
end;
procedure Tfrm_op_railway.t_op_railway_fenAfterPost(DataSet: TDataSet);
var
book1:Tbookmark;
aQuery:TAdoQuery;
pkgs,kgs,cbm:double;
bsno:string;
begin
bsno:=dataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
sql.Add('select sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from t_op_railway where װ<>˷<EFBFBD>ʽ=''<27><>·<EFBFBD><C2B7>Ʊ'' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
open;
pkgs:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
kgs:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
cbm:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
if not IsEmpty then begin
close;sql.clear;
sql.Add('update t_op_railway set <20><><EFBFBD><EFBFBD>='+floattostr(pkgs)+',<2C><><EFBFBD><EFBFBD>='+floattostr(kgs)+',<2C><><EFBFBD><EFBFBD>='+floattostr(cbm)+' where <20><><EFBFBD><EFBFBD>='''+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
ExecSQL;
t_op_railway.Refresh;
end;
end;
finally
FreeAndNil(aQuery);
dataset.Locate('<27><><EFBFBD><EFBFBD>',bsno,[]);
end;
{
book1:=v_op_railway_detail.GetBookmark;
// update_railctn(t_op_railway_fen);
v_op_railway_detail.Requery();
v_op_railway_detail.GotoBookmark(book1);
}
//ljp
end;
procedure Tfrm_op_railway.t_raildatecharge(Sender: TField);
begin
if sender.DataSet.State in [dsedit,dsinsert] then begin
if (not sender.DataSet.fieldbyname('<27><>ɽ<EFBFBD><C9BD>ʱ<EFBFBD><CAB1>').IsNull) and (not sender.DataSet.fieldbyname('<27><>ɽ<EFBFBD><C9BD>ʱ<EFBFBD><CAB1>').IsNull) then begin
sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=DaysBetween(sender.DataSet.fieldbyname('<27><>ɽ<EFBFBD><C9BD>ʱ<EFBFBD><CAB1>').asdatetime,sender.DataSet.fieldbyname('<27><>ɽ<EFBFBD><C9BD>ʱ<EFBFBD><CAB1>').asdatetime);
end;
end;
end;
procedure Tfrm_op_railway.t_railkgscharge(Sender: TField);
var
sl:tstringlist;
begin
if sender.DataSet.State in [dsedit,dsinsert] then begin
if (sender.DataSet.fieldbyname('<27><>Ƥ<EFBFBD><C6A4>').asfloat<>0) and (sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) then begin
sl:=TStringList.Create;
try
sl.Add(sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
sl.Add(sender.DataSet.fieldbyname('<27><>Ƥ<EFBFBD><C6A4>').asstring);
sl.Add('==========');
sl.Add(floattostr(sender.DataSet.fieldbyname('<27><>Ƥ<EFBFBD><C6A4>').asfloat+sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat)+'KGS');
sender.DataSet.fieldbyname('ȷ<><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring:=sl.Text;
sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д').Asstring:=change_qty(sender.DataSet.fieldbyname('<27><>Ƥ<EFBFBD><C6A4>').asfloat+sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat,false,true)+' <20><><EFBFBD><EFBFBD>';
finally
freeandnil(sl);
end;
end;
end;
end;
procedure Tfrm_op_railway.t_op_railway_fenAfterOpen(DataSet: TDataSet);
begin
dataset.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_railkgscharge;
dataset.FieldByName('<27><>Ƥ<EFBFBD><C6A4>').OnChange:=t_railkgscharge;
dataset.FieldByName('<27><>ɽ<EFBFBD><C9BD>ʱ<EFBFBD><CAB1>').OnChange:=t_raildatecharge;
dataset.FieldByName('<27><>ɽ<EFBFBD><C9BD>ʱ<EFBFBD><CAB1>').OnChange:=t_raildatecharge;
dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_railfcdatechange;
dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_railfcdatechange;
DBRichEdit3.DefAttributes.Size:=9;
DBRichEdit1.DefAttributes.Size:=9;
DBRichEdit2.DefAttributes.Size:=9;
DBRichEdit4.DefAttributes.Size:=9;
end;
procedure Tfrm_op_railway.cxGrid1DBTableView1CellClick(
Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
begin
// bsSkinButton11.OnClick(sender);
end;
procedure Tfrm_op_railway.wwDBComboBox4Change(Sender: TObject);
begin
if t_op_railway1.DataSet=nil then
exit;
if wwDBComboBox4.text='<27><>·<EFBFBD><C2B7>Ʊ' then
begin
tab2.TabVisible:=true;
DBEdit10.ReadOnly:=true;
RxDBLookupCombo3.ReadOnly:=true;
RxDBLookupCombo4.ReadOnly:=true;
DBEdit21.ReadOnly:=true;
wwDBComboBox1.ReadOnly:=true;
DBEdit22.ReadOnly:=true;
DBEdit81.ReadOnly:=true;
wwDBLookupCombo61.ReadOnly:=true;
DBEdit82.ReadOnly:=true;
DBEdit83.ReadOnly:=true;
RxDBLookupCombo5.ReadOnly:=true;
DBEdit17.ReadOnly:=true;
DBEdit10.Color:=clBtnFace;
RxDBLookupCombo3.Color:=clBtnFace;
RxDBLookupCombo4.Color:=clBtnFace;
DBEdit21.Color:=clBtnFace;
wwDBComboBox1.Color:=clBtnFace;
DBEdit22.Color:=clBtnFace;
DBEdit81.Color:=clBtnFace;
wwDBLookupCombo61.Color:=clBtnFace;
DBEdit82.Color:=clBtnFace;
DBEdit83.Color:=clBtnFace;
RxDBLookupCombo5.Color:=clBtnFace;
DBEdit17.Color:=clBtnFace;
bsSkinButton14.Visible:=true;
bsSkinButton21.Enabled:=false;
// bsSkinPanel3.Parent:=bsSkinPageControl2;
end
else
begin
tab2.TabVisible:=false;
RxDBLookupCombo4.ReadOnly:=false;
DBEdit21.ReadOnly:=false;
wwDBComboBox1.ReadOnly:=false;
DBEdit22.ReadOnly:=false;
DBEdit81.ReadOnly:=false;
wwDBLookupCombo61.ReadOnly:=false;
DBEdit82.ReadOnly:=false;
DBEdit83.ReadOnly:=false;
RxDBLookupCombo5.ReadOnly:=false;
DBEdit17.ReadOnly:=false;
if RxDBLookupCombo4.text='<27><>˾<EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>' then begin
DBEdit10.ReadOnly:=true;
DBEdit10.Color:=clBtnFace;
RxDBLookupCombo3.Color:=clBtnFace;
RxDBLookupCombo3.ReadOnly:=true;
bsSkinButton21.Enabled:=true;
end else if RxDBLookupCombo4.text='<27>ͻ<EFBFBD><CDBB>Ա<EFBFBD><D4B1><EFBFBD>' then begin
DBEdit10.ReadOnly:=false;
DBEdit10.Color:=clWindow;
RxDBLookupCombo3.Color:=clWindow;
RxDBLookupCombo3.ReadOnly:=false;
bsSkinButton21.Enabled:=false;
end else if RxDBLookupCombo4.text='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
DBEdit10.ReadOnly:=true;
DBEdit10.Color:=clBtnFace;
RxDBLookupCombo3.Color:=clBtnFace;
RxDBLookupCombo3.ReadOnly:=true;
bsSkinButton21.Enabled:=true;
end else begin
DBEdit10.ReadOnly:=false;
DBEdit10.Color:=clWindow;
RxDBLookupCombo3.Color:=clWindow;
RxDBLookupCombo3.ReadOnly:=false;
bsSkinButton21.Enabled:=false;
end;
if (trim(DBEdit51.text)='') or (trim(DBEdit51.text)='0') then
begin
DBEdit10.ReadOnly:=false;
DBEdit10.Color:=clWindow;
RxDBLookupCombo3.Color:=clWindow;
RxDBLookupCombo3.ReadOnly:=false;
end else begin
DBEdit10.ReadOnly:=true;
DBEdit10.Color:=clBtnFace;
RxDBLookupCombo3.Color:=clBtnFace;
RxDBLookupCombo3.ReadOnly:=true;
end;
RxDBLookupCombo4.Color:=clWindow;
DBEdit21.Color:=clWindow;
wwDBComboBox1.Color:=clWindow;
DBEdit22.Color:=clWindow;
DBEdit81.Color:=clWindow;
wwDBLookupCombo61.Color:=clWindow;
DBEdit82.Color:=clWindow;
DBEdit83.Color:=clWindow;
RxDBLookupCombo5.Color:=clWindow;
DBEdit17.Color:=clWindow;
bsSkinButton14.Visible:=false;
if (DBEdit69.Text<>'0') then begin
DBEdit10.ReadOnly:=true;
DBEdit10.Color:=clBtnFace;
bsSkinButton21.Enabled:=False;
end;
// bsSkinPanel3.Parent:=bsSkinScrollBox1;
end;
end;
procedure Tfrm_op_railway.dxDBGrid2DblClick(Sender: TObject);
begin
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
try
t_op_railway1.Enabled:=false;
t_op_railway1.DataSet:=t_op_railway_fen;
finally
t_op_railway1.Enabled:=true;
end;
end;
procedure Tfrm_op_railway.bsSkinButton32Click(Sender: TObject);
begin
if (t_op_railway.State=dsinsert)or(t_op_railway.State=dsedit) then
t_op_railway.post;
if (t_op_railway_fen.State=dsinsert)or(t_op_railway_fen.State=dsedit) then
t_op_railway_fen.post;
try
frm_op_railway_add:=tfrm_op_railway_add.Create (self);
if not t_op_railway1.DataSet.IsEmpty then
begin
frm_op_railway_add.shiptype:='';
frm_op_railway_add.BsType:=''; //<2F><>·<EFBFBD><C2B7>Ʊ
frm_op_railway_add.PNO:='';
frm_op_railway_add.shiptype:=t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
frm_op_railway_add.BsType:='RAILHBL'; //<2F><>·<EFBFBD><C2B7>Ʊ
frm_op_railway_add.PNO:=t_op_railway1.DataSet.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString;
end;
frm_op_railway_add.data1.Enabled:=false;
frm_op_railway_add.data1.DataSet:=t_op_railway_fen;
frm_op_railway_add.data1.Enabled:=true;
frm_op_railway_add.bsSkinCheckRadioBox6.Checked:=true;
frm_op_railway_add.bsSkinCheckRadioBox1.Enabled:=false;
frm_op_railway_add.bsSkinCheckRadioBox5.Enabled:=false;
frm_op_railway_add_num:=3;
frm_op_railway_add.ShowModal;
finally
frm_op_railway_add.Free;
end;
end;
procedure Tfrm_op_railway.t_op_railwayAfterOpen(DataSet: TDataSet);
begin
dataset.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_railkgscharge;
dataset.FieldByName('<27><>Ƥ<EFBFBD><C6A4>').OnChange:=t_railkgscharge;
dataset.FieldByName('<27><>ɽ<EFBFBD><C9BD>ʱ<EFBFBD><CAB1>').OnChange:=t_raildatecharge;
dataset.FieldByName('<27><>ɽ<EFBFBD><C9BD>ʱ<EFBFBD><CAB1>').OnChange:=t_raildatecharge;
dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_railfcdatechange;
dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_railfcdatechange;
DBRichEdit3.DefAttributes.Size:=9;
DBRichEdit1.DefAttributes.Size:=9;
DBRichEdit2.DefAttributes.Size:=9;
DBRichEdit4.DefAttributes.Size:=9;
end;
procedure Tfrm_op_railway.bsSkinButton33Click(Sender: TObject);
begin
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
try
t_op_railway1.Enabled:=false;
t_op_railway1.DataSet:=t_op_railway_fen;
finally
t_op_railway1.Enabled:=true;
end;
end;
procedure Tfrm_op_railway.bsSkinButton34Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton34.ClientToScreen(Point(0,bsSkinButton34.Height));
PopupMenu4.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_railway.bsSkinButton31Click(Sender: TObject);
begin
sys_print('<27><>·<EFBFBD><C2B7><EFBFBD>䵥֤',2,t_op_railway1,nil,nil,nil,t_op_railway_fen1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_railway.t_op_railway_fenBeforeCancel(DataSet: TDataSet);
begin
delete_no(t_op_railway_fen);
if t_op_railway_fen.State=dsinsert then
if not t_op_railway_fen.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_railway_fen['ί<>б<EFBFBD><D0B1><EFBFBD>']);
end;
procedure Tfrm_op_railway.t_op_railway_fenBeforePost(DataSet: TDataSet);
begin
table_before_post(t_op_railway_fen,'ί<>е<EFBFBD>λ');
table_before_post(t_op_railway_fen,'<27><><EFBFBD><EFBFBD>Ա');
table_before_post(t_op_railway_fen,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
// table_before_post(t_op_railway_fen,'<27>ͷ<EFBFBD>Ա');
table_before_post(t_op_railway_fen,'<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>');
// table_before_post(t_op_railway_fen,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_railway_fen,'ҵ<><D2B5><EFBFBD><EFBFBD>Դ');
table_before_post(t_op_railway_fen,'<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>');
table_before_post(t_op_railway_fen,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
if op_empty('t_op_railway',t_op_railway_fen) then
abort;
if trim(t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)<>'' then
if not frm_data_share.t_sys_employee.Locate('<27><><EFBFBD><EFBFBD>',trim(t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring),[]) then
begin
showmessage('ϵͳ<CFB5>в<EFBFBD><D0B2><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>˶<EFBFBD>');
abort;
end;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then
if t_op_railway_fen.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull or (trim(t_op_railway_fen['ί<>б<EFBFBD><D0B1><EFBFBD>'])='') then
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_op_railway_fen['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(5,subComp,department,employee,t_op_railway_fen['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_op_railway_fen['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(5,subComp,department,employee,t_op_railway_fen['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']);
if (not t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').isnull) and (t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').oldvalue<>t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value) then
if (t_op_railway_fen.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>'<27><><EFBFBD>ĵ<EFBFBD>') and (Logininfo.endday>=t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime) then begin
showmessage('<27>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>ҵ<EFBFBD>񣡣<EFBFBD>');
abort;
end;
if t_op_railway_fen.FieldByName('ί<>е<EFBFBD>λ').OldValue<>t_op_railway_fen.FieldByName('ί<>е<EFBFBD>λ').asstring then
begin
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_railway_fen.FieldByName('ί<>е<EFBFBD>λ').asstring,[])then
begin
if frm_data_share.t_crm_client_all.fieldbyname('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>'then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5>ί<EFBFBD>е<EFBFBD>λ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><E6A3AC><EFBFBD><EFBFBD><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>лָ<D0BB><D6B8>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
end;
if t_op_railway_fen.State=dsinsert then
begin
if t_op_railway_fen.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
begin
t_op_railway_fen['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.RailWayBsNo,'RW'));
end;
t_op_railway_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_railway['<27><><EFBFBD><EFBFBD>'];
t_op_railway_fen['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
t_op_railway_fen['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
if strtobool(get_parameters_value(45,'false')) then
begin
if (trim(t_op_railway_fen.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='') or (t_op_railway_fen.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ĵ<EFBFBD>') then
begin
t_op_railway_fen['ί<>б<EFBFBD>׼']:=t_op_railway_Fen['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_railway_fen['ί<>б<EFBFBD>׼']:=t_op_railway_fen['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_op_railway_fen['ί<>б<EFBFBD>׼']:=t_op_railway_fen['<27><><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_railway.N27Click(Sender: TObject);
begin
if t_op_railway_fen.IsEmpty then
exit;
t_op_railway_fen.edit;
t_op_railway_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_railway_fen['<27><><EFBFBD><EFBFBD>'];
t_op_railway_fen['װ<>˷<EFBFBD>ʽ']:='<27><>·<EFBFBD><C2B7>Ʊ';
t_op_railway_fen.post;
t_op_railway_fen.Requery();
end;
procedure Tfrm_op_railway.N76Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid2);
end;
procedure Tfrm_op_railway.N78Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid2);
end;
procedure Tfrm_op_railway.N80Click(Sender: TObject);
begin
update_grid(dxdbgrid2,207);
end;
procedure Tfrm_op_railway.N32Click(Sender: TObject);
begin
if t_op_railway.IsEmpty then
exit;
if t_op_railway.FieldByName('װ<>˷<EFBFBD>ʽ').asstring='<27><>·<EFBFBD><C2B7>Ʊ' then
exit;
if t_op_railway.FieldByName('װ<>˷<EFBFBD>ʽ').asstring='<27><>·<EFBFBD><C2B7>Ʊ'then
begin
if not t_op_railway_fen.IsEmpty then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0>Ʊ<EFBFBD><C6B1><EFBFBD>з<EFBFBD>Ʊ<EFBFBD><C6B1>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD>Ϊ<EFBFBD><CEAA>·<EFBFBD><C2B7>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>');
exit;
end;
end;
t_op_railway.edit;
t_op_railway['װ<>˷<EFBFBD>ʽ']:='<27><>·<EFBFBD><C2B7>Ʊ';
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_railway['<27><><EFBFBD><EFBFBD>'];
t_op_railway.post;
end;
procedure Tfrm_op_railway.N41Click(Sender: TObject);
begin
if t_op_railway.IsEmpty then
exit;
if t_op_railway.FieldByName('װ<>˷<EFBFBD>ʽ').asstring='<27><>·<EFBFBD><C2B7>Ʊ' then
exit;
t_op_railway.edit;
t_op_railway['װ<>˷<EFBFBD>ʽ']:='<27><>·<EFBFBD><C2B7>Ʊ';
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_railway['<27><><EFBFBD><EFBFBD>'];
t_op_railway.post;
end;
procedure Tfrm_op_railway.N39Click(Sender: TObject);
begin
if t_op_railway.IsEmpty then
exit;
if t_op_railway.FieldByName('װ<>˷<EFBFBD>ʽ').asstring='<27><>·<EFBFBD><C2B7>Ʊ' then
exit;
if t_op_railway.FieldByName('װ<>˷<EFBFBD>ʽ').asstring='<27><>·<EFBFBD><C2B7>Ʊ'then
begin
if not t_op_railway_fen.IsEmpty then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0>Ʊ<EFBFBD><C6B1><EFBFBD>з<EFBFBD>Ʊ<EFBFBD><C6B1>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD>Ϊ<EFBFBD><CEAA>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>');
exit;
end;
end;
t_op_railway.edit;
t_op_railway['װ<>˷<EFBFBD>ʽ']:='<27><>·<EFBFBD><C2B7>Ʊ';
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_railway['<27><><EFBFBD><EFBFBD>'];
t_op_railway.post;
end;
procedure Tfrm_op_railway.bsSkinButton38Click(Sender: TObject);
var
book1:Tbookmark;
begin
if t_op_railway1.DataSet=nil then
exit;
book1:=t_op_railway1.DataSet.GetBookmark;
t_op_railway1.DataSet.Refresh;
t_op_railway1.DataSet.GotoBookmark(book1);
if t_op_railway_fen1.DataSet=nil then
exit;
book1:=t_op_railway_fen1.DataSet.GetBookmark;
t_op_railway_fen1.DataSet.Refresh;
t_op_railway_fen1.DataSet.GotoBookmark(book1);
end;
procedure Tfrm_op_railway.wwDBComboBox2Change(Sender: TObject);
begin
if t_op_railway1.DataSet=nil then
exit;
if wwDBComboBox2.text='<27><>ó' then
begin
bsSkinGroupBox2.Visible:=false;
bsSkinGroupBox3.Visible:=false;
bsSkinGroupBox4.Visible:=false;
bsSkinGroupBox5.Visible:=false;
bsSkinGroupBox7.Visible:=false;
bsSkinExPanel1.visible:=false;
bsSkinGroupBox1.Visible:=true;
end else begin
bsSkinGroupBox3.Visible:=bsSkinCheckRadioBox1.Checked;
bsSkinGroupBox4.Visible:=bsSkinCheckRadioBox2.Checked;
bsSkinGroupBox7.Visible:=bsSkinCheckRadioBox3.Checked;
bsSkinExPanel1.RollState:=bsSkinCheckRadioBox5.Checked;
bsSkinExPanel1.Visible:=bsSkinCheckRadioBox4.Checked;
bsSkinGroupBox2.Visible:=true;
bsSkinGroupBox5.Visible:=true;
bsSkinGroupBox1.Visible:=false;
end;
end;
procedure Tfrm_op_railway.wwDBLookupCombo1Change(Sender: TObject);
begin
if (t_op_railway1.DataSet.state=dsinsert)or(t_op_railway1.DataSet.state=dsedit)then
begin
if wwDBLookupCombo1.text='' then
exit;
if frm_data_share.t_code_railport.locate('<27>ڰ<EFBFBD><DAB0><EFBFBD><EFBFBD><EFBFBD>',wwDBLookupCombo1.text,[]) then begin
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD>վ']:=frm_data_share.t_code_railport['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD>վӢ<D5BE><D3A2>']:=frm_data_share.t_code_railport['Ӣ<><D3A2><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_railway.bsSkinButton14Click(Sender: TObject);
begin
if not (if_open('297') or if_open('298')) then
begin
showmessage('ע<><EFBFBD><E2A3AC><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>');
exit;
end;
if not assigned(frm_ch_fee_zhupiao) then
frm_ch_fee_zhupiao:=tfrm_ch_fee_zhupiao.Create (self);
frm_ch_fee_zhupiao.fra_fee_zhu1.fenpiao1.DataSet:=t_op_railway_fen;
with frm_ch_fee_zhupiao do
begin
if if_open('297') then
begin
fra_fee_zhu1.t_ch_accept.close;
fra_fee_zhu1.t_ch_accept.Parameters[1].value:=t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
fra_fee_zhu1.t_ch_accept.open;
fra_fee_zhu1.zhupiao1.DataSet:=t_op_railway;
fra_fee_zhu1.dxDBGrid1.FullExpand;
fra_fee_zhu1.bsSkinPanel3.visible:=true;
end
else
fra_fee_zhu1.bsSkinPanel3.visible:=false;
if if_open('298') then
begin
fra_fee_zhu1.t_ch_pay.close;
fra_fee_zhu1.t_ch_pay.Parameters[1].value:=t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
fra_fee_zhu1.t_ch_pay.open;
fra_fee_zhu1.zhupiao1.DataSet:=t_op_railway;
fra_fee_zhu1.dxDBGrid2.FullExpand;
fra_fee_zhu1.bsSkinPanel4.visible:=true;
end
else
fra_fee_zhu1.bsSkinPanel4.visible:=false;
if fra_fee_zhu1.bsSkinPanel3.visible and
fra_fee_zhu1.bsSkinPanel4.visible then
begin
fra_fee_zhu1.t_op_gain.close;
fra_fee_zhu1.t_op_gain.Parameters[1].value:=t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
fra_fee_zhu1.t_op_gain.open;
fra_fee_zhu1.t_op_gain_fen.close;
fra_fee_zhu1.t_op_gain_fen.Parameters[1].value:=t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
fra_fee_zhu1.t_op_gain_fen.open;
end
else
begin
fra_fee_zhu1.t_op_gain.close;
fra_fee_zhu1.t_op_gain_fen.close;
fra_fee_zhu1.bsSkinTabSheet2.TabVisible:=false;
end;
fra_fee_zhu1.dxDBGrid3.FullExpand;
end;
frm_ch_fee_zhupiao.ShowModal;
end;
procedure Tfrm_op_railway.fra_op_letter_free1bsSkinButton1Click(
Sender: TObject);
begin
fra_op_letter_free1.bsSkinButton1Click(Sender);
end;
procedure Tfrm_op_railway.bsSkinButton12Click(Sender: TObject);
begin
bsSkinPanel5.Visible:=true;
end;
procedure Tfrm_op_railway.bsSkinButton17Click(Sender: TObject);
begin
bsSkinPanel5.Visible:=False;
end;
procedure Tfrm_op_railway.bsSkinButton16Click(Sender: TObject);
var i :Integer;
yjid:array of string ;
val,fenbsno:string ;
aAdoUpdate : TADOQuery;
begin
setlength(yjid,cxGrid1DBTableView1.Controller.SelectedRowCount);
frm_op_railway.t_op_railway.DisableControls;
cxGrid1DBTableView1.BeginUpdate ;
aAdoUpdate :=CreateAdoQuery;
try
for i:=0 to cxGrid1DBTableView1.Controller.SelectedRowCount-1 do
begin //<2F><><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
val:=cxGrid1DBTableView1.DataController.GetDisplayText(cxGrid1DBTableView1.Controller.SelectedRows[I].RecordIndex,0) ;
yjid[i]:=val ;
end; //<2F>õ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>е<EFBFBD>ֵ
for i:=0 to high(yjid) do
begin
if t_op_railway.Locate('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',yjid[i],[]) then
begin
fenbsno:=t_op_railway.FieldByName('<27><><EFBFBD><EFBFBD>').Value;
t_op_railway.Edit;
t_op_railway.FieldByName(bsSkinComboBox1.Text).Value:=FormatDateTime('YYYY-MM-DD',bsSkinDateEdit1.Date);
t_op_railway.Post;
end ;
with aAdoUpdate do
begin
Close;SQL.Clear;
SQL.Add('Update t_op_railway set '+bsSkinComboBox1.Text+'=:fieldValue');
SQL.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:bsno and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><3E><><EFBFBD><EFBFBD>');
Parameters.ParamByName('fieldValue').Value:=FormatDateTime('YYYY-MM-DD',bsSkinDateEdit1.Date);
Parameters.ParamByName('bsno').Value:=fenbsno;
ExecSQL;
end;
end ;
finally
cxGrid1DBTableView1.EndUpdate ;
bsSkinPanel5.Visible:=False;
FreeAndNil(aAdoUpdate);
frm_op_railway.t_op_railway.EnableControls;
end;
end;
procedure Tfrm_op_railway.FormCreate(Sender: TObject);
begin
Letter_flag:=0;
end;
procedure Tfrm_op_railway.bsSkinButton36Click(Sender: TObject);
begin
t_ch_fee.close;
t_ch_fee.Parameters[0].value:=t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee.open;
if not t_ch_fee.IsEmpty then
begin
showmessage('ע<><D7A2><><D2B5><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
table_delete(TAdoQuery(t_op_railway_fen1.DataSet));
end;
procedure Tfrm_op_railway.t_op_railwayBeforeDelete(DataSet: TDataSet);
var
aQuery,aQuery2:TADOQuery;
begin
op_befor_post(t_op_railway,'0006');
if t_op_railway.FieldByName('װ<>˷<EFBFBD>ʽ').asstring<>'<27><>·<EFBFBD><C2B7>Ʊ'then
if not t_op_railway.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_railway['ί<>б<EFBFBD><D0B1><EFBFBD>']);
if (t_op_railway.FieldByName('ctnid').AsString<>'') then begin
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add(' delete from t_op_ctnmg_status where ctnid='+t_op_railway.FieldByName('ctnid').AsString+' and <20><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
ExecSQL;
aQuery2.SQL.Text:='select top 1 * from t_op_ctnmg_status where ctnid='+t_op_railway.FieldByName('ctnid').AsString+' order by <20><>̬ʱ<CCAC><CAB1> DESC ';
aQuery2.Open;
if aQuery2.IsEmpty then begin
Close;SQL.Clear;
SQL.Add(' update t_op_ctnmg_detail set <20><>ǰ<EFBFBD><C7B0>̬=''<27><><EFBFBD><EFBFBD>'',<2C><><EFBFBD><EFBFBD>=0,ί<>б<EFBFBD><D0B1><EFBFBD>='''',<2C><><EFBFBD><EFBFBD><E1B5A5>='''' where ctnid='+t_op_railway.FieldByName('ctnid').AsString);
ExecSQL;
end else begin
Close;SQL.Clear;
SQL.Add(' update t_op_ctnmg_detail set <20><>ǰ<EFBFBD><C7B0>̬='''+aQuery2.fieldbyname('<27><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>').AsString+''',<2C><>̬ʱ<CCAC><CAB1>='''+aQuery2.fieldbyname('<27><>̬ʱ<CCAC><CAB1>').AsString+''',<2C><><EFBFBD><EFBFBD>=0,ί<>б<EFBFBD><D0B1><EFBFBD>='''',<2C><><EFBFBD><EFBFBD><E1B5A5>='''' where ctnid='+t_op_railway.FieldByName('ctnid').AsString);
ExecSQL;
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
// delete_add(4,t_op_airi); 123
end;
procedure Tfrm_op_railway.fra_fee1bsSkinButton8Click(Sender: TObject);
begin
fra_fee1.bsSkinButton8Click(Sender);
end;
procedure Tfrm_op_railway.RxDBLookupCombo1Change(Sender: TObject);
begin
//ί<>е<EFBFBD>λ<EFBFBD><CEBB><EFBFBD>ĺ󣬸<C4BA><F3A3ACB8>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD>ˡ<EFBFBD><CBA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if t_op_railway1.DataSet=nil then
exit;
if t_op_railway1.DataSet.State in [dsinsert,dsEdit] then
begin
if frm_data_share.t_crm_client_weituo.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValues[1],[])then
begin
if frm_data_share.t_crm_client_weituo.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
begin
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client_weituo.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
if frm_data_share.t_crm_client_weituo.fieldbyname('<27>ͷ<EFBFBD>Ա').asstring<>''then
begin
t_op_railway1.DataSet['<27>ͷ<EFBFBD>Ա']:=frm_data_share.t_crm_client_weituo.fieldbyname('<27>ͷ<EFBFBD>Ա').asstring;
end;
// if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',t_op_railway1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then
// t_op_railway1.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_railway.setconcolor;
procedure consetcolor(fielname:String);
var
i:integer;
scolor:string;
begin
scolor:=get_parameters_value(144,'clInfoBk'); //
{
with tab1,bsSkinGroupBox10,bsSkinGroupBox2,bsSkinGroupBox3,bsSkinGroupBox9,bsSkinGroupBox4,bsSkinGroupBox1,bsSkinPanel3 do
begin
for i:=0 to ControlCount-1 do begin
if Controls[i] is TwwDBComboBox then
begin
if TwwDBComboBox(Controls[i]).DataField=fielname then
begin
TwwDBComboBox(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBLookupCombo then begin
if TwwDBLookupCombo(Controls[i]).DataField=fielname then
begin
TwwDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBEdit then begin
if TDBEdit(Controls[i]).DataField=fielname then
begin
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBDateTimePicker then begin
if TwwDBDateTimePicker(Controls[i]).DataField=fielname then
begin
TwwDBDateTimePicker(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBMemo then begin
if TDBMemo(Controls[i]).DataField=fielname then
begin
TDBMemo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TRxDBLookupCombo then begin
if TRxDBLookupCombo(Controls[i]).DataField=fielname then
begin
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end;
end;
end;
}
with bsSkinGroupBox1 do
begin
for i:=0 to ControlCount-1 do begin
if Controls[i] is TwwDBComboBox then
begin
if TwwDBComboBox(Controls[i]).DataField=fielname then
begin
TwwDBComboBox(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBLookupCombo then begin
if TwwDBLookupCombo(Controls[i]).DataField=fielname then
begin
TwwDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBEdit then begin
if TDBEdit(Controls[i]).DataField=fielname then
begin
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBDateTimePicker then begin
if TwwDBDateTimePicker(Controls[i]).DataField=fielname then
begin
TwwDBDateTimePicker(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBMemo then begin
if TDBMemo(Controls[i]).DataField=fielname then
begin
TDBMemo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TRxDBLookupCombo then begin
if TRxDBLookupCombo(Controls[i]).DataField=fielname then
begin
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end;
end;
end;
with bsSkinGroupBox2 do
begin
for i:=0 to ControlCount-1 do begin
if Controls[i] is TwwDBComboBox then
begin
if TwwDBComboBox(Controls[i]).DataField=fielname then
begin
TwwDBComboBox(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBLookupCombo then begin
if TwwDBLookupCombo(Controls[i]).DataField=fielname then
begin
TwwDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBEdit then begin
if TDBEdit(Controls[i]).DataField=fielname then
begin
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBDateTimePicker then begin
if TwwDBDateTimePicker(Controls[i]).DataField=fielname then
begin
TwwDBDateTimePicker(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBMemo then begin
if TDBMemo(Controls[i]).DataField=fielname then
begin
TDBMemo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TRxDBLookupCombo then begin
if TRxDBLookupCombo(Controls[i]).DataField=fielname then
begin
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end;
end;
end;
with bsSkinGroupBox3 do
begin
for i:=0 to ControlCount-1 do begin
if Controls[i] is TwwDBComboBox then
begin
if TwwDBComboBox(Controls[i]).DataField=fielname then
begin
TwwDBComboBox(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBLookupCombo then begin
if TwwDBLookupCombo(Controls[i]).DataField=fielname then
begin
TwwDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBEdit then begin
if TDBEdit(Controls[i]).DataField=fielname then
begin
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBDateTimePicker then begin
if TwwDBDateTimePicker(Controls[i]).DataField=fielname then
begin
TwwDBDateTimePicker(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBMemo then begin
if TDBMemo(Controls[i]).DataField=fielname then
begin
TDBMemo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TRxDBLookupCombo then begin
if TRxDBLookupCombo(Controls[i]).DataField=fielname then
begin
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end;
end;
end;
with bsSkinGroupBox4 do
begin
for i:=0 to ControlCount-1 do begin
if Controls[i] is TwwDBComboBox then
begin
if TwwDBComboBox(Controls[i]).DataField=fielname then
begin
TwwDBComboBox(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBLookupCombo then begin
if TwwDBLookupCombo(Controls[i]).DataField=fielname then
begin
TwwDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBEdit then begin
if TDBEdit(Controls[i]).DataField=fielname then
begin
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBDateTimePicker then begin
if TwwDBDateTimePicker(Controls[i]).DataField=fielname then
begin
TwwDBDateTimePicker(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBMemo then begin
if TDBMemo(Controls[i]).DataField=fielname then
begin
TDBMemo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TRxDBLookupCombo then begin
if TRxDBLookupCombo(Controls[i]).DataField=fielname then
begin
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end;
end;
end;
with bsSkinExPanel1 do
begin
for i:=0 to ControlCount-1 do begin
if Controls[i] is TwwDBComboBox then
begin
if TwwDBComboBox(Controls[i]).DataField=fielname then
begin
TwwDBComboBox(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBLookupCombo then begin
if TwwDBLookupCombo(Controls[i]).DataField=fielname then
begin
TwwDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBEdit then begin
if TDBEdit(Controls[i]).DataField=fielname then
begin
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBDateTimePicker then begin
if TwwDBDateTimePicker(Controls[i]).DataField=fielname then
begin
TwwDBDateTimePicker(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBMemo then begin
if TDBMemo(Controls[i]).DataField=fielname then
begin
TDBMemo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TRxDBLookupCombo then begin
if TRxDBLookupCombo(Controls[i]).DataField=fielname then
begin
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end;
end;
end;
with bsSkinGroupBox10 do
begin
for i:=0 to ControlCount-1 do begin
if Controls[i] is TwwDBComboBox then
begin
if TwwDBComboBox(Controls[i]).DataField=fielname then
begin
TwwDBComboBox(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBLookupCombo then begin
if TwwDBLookupCombo(Controls[i]).DataField=fielname then
begin
TwwDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBEdit then begin
if TDBEdit(Controls[i]).DataField=fielname then
begin
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TwwDBDateTimePicker then begin
if TwwDBDateTimePicker(Controls[i]).DataField=fielname then
begin
TwwDBDateTimePicker(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TDBMemo then begin
if TDBMemo(Controls[i]).DataField=fielname then
begin
TDBMemo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TRxDBLookupCombo then begin
if TRxDBLookupCombo(Controls[i]).DataField=fielname then
begin
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end;
end;
end;
with bsSkinPanel1 do begin
for i:=0 to ControlCount-1 do begin
if Controls[i] is TDBEdit then begin
if TDBEdit(Controls[i]).DataField=fielname then begin
TDBEdit(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end else if Controls[i] is TRxDBLookupCombo then begin
if TRxDBLookupCombo(Controls[i]).DataField=fielname then begin
TRxDBLookupCombo(Controls[i]).Color:=StringToColor(scolor);
exit;
end;
end;
end;
end;
end;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>ͬ<EFBFBD><CDAC>ɫ<EFBFBD><C9AB>ʾ
frm_data_share.t_code_empty.Filtered:=false;
frm_data_share.t_code_empty.Filter:='<27><>=''t_op_railway''';
frm_data_share.t_code_empty.Filtered:=true;
frm_data_share.t_code_empty.First;
while not frm_data_share.t_code_empty.Eof do
begin
if (frm_data_share.t_code_empty.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD><E1B5A5>') or (frm_data_share.t_code_empty.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD><E1B5A5>') then
begin
// ShowMessage(frm_data_share.t_code_empty.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring+t_op_railway1.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').asstring);
if t_op_railway1.DataSet.FindField('װ<>˷<EFBFBD>ʽ')<>nil then begin
if pos('<27><>Ʊ',t_op_railway1.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').asstring)>0 then begin
end else begin
consetcolor(frm_data_share.t_code_empty.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
end else begin
consetcolor(frm_data_share.t_code_empty.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
end
else
begin
consetcolor(frm_data_share.t_code_empty.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
frm_data_share.t_code_empty.next;
end;
end;
procedure Tfrm_op_railway.Notebook1PageChanged(Sender: TObject);
begin
if Notebook1.PageIndex<>0 then
begin
setconcolor;
end;
end;
procedure Tfrm_op_railway.DBComboBoxEh1Change(Sender: TObject);
begin
if t_op_railway1.DataSet=nil then
exit;
if (t_op_railway1.DataSet.state=dsinsert)or(t_op_railway1.DataSet.state=dsedit)then
begin
if DBComboBoxEh1.Text='' then
exit;
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',DBComboBoxEh1.Text,[]) then
t_op_railway1.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_railway.DBComboBoxEh1DropDown(Sender: TObject);
var AdoQuery1:TAdoQuery;
begin
DBComboBoxEh1.items.clear;
AdoQuery1:=CreateAdoQuery;
with AdoQuery1 do
try
Close;sql.Clear;
SQL.Add('select * from t_sys_employee where ״̬=''<27><>ְ''');
SQL.Add('Order by <20><><EFBFBD><EFBFBD>');
Open;first;
while not Eof do
begin
DBComboBoxEh1.Items.Add(AdoQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
Next;
end;
finally
Free;
end;
end;
procedure Tfrm_op_railway.DBEdit49Change(Sender: TObject);
begin
DBEdit49.Color:=dxgrid_color('<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>',DBEdit49.text);
end;
procedure Tfrm_op_railway.bsSkinButton21Click(Sender: TObject);
begin
try
frm_op_givectn_add:=tfrm_op_givectn_add.Create (self);
frm_op_givectn_add.DataSource1.dataset:=t_op_railway1.dataset;
frm_op_givectn_add.ShowModal;
finally
frm_op_givectn_add.Free;
frm_op_givectn_add:=nil;
end;
end;
procedure Tfrm_op_railway.DBEdit50Change(Sender: TObject);
begin
{
if t_op_railway1.DataSet=nil then
exit;
if Trim(DBEdit50.Text)='' then begin
DBEdit10.ReadOnly:=false;
DBEdit10.Color:=clWindow;
end else begin
DBEdit10.ReadOnly:=true;
DBEdit10.Color:=clBtnFace;
end;
}
end;
procedure Tfrm_op_railway.N31Click(Sender: TObject);
begin
if t_op_railway1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='' then begin
t_op_railway1.DataSet.edit;
t_op_railway1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_op_railway1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime:=Date;
t_op_railway1.DataSet.post;
end else begin
ShowMessage('<27>˴<EFBFBD><CBB4><EFBFBD>״̬<D7B4>²<EFBFBD><C2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룡');
end;
end;
procedure Tfrm_op_railway.DBEdit51Change(Sender: TObject);
begin
if wwDBComboBox4.text<>'<27><>·<EFBFBD><C2B7>Ʊ' then begin
if (trim(DBEdit51.text)='') or (trim(DBEdit51.text)='0') then
begin
DBEdit10.ReadOnly:=false;
DBEdit10.Color:=clWindow;
RxDBLookupCombo3.Color:=clWindow;
RxDBLookupCombo3.ReadOnly:=false;
end else begin
DBEdit10.ReadOnly:=true;
DBEdit10.Color:=clBtnFace;
RxDBLookupCombo3.Color:=clWindow;
RxDBLookupCombo3.ReadOnly:=false;
end;
end;
end;
procedure Tfrm_op_railway.bsSkinButton19Click(Sender: TObject);
var
seabandini:tinifile ;
begin
seabandini:=Tinifile.Create(ExtractFilePath(application.ExeName)+'GroupBoxVisible.ini');
try
seabandini.Writebool('railway','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ',bsSkinCheckRadioBox1.Checked);
seabandini.Writebool('railway','ɽ<>ڿڰ<DABF><DAB0><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>Ϣ',bsSkinCheckRadioBox2.Checked);
seabandini.Writebool('railway','<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ',bsSkinCheckRadioBox3.Checked);
seabandini.Writebool('railway','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ',bsSkinCheckRadioBox4.Checked);
bsSkinGroupBox3.Visible:=bsSkinCheckRadioBox1.Checked;
bsSkinGroupBox4.Visible:=bsSkinCheckRadioBox2.Checked;
bsSkinGroupBox7.Visible:=bsSkinCheckRadioBox3.Checked;
bsSkinExPanel1.Visible:=bsSkinCheckRadioBox4.Checked;
t_op_railway1.DataSet.Edit;
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox6.Checked;
t_op_railway1.DataSet['½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox7.Checked;
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox8.Checked;
t_op_railway1.DataSet.post;
if t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean
or t_op_railway1.DataSet.FieldByName('½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean
or t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
bsSkinExPanel2.Visible:=true;
end
else
begin
bsSkinExPanel2.Visible:=false;
end;
if t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
bsSkinGroupBox8.Visible:=true;
end
else
begin
bsSkinGroupBox8.Visible:=false;
end;
if t_op_railway1.DataSet.FieldByName('½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
bsSkinGroupBox9.Visible:=true;
end
else
begin
bsSkinGroupBox9.Visible:=false;
end;
if t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
bsSkinGroupBox11.Visible:=true;
end
else
begin
bsSkinGroupBox11.Visible:=false;
end;
finally
bsSkinGroupBox6.Visible:=false;
freeandnil(seabandini);
end;
end;
procedure Tfrm_op_railway.bsSkinButton20Click(Sender: TObject);
begin
bsSkinGroupBox6.Visible:=false;
end;
procedure Tfrm_op_railway.bsSkinButton18Click(Sender: TObject);
begin
bsSkinGroupBox6.Visible:=true;
bsSkinCheckRadioBox6.Checked:=t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean;
bsSkinCheckRadioBox7.Checked:=t_op_railway1.DataSet.FieldByName('½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean;
bsSkinCheckRadioBox8.Checked:=t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean;
end;
procedure Tfrm_op_railway.RxDBLookupCombo4Change(Sender: TObject);
begin
if RxDBLookupCombo4.text='<27><>˾<EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>' then begin
DBEdit10.ReadOnly:=true;
DBEdit10.Color:=clBtnFace;
RxDBLookupCombo3.Color:=clBtnFace;
RxDBLookupCombo3.ReadOnly:=true;
bsSkinButton21.Enabled:=true;
end else if RxDBLookupCombo4.text='<27>ͻ<EFBFBD><CDBB>Ա<EFBFBD><D4B1><EFBFBD>' then begin
DBEdit10.ReadOnly:=false;
DBEdit10.Color:=clWindow;
RxDBLookupCombo3.Color:=clWindow;
RxDBLookupCombo3.ReadOnly:=false;
bsSkinButton21.Enabled:=false;
end else if RxDBLookupCombo4.text='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
DBEdit10.ReadOnly:=true;
DBEdit10.Color:=clBtnFace;
RxDBLookupCombo3.Color:=clBtnFace;
RxDBLookupCombo3.ReadOnly:=true;
bsSkinButton21.Enabled:=true;
end else begin
DBEdit10.ReadOnly:=false;
DBEdit10.Color:=clWindow;
RxDBLookupCombo3.Color:=clWindow;
RxDBLookupCombo3.ReadOnly:=false;
bsSkinButton21.Enabled:=false;
end;
end;
procedure Tfrm_op_railway.t_railfcdatechange(Sender: TField);
begin
if sender.DataSet.State in [dsedit,dsinsert] then begin
if (not sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull) and (not sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull) then begin
sender.DataSet.fieldbyname('<27>Ѵ<EFBFBD><D1B4><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=DaysBetween(sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime,sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)+1;
end;
end;
end;
procedure Tfrm_op_railway.t_op_railway_fenBeforeDelete(DataSet: TDataSet);
var
aQuery,aQuery2:TADOQuery;
begin
op_befor_post(t_op_railway_fen,'0006');
if (t_op_railway_fen.FieldByName('ctnid').AsString<>'') then begin
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add(' delete from t_op_ctnmg_status where ctnid='+t_op_railway_fen.FieldByName('ctnid').AsString+' and <20><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
ExecSQL;
aQuery2.SQL.Text:='select top 1 * from t_op_ctnmg_status where ctnid='+t_op_railway_fen.FieldByName('ctnid').AsString+' order by <20><>̬ʱ<CCAC><CAB1> DESC ';
aQuery2.Open;
if aQuery2.IsEmpty then begin
Close;SQL.Clear;
SQL.Add(' update t_op_ctnmg_detail set <20><>ǰ<EFBFBD><C7B0>̬=''<27><><EFBFBD><EFBFBD>'',<2C><><EFBFBD><EFBFBD>=0,ί<>б<EFBFBD><D0B1><EFBFBD>='''',<2C><><EFBFBD><EFBFBD><E1B5A5>='''' where ctnid='+t_op_railway_fen.FieldByName('ctnid').AsString);
ExecSQL;
end else begin
Close;SQL.Clear;
SQL.Add(' update t_op_ctnmg_detail set <20><>ǰ<EFBFBD><C7B0>̬='''+aQuery2.fieldbyname('<27><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>').AsString+''',<2C><>̬ʱ<CCAC><CAB1>='''+aQuery2.fieldbyname('<27><>̬ʱ<CCAC><CAB1>').AsString+''',<2C><><EFBFBD><EFBFBD>=0,ί<>б<EFBFBD><D0B1><EFBFBD>='''',<2C><><EFBFBD><EFBFBD><E1B5A5>='''' where ctnid='+t_op_railway_fen.FieldByName('ctnid').AsString);
ExecSQL;
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
end;
procedure Tfrm_op_railway.N44Click(Sender: TObject);
var i :Integer;
yjid:array of string ;
val,fenbsno:string ;
can_do:boolean;
gdo,xdo:smallint;
begin
if t_op_railway1.DataSet.IsEmpty then
exit;
if (Notebook1.PageIndex=1) then begin
if not do_data('0006',t_op_railway1.DataSet.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_op_railway1.DataSet.FieldByName('<27>ͷ<EFBFBD>Ա').asstring
,'no'
,'no') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
exit;
end;
if t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>״̬<D7B4><CCAC>');
exit;
end;
t_ch_fee.close;
t_ch_fee.Parameters[0].value:=t_op_railway1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee.open;
can_do:=true;
t_ch_fee.first;
while not t_ch_fee.eof do
begin
if can_do then
begin
if (t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹɾ<D6B9><C9BE>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD>޸<EFBFBD>')then
begin
can_do:=false;
showmessage('<27><>Ʊҵ<C6B1><D2B5><EFBFBD>еķ<D0B5><C4B7><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD>ܷ<EFBFBD><DCB7>÷<EFBFBD><C3B7>ʣ<EFBFBD>');
continue;;
end;
end;
t_ch_fee.next;
end;
if can_do then
begin
prnlist:=true;
try
t_op_railway1.DataSet.edit;
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>';
t_op_railway1.DataSet['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Now;
if (gdo<>0) or (xdo<>0) then begin
if trim(t_op_railway1.DataSet.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><>ͨ<EFBFBD><CDA8>' then begin
if gdo=1 then begin
if t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>Logininfo.endday then
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end else if trim(t_op_railway1.DataSet.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='<27><><EFBFBD>ĵ<EFBFBD>' then begin
if xdo=1 then begin
if t_op_railway1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>Logininfo.endday then
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_op_railway1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
end;
t_op_railway1.DataSet.post;
finally
prnlist:=false;
end;
end;
end else begin
setlength(yjid,cxGrid1DBTableView1.Controller.SelectedRowCount);
frm_op_railway.t_op_railway.DisableControls;
cxGrid1DBTableView1.BeginUpdate ;
try
for i:=0 to cxGrid1DBTableView1.Controller.SelectedRowCount-1 do
begin //<2F><><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
val:=cxGrid1DBTableView1.DataController.GetDisplayText(cxGrid1DBTableView1.Controller.SelectedRows[I].RecordIndex,0) ;
yjid[i]:=val ;
end; //<2F>õ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>е<EFBFBD>ֵ
for i:=0 to high(yjid) do
begin
if t_op_railway.Locate('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',yjid[i],[]) then
begin
if not do_data('0006',t_op_railway1.DataSet.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_op_railway1.DataSet.FieldByName('<27>ͷ<EFBFBD>Ա').asstring
,'no'
,'no') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
continue;;
end;
if t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>״̬<D7B4><CCAC>');
continue;;
end;
t_ch_fee.close;
t_ch_fee.Parameters[0].value:=t_op_railway1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee.open;
can_do:=true;
t_ch_fee.first;
while not t_ch_fee.eof do
begin
if can_do then
begin
if (t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹɾ<D6B9><C9BE>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD>޸<EFBFBD>')then
begin
can_do:=false;
showmessage('<27><>Ʊҵ<C6B1><D2B5><EFBFBD>еķ<D0B5><C4B7><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD>ܷ<EFBFBD><DCB7>÷<EFBFBD><C3B7>ʣ<EFBFBD>');
continue;;
end;
end;
t_ch_fee.next;
end;
gdo:=strtoint(get_parameters_value(137,'0'));
xdo:=strtoint(get_parameters_value(138,'0'));
t_ch_fee.close;
if can_do then
begin
prnlist:=true;
try
t_op_railway1.DataSet.edit;
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>';
t_op_railway1.DataSet['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Now;
if (gdo<>0) or (xdo<>0) then begin
if trim(t_op_railway1.DataSet.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><>ͨ<EFBFBD><CDA8>' then begin
if gdo=1 then begin
if t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>Logininfo.endday then
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end else if trim(t_op_railway1.DataSet.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='<27><><EFBFBD>ĵ<EFBFBD>' then begin
if xdo=1 then begin
if t_op_railway1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>Logininfo.endday then
t_op_railway1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_op_railway1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
end;
t_op_railway1.DataSet.post;
finally
prnlist:=false;
end;
end;
end ;
end ;
finally
cxGrid1DBTableView1.EndUpdate ;
bsSkinPanel5.Visible:=False;
frm_op_railway.t_op_railway.EnableControls;
end;
end;
end;
procedure Tfrm_op_railway.N46Click(Sender: TObject);
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>
if t_op_railway1.DataSet.IsEmpty then
exit;
if not do_data('0006',t_op_railway1.DataSet.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_op_railway1.DataSet.FieldByName('<27>ͷ<EFBFBD>Ա').asstring
,'no'
,'no') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
exit;
end;
if t_op_railway1.DataSet.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊҵ<CEAA><D2B5><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>');
exit;
end;
try
t_op_railway1.DataSet.edit;
t_op_railway1.DataSet['ҵ<><D2B5>״̬']:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_op_railway1.DataSet.post;
finally
end;
end;
procedure Tfrm_op_railway.RxDBLookupCombo2KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
end;
procedure Tfrm_op_railway.RxDBLookupCombo2Enter(Sender: TObject);
begin
RxLookupComboEnter(TRxDBLookupCombo(Sender));
end;
function Tfrm_op_railway.getband(bandid: integer): boolean;
begin
{
if bandid=1 then result:=band1 else
if bandid=2 then result:=band2 else
if bandid=3 then result:=band3 else
if bandid=4 then result:=band4 else
if bandid=5 then result:=band5 else
if bandid=6 then result:=band6 else
if bandid=7 then result:=band7 else
if bandid=8 then result:=band8 else
result:=true ;
}
end;
procedure Tfrm_op_railway.RxDBLookupCombo23Enter(Sender: TObject);
begin
RxLookupComboEnter(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_railway.RxDBLookupCombo23Exit(Sender: TObject);
begin
RxLookupComboExit(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_railway.bsSkinButton22Click(Sender: TObject);
begin
frm_main.view_momo(t_op_railway1,'<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>');
end;
procedure Tfrm_op_railway.DBEdit1Change(Sender: TObject);
begin
//
if t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean
or t_op_railway1.DataSet.FieldByName('½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean
or t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
bsSkinExPanel2.Visible:=true;
end
else
begin
bsSkinExPanel2.Visible:=false;
end;
if t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
bsSkinGroupBox8.Visible:=true;
end
else
begin
bsSkinGroupBox8.Visible:=false;
end;
if t_op_railway1.DataSet.FieldByName('½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
bsSkinGroupBox9.Visible:=true;
end
else
begin
bsSkinGroupBox9.Visible:=false;
end;
if t_op_railway1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
bsSkinGroupBox11.Visible:=true;
end
else
begin
bsSkinGroupBox11.Visible:=false;
end;
end;
procedure Tfrm_op_railway.RxDBLookupCombo25Enter(Sender: TObject);
begin
RxLookupComboEnter_Localport(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_railway.RxDBLookupCombo25Exit(Sender: TObject);
begin
RxLookupComboexit_Localport(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_railway.RxDBLookupCombo28Enter(Sender: TObject);
begin
RxLookupComboEnter_Localport(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_railway.RxDBLookupCombo28Exit(Sender: TObject);
begin
RxLookupComboexit_Localport(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_railway.RxDBLookupCombo24Enter(Sender: TObject);
begin
RxLookupComboEnter(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_railway.RxDBLookupCombo24Exit(Sender: TObject);
begin
RxLookupComboExit(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_railway.RxDBLookupCombo21Enter(Sender: TObject);
begin
RxLookupComboEnter(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_railway.RxDBLookupCombo21Exit(Sender: TObject);
begin
RxLookupComboExit(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_railway.bsSkinButton23Click(Sender: TObject);
begin
// ShowMessage(IntToStr(frm_op_railway.cxGrid1DBTableView1.Controller.SelectedRowCount));
// ShowMessage(IntToStr(frm_op_railway.cxGrid1DBTableView3.Controller.SelectedRowCount));
// Exit;
try
frm_op_railway_batchfee:=tfrm_op_railway_batchfee.Create (self);
frm_op_railway_batchfee.yelx:='M';
frm_op_railway_batchfee.ShowModal;
finally
frm_op_railway_batchfee.Free;
frm_op_railway_batchfee:=nil;
end;
end;
procedure Tfrm_op_railway.DBComboBoxEh2DropDown(Sender: TObject);
var AdoQuery1:TAdoQuery;
begin
TDBComboBoxEh(Sender).items.clear;
AdoQuery1:=CreateAdoQuery;
with AdoQuery1 do
try
Close;sql.Clear;
SQL.Add('select * from t_sys_employee where ״̬=''<27><>ְ''');
SQL.Add('Order by <20><><EFBFBD><EFBFBD>');
Open;first;
while not Eof do
begin
TDBComboBoxEh(Sender).Items.Add(AdoQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
Next;
end;
finally
Free;
end;
end;
procedure Tfrm_op_railway.DBComboBoxEh3Change(Sender: TObject);
begin
if (t_op_railway.state=dsinsert)or(t_op_railway.state=dsedit)then
begin
if DBComboBoxEh3.text='' then
exit;
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',DBComboBoxEh3.text,[]) then
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_railway.bsSkinButton24Click(Sender: TObject);
begin
try
frm_op_railway_batchfee:=tfrm_op_railway_batchfee.Create (self);
frm_op_railway_batchfee.yelx:='H';
frm_op_railway_batchfee.ShowModal;
finally
frm_op_railway_batchfee.Free;
frm_op_railway_batchfee:=nil;
end;
end;
procedure Tfrm_op_railway.N48Click(Sender: TObject);
var
i,gdo,xdo:Integer;
can_do:Boolean;
begin
if t_op_railway_fen1.DataSet.IsEmpty then
exit;
if dxDBGrid2.SelectedCount >= 1 then
begin
try
for i := 0 to dxDBGrid2.SelectedCount - 1 do
begin
t_op_railway_fen1.DataSet.GotoBookmark(pointer(dxDBGrid2.selectedrows[i]));
if not do_data('0006',t_op_railway_fen1.DataSet.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_op_railway_fen1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_op_railway_fen1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_op_railway_fen1.DataSet.FieldByName('<27>ͷ<EFBFBD>Ա').asstring
,'no'
,'no') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
continue;;
end;
if t_op_railway_fen1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>״̬<D7B4><CCAC>');
continue;;
end;
t_ch_fee.close;
t_ch_fee.Parameters[0].value:=t_op_railway_fen1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee.open;
can_do:=true;
t_ch_fee.first;
while not t_ch_fee.eof do
begin
if can_do then
begin
if (t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹɾ<D6B9><C9BE>') and
(t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD>޸<EFBFBD>')then
begin
can_do:=false;
showmessage('<27><>Ʊҵ<C6B1><D2B5><EFBFBD>еķ<D0B5><C4B7><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD>ܷ<EFBFBD><DCB7>÷<EFBFBD><C3B7>ʣ<EFBFBD>');
continue;;
end;
end;
t_ch_fee.next;
end;
gdo:=strtoint(get_parameters_value(137,'0'));
xdo:=strtoint(get_parameters_value(138,'0'));
t_ch_fee.close;
if can_do then
begin
prnlist:=true;
try
t_op_railway_fen1.DataSet.edit;
t_op_railway_fen1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>';
t_op_railway_fen1.DataSet['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Now;
if (gdo<>0) or (xdo<>0) then begin
if trim(t_op_railway_fen1.DataSet.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><>ͨ<EFBFBD><CDA8>' then begin
if gdo=1 then begin
if t_op_railway_fen1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>Logininfo.endday then
t_op_railway_fen1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_op_railway_fen1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end else if trim(t_op_railway_fen1.DataSet.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='<27><><EFBFBD>ĵ<EFBFBD>' then begin
if xdo=1 then begin
if t_op_railway_fen1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>Logininfo.endday then
t_op_railway_fen1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_op_railway_fen1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
end;
t_op_railway_fen1.DataSet.post;
finally
prnlist:=false;
end;
end;
end ;
finally
// frm_op_railway.t_op_railway.EnableControls;
end;
end;
end;
procedure Tfrm_op_railway.bsSkinButton25Click(Sender: TObject);
begin
bsSkinPanel6.Visible:=true;
end;
procedure Tfrm_op_railway.bsSkinButton27Click(Sender: TObject);
begin
bsSkinPanel6.Visible:=false;
end;
procedure Tfrm_op_railway.bsSkinButton26Click(Sender: TObject);
var i :Integer;
yjid:array of string ;
val,fenbsno:string ;
aAdoUpdate : TADOQuery;
begin
if dxDBGrid2.SelectedCount < 1 then
begin
showmessage('<27><>ѡ<EFBFBD><D1A1>Ҫ<EFBFBD>޸ĵķ<C4B5>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>');
exit;
end; ;
aAdoUpdate :=CreateAdoQuery;
try
t_op_railway_fen.DisableControls;
for i := 0 to dxDBGrid2.SelectedCount - 1 do
begin
t_op_railway_fen.GotoBookmark(pointer(dxDBGrid2.selectedrows[i]));
with aAdoUpdate do
begin
Close;SQL.Clear;
SQL.Add('Update t_op_railway set <20>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ=<3D>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ ');
if (bsSkinComboBox2.Text<>'') and (bsSkinDateEdit2.Text<>'') then
SQL.Add(', '+bsSkinComboBox2.Text+'='''+FormatDateTime('YYYY-MM-DD',bsSkinDateEdit2.Date)+'''');
if (wwDBLookupCombo11.Text<>'') then
SQL.Add(', <20><>վ<EFBFBD><D5BE><EFBFBD><EFBFBD>='''+wwDBLookupCombo11.Text+'''');
if (Edit1.Text<>'') then
SQL.Add(', <20><>վ='''+Edit1.Text+'''');
if (wwDBLookupCombo13.Text<>'') then
SQL.Add(', <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+wwDBLookupCombo13.Text+'''');
if (Edit2.Text<>'') then
SQL.Add(', <20><><EFBFBD><EFBFBD>վ='''+Edit2.Text+'''');
if (wwDBLookupCombo12.Text<>'') then
SQL.Add(', ʼ<><CABC>վ='''+wwDBLookupCombo12.Text+'''');
if (wwDBDateTimePicker46.Text<>'') then
SQL.Add(', ʼ<><CABC>վ<EFBFBD><D5BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+wwDBDateTimePicker46.Text+'''');
if (Edit3.Text<>'') then
SQL.Add(', Ʒ<><C6B7>='''+Edit3.Text+'''');
if (Edit4.Text<>'') and (Edit4.Text<>'0') then
SQL.Add(', <20><><EFBFBD><EFBFBD>='+Edit4.Text);
if (RxDBLookupCombo8.DisplayValue<>'') then
SQL.Add(', <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+RxDBLookupCombo8.DisplayValue);
SQL.Add('where <20><><EFBFBD><EFBFBD>=:bsno');
Parameters.ParamByName('bsno').Value:=t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
ExecSQL;
end;
end;
t_op_railway_fen.Refresh();
finally
bsSkinPanel6.Visible:=False;
FreeAndNil(aAdoUpdate);
t_op_railway_fen.EnableControls;
end;
end;
procedure Tfrm_op_railway.wwDBLookupCombo11Change(Sender: TObject);
begin
if wwDBLookupCombo11.text='' then
exit;
if frm_data_share.t_code_railport.locate('<27>ڰ<EFBFBD><DAB0><EFBFBD><EFBFBD><EFBFBD>',wwDBLookupCombo11.text,[]) then begin
Edit1.Text:=frm_data_share.t_code_railport['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_railway.wwDBLookupCombo13Change(Sender: TObject);
begin
if wwDBLookupCombo13.text='' then
exit;
if frm_data_share.t_code_railport.locate('<27>ڰ<EFBFBD><DAB0><EFBFBD><EFBFBD><EFBFBD>',wwDBLookupCombo13.text,[]) then begin
Edit2.Text:=frm_data_share.t_code_railport['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_railway.bsSkinButton28Click(Sender: TObject);
var
Ext,adate,bsno,corp,vslvoy:String;
ExcelTemplet:Variant;
i,j:integer;
M,D,Y:Word;
imp:boolean;
begin
if OpenDialog1.Execute then begin
Ext:=lowercase(ExtractFileExt(OpenDialog1.FileName));
if (Ext='.xls') or (Ext='.xlsx') then begin
ExcelTemplet:= CreateOleObject('Excel.Application');
try
ExcelTemplet.Workbooks.Open(OpenDialog1.FileName);
frm_op_railway.t_op_railway_fen.DisableControls;
for i:=0 to frm_op_railway.dxDBGrid2.SelectedCount-1 do
begin
frm_op_railway.t_op_railway_fen.GotoBookmark(pointer(frm_op_railway.dxDBGrid2.selectedrows[i]));
if VartoStr(ExcelTemplet.ActiveSheet.Cells[I+2,1].Value)<>'' then begin
t_op_railway_fen.Edit;
t_op_railway_fen['<27><><EFBFBD><EFBFBD>']:=ExcelTemplet.ActiveSheet.Cells[I+2,1].Value;
t_op_railway_fen['<27><><EFBFBD><EFBFBD>']:=ExcelTemplet.ActiveSheet.Cells[I+2,2].Value;
t_op_railway_fen['<27><>Դ']:=ExcelTemplet.ActiveSheet.Cells[I+2,3].Value;
v_op_ctnmg_detail.Close;
v_op_ctnmg_detail.sql.text:='select * from v_op_ctnmg_detail where <20><>ǰ<EFBFBD><C7B0>̬=''<27><><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD>='''+vartostr(ExcelTemplet.ActiveSheet.Cells[I+2,1].Value)+'''';
v_op_ctnmg_detail.Open;
if not v_op_ctnmg_detail.IsEmpty then t_op_railway_fen['ctnid']:=t_op_railway_fen['ctnid'];
t_op_railway_fen.Post;
if not v_op_ctnmg_detail.IsEmpty then begin
v_op_ctnmg_detail.edit;
v_op_ctnmg_detail.FieldByName('<27><>ǰ<EFBFBD><C7B0>̬').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
v_op_ctnmg_detail.FieldByName('<27><>̬ʱ<CCAC><CAB1>').AsDateTime:=Date;
v_op_ctnmg_detail.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean:=True;
v_op_ctnmg_detail.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring:=t_op_railway_fen.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring;
v_op_ctnmg_detail.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring:=t_op_railway_fen.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring;;
v_op_ctnmg_detail.post;
t_op_ctnmg_status.Close;
t_op_ctnmg_status.Open;
t_op_ctnmg_status.Insert;
t_op_ctnmg_status['ctnid']:=v_op_ctnmg_detail['ctnid'];
t_op_ctnmg_status['<27><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>']:=v_op_ctnmg_detail['<27><>ǰ<EFBFBD><C7B0>̬'];
t_op_ctnmg_status['<27><>̬ʱ<CCAC><CAB1>']:=v_op_ctnmg_detail['<27><>̬ʱ<CCAC><CAB1>'];
t_op_ctnmg_status['״̬']:=v_op_ctnmg_detail['<27><>ǰ״̬'];
t_op_ctnmg_status['<27><EFBFBD><E1B5A5>']:=v_op_ctnmg_detail.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring;
t_op_ctnmg_status['<27><><EFBFBD><EFBFBD>']:=v_op_ctnmg_detail['<27><><EFBFBD><EFBFBD>'];
t_op_ctnmg_status['<27><>ע']:=v_op_ctnmg_detail['<27><>ע'];
t_op_ctnmg_status['<27><><EFBFBD><EFBFBD>Ա']:=employee;
t_op_ctnmg_status['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=date;
t_op_ctnmg_status.Post;
end;
end;
end;
finally
ExcelTemplet.DisplayAlerts := false;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
ExcelTemplet.Quit;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>
frm_op_railway.t_op_railway_fen.EnableControls;
end;
end;
end;
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD>', mtConfirmation, [mbYes],0);
end;
end.