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_APPROVALINFO ent = dg.SelectedItems[0] as T_OA_APPROVALINFO; if (ent.CHECKSTATE == ((int)CheckStates.Approving).ToString() || ent.CHECKSTATE == ((int)CheckStates.WaittingApproval).ToString() || ent.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString()) { ApprovalForm_aud frm = new ApprovalForm_aud(FormTypes.Audit, ent.APPROVALID); frm.ApprovalInfo = selApporvalInfo; EntityBrowser browser = new EntityBrowser(frm); browser.FormType = FormTypes.Audit; browser.MinWidth = 760; browser.MinHeight = 340; 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; } }
private void btnEdit_Click(object sender, RoutedEventArgs e) { ObservableCollection <T_OA_APPROVALINFO> selApporvalInfoList = GetSelectedList(Permissions.Edit); if (dg.SelectedItems == null) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } if (dg.SelectedItems.Count == 0) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } selApporvalInfo = selApporvalInfoList[0]; if (SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(selApporvalInfo, "T_OA_APPROVALINFO", OperationType.Edit, Common.CurrentLoginUserInfo.EmployeeID)) { if (selApporvalInfo.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString()) { //ApprovalForm_upd frm = new ApprovalForm_upd(FormTypes.Edit, selApporvalInfo.APPROVALID); ApprovalForm_aud frm = new ApprovalForm_aud(FormTypes.Edit, selApporvalInfo.APPROVALID); //Border aa = new Border(); //Utility.CreateFormFromEngine(selApporvalInfo.APPROVALID, "SMT.SaaS.OA.UI.UserControls.ApprovalForm_aud", "Audit", aa); frm.ApprovalInfo = selApporvalInfo; EntityBrowser browser = new EntityBrowser(frm); browser.FormType = FormTypes.Edit; browser.MinWidth = 860; browser.MinHeight = 500; 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("NOTONLYCANMODIFYTHEDATASUBMITTED")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("NOTONLYCANMODIFYTHEDATASUBMITTED"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); return; } } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("YOUDONOTHAVEPERMISSIONTOOPERATETHEDATA"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }
private void btnNew_Click(object sender, RoutedEventArgs e) { ApprovalForm_aud frm = new ApprovalForm_aud(); EntityBrowser browser = new EntityBrowser(frm); browser.MinWidth = 688; browser.MinHeight = 400; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true); //BusinessApplicationsForm AddWin = new BusinessApplicationsForm(); //EntityBrowser browser = new EntityBrowser(AddWin); //browser.EntityBrowseToolBar.MaxHeight = 0; //AddWin.ParentEntityBrowser = browser; //browser.MinWidth = 980; //browser.MinHeight = 380; //browser.TitleContent = "出差申请"; //browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); //browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true); }
void btnReSubmit_Click(object sender, RoutedEventArgs e) { ObservableCollection <T_OA_APPROVALINFO> selectItems = GetSelectedList(Permissions.Edit); if (selectItems != null) { approvalinfoInfo = selectItems.FirstOrDefault(); ApprovalForm_aud form = new ApprovalForm_aud(FormTypes.Resubmit, approvalinfoInfo.APPROVALID); form.ApprovalInfo = approvalinfoInfo; EntityBrowser browser = new EntityBrowser(form); browser.FormType = FormTypes.Resubmit; browser.MinWidth = 750; browser.MinHeight = 400; 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", "ReSubmit"), Utility.GetResourceStr("CONFIRMBUTTON")); } }
void BtnView_Click(object sender, RoutedEventArgs e) { ObservableCollection <T_OA_APPROVALINFO> selApporvalInfoList = GetSelectedList(Permissions.Browse); if (selApporvalInfoList == null) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } selApporvalInfo = selApporvalInfoList.FirstOrDefault(); ApprovalForm_aud frm = new ApprovalForm_aud(FormTypes.Browse, selApporvalInfo.APPROVALID); //frm.ApprovalInfo = selApporvalInfo; EntityBrowser browser = new EntityBrowser(frm); browser.FormType = FormTypes.Browse; browser.MinWidth = 760; browser.MinHeight = 360; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true); }