void client_DepartmentCancelCompleted(object sender, DepartmentCancelCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { if (!string.IsNullOrEmpty(e.strMsg)) { SelectDepartment.EDITSTATE = Convert.ToInt32(EditStates.Actived).ToString(); SelectDepartment.CHECKSTATE = Convert.ToInt32(CheckStates.Approved).ToString(); //ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.strMsg), // Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr(e.strMsg), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); return; } DepartmentForm form = new DepartmentForm(FormTypes.Resubmit, SelectDepartment.DEPARTMENTID); EntityBrowser browser = new EntityBrowser(form); browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.FormType = FormTypes.Resubmit; browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } }
void btnReSubmit_Click(object sender, RoutedEventArgs e) { if (SelectDepartment != null) { DepartmentForm form = new DepartmentForm(FormTypes.Resubmit, SelectDepartment.DEPARTMENTID); EntityBrowser browser = new EntityBrowser(form); browser.FormType = FormTypes.Resubmit; form.MinHeight = 300; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { //ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "ReSubmit"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }
void btnNew_Click(object sender, RoutedEventArgs e) { DepartmentForm form = new DepartmentForm(FormTypes.New, ""); EntityBrowser browser = new EntityBrowser(form); form.MinHeight = 300; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
void btnEdit_Click(object sender, RoutedEventArgs e) { if (SelectDepartment != null) { if (SelectDepartment.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString()) { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("Msg_NoDeleteOrder")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("NOTONLYCANMODIFYTHEDATASUBMITTED"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); return; } DepartmentForm form = new DepartmentForm(FormTypes.Edit, SelectDepartment.DEPARTMENTID); //if (!SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(SelectDepartment, "T_HR_DEPARTMENT", SMT.SaaS.FrameworkUI.OperationType.Edit, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID)) //{ // ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("NOEDITPERMISSION"), // Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); // return; //} EntityBrowser browser = new EntityBrowser(form); browser.FormType = FormTypes.Edit; form.MinHeight = 300; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { //ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON")); // ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), //Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }
private void treeOrganization_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e) { Container.Children.Clear(); TreeViewItem selectedItem = treeOrganization.SelectedItem as TreeViewItem; if (selectedItem == null) { loadbar.Stop(); return; } IsTag = selectedItem.Tag.ToString(); switch (IsTag) { case "Company": T_HR_COMPANY company = selectedItem.DataContext as T_HR_COMPANY; CompanyForm orgForm = new CompanyForm(FormTypes.Browse, company.COMPANYID); Container.Children.Add(orgForm); break; case "Department": T_HR_DEPARTMENT department = selectedItem.DataContext as T_HR_DEPARTMENT; DepartmentForm depForm = new DepartmentForm(FormTypes.Browse, department.DEPARTMENTID); Container.Children.Add(depForm); break; case "Post": T_HR_POST post = selectedItem.DataContext as T_HR_POST; PostForm posForm = new PostForm(FormTypes.Browse, post.POSTID); Container.Children.Add(posForm); break; } loadbar.Stop(); }