void client_PostCancelCompleted(object sender, PostCancelCompletedEventArgs 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)) { SelectPost.EDITSTATE = Convert.ToInt32(EditStates.Actived).ToString(); SelectPost.CHECKSTATE = Convert.ToInt32(CheckStates.Approved).ToString(); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr(e.strMsg), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); return; } PostForm form = new PostForm(FormTypes.Resubmit, SelectPost.POSTID); 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 (SelectPost != null) { PostForm form = new PostForm(FormTypes.Resubmit, SelectPost.POSTID); 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) => { }); } else { //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "AUDIT")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "ReSubmit"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }
void btnEdit_Click(object sender, RoutedEventArgs e) { if (SelectPost != null) { if (SelectPost.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; } PostForm form = new PostForm(FormTypes.Edit, SelectPost.POSTID); //if (!SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(SelectPost, "T_HR_POST", 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 = 330.0; 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); } }
void BtnView_Click(object sender, RoutedEventArgs e) { if (SelectPost != null) { PostForm form = new PostForm(FormTypes.Browse, SelectPost.POSTID); EntityBrowser browser = new EntityBrowser(form); browser.FormType = FormTypes.Browse; form.MinHeight = 260; 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", "VIEW"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }
void btnNew_Click(object sender, RoutedEventArgs e) { PostForm form = new PostForm(FormTypes.New, ""); EntityBrowser browser = new EntityBrowser(form); //form.MinHeight = 330.0; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
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(); }