private void BtnDetail_Click(object sender, RoutedEventArgs e) { var obj = DaGr.SelectedItems; if (obj == null || obj.Count == 0) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON"), MessageIcon.Exclamation); return; } if (ChargeEntity != null) { ChargeApplyForm DetailWin = new ChargeApplyForm(FormTypes.Browse, ChargeEntity.CHARGEAPPLYMASTERID); EntityBrowser browser = new EntityBrowser(DetailWin); browser.FormType = FormTypes.Browse; browser.MinWidth = 800; browser.MinHeight = 500; //browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }, true, ChargeEntity.CHARGEAPPLYMASTERID); //ChargeEntity = null; } else { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } }
void btnReSubmit_Click(object sender, RoutedEventArgs e) { DateTime dt = new DateTime(2012, 2, 18); if (ChargeEntity != null && !string.IsNullOrEmpty(ChargeEntity.CHARGEAPPLYMASTERID)) { if (ChargeEntity.CHECKSTATES == (int)CheckStates.UnApproved) { //add zl 2012.2.9 if (ChargeEntity.T_FB_EXTENSIONALORDER != null) { Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("TIPS"), "出差报销单不能进行提交!"); return; } //add end if (ChargeEntity.UPDATEDATE <= dt) //add zl { Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("TIPS"), "2012.2.17号及之前日期的单据不能进行重新提交,请另新建单据!"); return; } ChargeApplyForm AddWin = new ChargeApplyForm(FormTypes.Resubmit, ChargeEntity.CHARGEAPPLYMASTERID); EntityBrowser browser = new EntityBrowser(AddWin); browser.FormType = FormTypes.Resubmit; browser.MinWidth = 800; browser.MinHeight = 500; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }, true, ChargeEntity.CHARGEAPPLYMASTERID); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("此费用报销单不能重新提交审核")); } } else { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "SUBMITAUDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } }
private void btnEdit_Click(object sender, RoutedEventArgs e) { if (ChargeEntity != null) { if (SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(ChargeEntity, "T_FB_CHARGEAPPLYMASTER", OperationType.Edit, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID)) { if (ChargeEntity.CHECKSTATES == (int)CheckStates.UnSubmit) { //add zl 2012.2.9 if(ChargeEntity.T_FB_EXTENSIONALORDER != null) { Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("TIPS"), "出差报销单不能进行修改!"); return; } //add end ChargeApplyForm AddWin = new ChargeApplyForm(FormTypes.Edit, ChargeEntity.CHARGEAPPLYMASTERID); EntityBrowser browser = new EntityBrowser(AddWin); browser.FormType = FormTypes.Edit; browser.MinWidth = 800; browser.MinHeight = 500; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }, true, ChargeEntity.CHARGEAPPLYMASTERID); AddWin.Deleted += (ss, ee) => { browser.Close(); GetData(); }; //ChargeEntity = null; } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ONLYEDITUNSUBMITDATA"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);//只能修改未提交的数据 } } else { //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("YOUDONOTHAVEPERMISSIONTOOPERATETHEDATA")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("YOUDONOTHAVEPERMISSIONTOOPERATETHEDATA"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } } else { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } }
void btnAudit_Click(object sender, RoutedEventArgs e) { if (ChargeEntity != null) { if (!string.IsNullOrEmpty(ChargeEntity.CHARGEAPPLYMASTERID)) { //add zl 2012.2.9 if (ChargeEntity.T_FB_EXTENSIONALORDER != null) { Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("TIPS"), "出差报销单不能进行审核!"); return; } //add end ChargeApplyForm AddWin = new ChargeApplyForm(FormTypes.Audit, ChargeEntity.CHARGEAPPLYMASTERID); EntityBrowser browser = new EntityBrowser(AddWin); browser.FormType = FormTypes.Audit; browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }, true, ChargeEntity.CHARGEAPPLYMASTERID); } } else { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); } }
private void btnNew_Click(object sender, RoutedEventArgs e) { ChargeApplyForm AddWin = new ChargeApplyForm(FormTypes.New, ""); AddWin.Deleted += (ss, ee) => { GetData(); }; EntityBrowser browser = new EntityBrowser(AddWin); browser.MinWidth = 800; browser.MinHeight = 500; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }, true); AddWin.Deleted += (ss, ee) => { browser.Close(); GetData(); }; }