void btnAudit_Click(object sender, RoutedEventArgs e) { if (DtGrid.SelectedItems == null) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } if (DtGrid.SelectedItems.Count == 0) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } T_SYS_ROLE ent = DtGrid.SelectedItems[0] as T_SYS_ROLE; if (ent.CHECKSTATE == ((int)CheckStates.Approving).ToString() || ent.CHECKSTATE == ((int)CheckStates.WaittingApproval).ToString() || ent.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString()) { UserRoleApplyForm frm = new UserRoleApplyForm(FormTypes.Audit, ent.ROLEID); //frm.ApprovalInfo = roleInfo; 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 btnNew_Click(object sender, RoutedEventArgs e) { //ApprovalForm_add frm = new ApprovalForm_add(FormTypes.New); UserRoleApplyForm frm = new UserRoleApplyForm(FormTypes.New, ""); EntityBrowser browser = new EntityBrowser(frm); browser.MinWidth = 860; browser.MinHeight = 500; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true); }
private void btnEdit_Click(object sender, RoutedEventArgs e) { ObservableCollection <T_SYS_ROLE> roleInfoList = GetSelectedList(Permissions.Edit); if (DtGrid.SelectedItems == null) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } if (DtGrid.SelectedItems.Count == 0) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } roleInfo = roleInfoList[0]; //if (SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(roleInfo, "T_SYS_ROLEAPP", OperationType.Edit, Common.CurrentLoginUserInfo.EmployeeID)) //{ if (roleInfo.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString()) { //ApprovalForm_upd frm = new ApprovalForm_upd(FormTypes.Edit, roleInfo.APPROVALID); UserRoleApplyForm frm = new UserRoleApplyForm(FormTypes.Edit, roleInfo.ROLEID); //frm.ApprovalInfo = roleInfo; 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); //} }
void btnReSubmit_Click(object sender, RoutedEventArgs e) { ObservableCollection <T_SYS_ROLE> selectItems = GetSelectedList(Permissions.Edit); if (selectItems != null) { roleInfo = selectItems.FirstOrDefault(); UserRoleApplyForm form = new UserRoleApplyForm(FormTypes.Resubmit, roleInfo.ROLEID); //form.ApprovalInfo = roleInfo; 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_SYS_ROLE> roleInfoList = GetSelectedList(Permissions.Browse); if (roleInfoList == null) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } roleInfo = roleInfoList.FirstOrDefault(); UserRoleApplyForm frm = new UserRoleApplyForm(FormTypes.Browse, roleInfo.ROLEID); 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); }