/// <summary> /// 审核 /// </summary> protected override void DoApproval(object sender) { DataRow row = gvMainData.GetFocusedDataRow(); if (row == null) { return; } frmAppResult LoadResult = (frmAppResult)ConvertLib.ToInt(row["AppStatus"]); frmAppResult appstatus = frmApp.ShowForm(LoadResult); if (appstatus != frmAppResult.未审核) { string docno = row[tb_PO.DocNo] + ""; bll.Approval(docno, (int)appstatus); row[tb_PO.AppUser] = Loginer.CurrentLoginer.Account; row[tb_PO.AppDate] = DateTime.Now; row[tb_PO.AppStatus] = (int)appstatus; if (this.CurrentDataState == FormDataState.View) { EditData.Tables[tb_PO._TableName].Rows[0][tb_PO.AppUser] = Loginer.CurrentLoginer.Account; EditData.Tables[tb_PO._TableName].Rows[0][tb_PO.AppDate] = DateTime.Now; EditData.Tables[tb_PO._TableName].Rows[0][tb_PO.AppStatus] = (int)appstatus; } row.AcceptChanges(); } }
protected frmApp(frmAppResult LoadResult) { InitializeComponent(); btn_Access.Enabled = LoadResult == frmAppResult.未审核; btn_Abort.Enabled = LoadResult == frmAppResult.已审核; btn_Stop.Enabled = LoadResult == frmAppResult.未审核; }
public static frmAppResult ShowForm(frmAppResult LoadResult) { frmApp frm = new frmApp(LoadResult); frm.ShowIcon = false; frm.ShowInTaskbar = false; frm.ShowDialog(); return(frm.Result); }
protected frmApp(DataRow row) { dr = row; frmAppResult LoadResult = (frmAppResult)ConvertLib.ToInt(row["AppStatus"]); InitializeComponent(); btn_Access.Enabled = LoadResult == frmAppResult.未审核; btn_Abort.Enabled = LoadResult == frmAppResult.已审核; btn_Stop.Enabled = LoadResult == frmAppResult.未审核; }
private void btn_Abort_Click(object sender, EventArgs e) { if (ValidatePwd() == false) { return; } Result = frmAppResult.已弃审; if (dr != null) { dr["AppStatus"] = (int)Result; dr["AppUser"] = Loginer.CurrentLoginer.Account; dr["AppDate"] = bllDataCommon.Instance.GetServerTime(); } this.DialogResult = DialogResult.OK; }