unit u_op_seae_state_up; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, ADODB, dxExEdtr, bsSkinCtrls, dxCntner, dxTL, dxDBCtrl, dxDBGrid, dxDBTLCl, dxGrClms, BusinessSkinForm, StdCtrls, Mask, DBCtrls, XPMenu, Menus; type Tfrm_op_seae_state_up = class(TForm) t_op_state: TADOQuery; t_op_state1: TDataSource; dxDBGrid1: TdxDBGrid; bsSkinPanel1: TbsSkinPanel; dxDBGrid1Column1: TdxDBGridMaskColumn; dxDBGrid1Column2: TdxDBGridCheckColumn; bsBusinessSkinForm1: TbsBusinessSkinForm; Label37: TLabel; DBEdit8: TDBEdit; Label38: TLabel; DBEdit9: TDBEdit; XPMenu1: TXPMenu; PopupMenu1: TPopupMenu; N1: TMenuItem; N2: TMenuItem; N3: TMenuItem; N4: TMenuItem; N5: TMenuItem; dxDBGrid1Column3: TdxDBGridColumn; procedure FormShow(Sender: TObject); procedure N1Click(Sender: TObject); procedure N3Click(Sender: TObject); procedure N5Click(Sender: TObject); procedure dxDBGrid1CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: String; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean); private { Private declarations } public { Public declarations } end; var frm_op_seae_state_up: Tfrm_op_seae_state_up; implementation uses u_main, u_op_seae, u_op_seae_state; {$R *.dfm} procedure Tfrm_op_seae_state_up.FormShow(Sender: TObject); begin t_op_state.open; t_op_state.requery; end; procedure Tfrm_op_seae_state_up.N1Click(Sender: TObject); var str:string; begin str:=t_op_state.fieldbyname('业务状态').asstring; if t_op_state.IsEmpty then exit; try modify_all:=true; t_op_state.DataSource.DataSet.edit; t_op_state.DataSource.DataSet['业务状态']:=str; t_op_state.DataSource.DataSet.Post; finally modify_all:=false; end; end; procedure Tfrm_op_seae_state_up.N3Click(Sender: TObject); begin if t_op_state.isempty then exit; if not t_op_state.FieldByName('是否完成').asboolean then begin t_op_state.edit; t_op_state['是否完成']:=1; t_op_state['完成时间']:=date; t_op_state['完成人']:=employee; t_op_state.post; if assigned(frm_op_seae_state) then frm_op_seae_state.fra_op_state1.t_op_state.requery; end; end; procedure Tfrm_op_seae_state_up.N5Click(Sender: TObject); begin frm_op_seae.N42Click(Sender); end; procedure Tfrm_op_seae_state_up.dxDBGrid1CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: String; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean); begin if ANode.Strings[1]<>'' then AColor:=$0080FF80 else AColor:=$008080FF; AFont.Color:=clblack; end; end.