//审核 void btnAudit_Click(object sender, RoutedEventArgs e) { if (dg.SelectedItems == null) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } if (dg.SelectedItems.Count == 0) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } T_OA_MAINTENANCERECORD ent = dg.SelectedItems[0] as T_OA_MAINTENANCERECORD; if (ent.CHECKSTATE == ((int)CheckStates.Approving).ToString() || ent.CHECKSTATE == ((int)CheckStates.WaittingApproval).ToString() || ent.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString()) { MaintenanceRecordForm_aud form = new MaintenanceRecordForm_aud(FormTypes.Audit, ent.MAINTENANCERECORDID); EntityBrowser browser = new EntityBrowser(form); browser.FormType = FormTypes.Audit; browser.MinWidth = 750; browser.MinHeight = 550; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true); } else { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTRECORDNOTOPERATEPLEASEAGAIN")); return; } }
void BtnView_Click(object sender, RoutedEventArgs e) { ObservableCollection <T_OA_MAINTENANCERECORD> selectInfoList = GetSelectList(); if (selectInfoList != null && selectInfoList.Count > 0) { maintenancerecord = selectInfoList.FirstOrDefault(); MaintenanceRecordForm_aud form = new MaintenanceRecordForm_aud(FormTypes.Browse, maintenancerecord.MAINTENANCERECORDID); EntityBrowser browser = new EntityBrowser(form); browser.FormType = FormTypes.Browse; browser.MinWidth = 750; browser.MinHeight = 550; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true); } else { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON")); } }