void btnAudit_Click(object sender, RoutedEventArgs e) { try { ///TODO:ADD 审核 if (DtGrid.SelectedItems.Count > 0) { T_HR_EMPLOYEEADDSUM tmpEnt = DtGrid.SelectedItems[0] as T_HR_EMPLOYEEADDSUM; Form.Salary.EmployeeAddSumForm form = new Form.Salary.EmployeeAddSumForm(FormTypes.Audit, tmpEnt.ADDSUMID); EntityBrowser browser = new EntityBrowser(form); form.MinWidth = 600; form.MinHeight = 240; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.FormType = FormTypes.Audit; browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { int sType = 0; string sValue = ""; string state = ""; //TreeViewItem selectedItem = treeOrganization.SelectedItem as TreeViewItem; //if (selectedItem != null) //{ // string IsTag = selectedItem.Tag.ToString(); // switch (IsTag) // { // case "0": // OrganizationWS.T_HR_COMPANY company = selectedItem.DataContext as OrganizationWS.T_HR_COMPANY; // sType = 0; // sValue = company.COMPANYID; // break; // case "1": // OrganizationWS.T_HR_DEPARTMENT department = selectedItem.DataContext as OrganizationWS.T_HR_DEPARTMENT; // sType = 1; // sValue = department.DEPARTMENTID; // break; // case "2": // OrganizationWS.T_HR_POST post = selectedItem.DataContext as OrganizationWS.T_HR_POST; // sType = 2; // sValue = post.POSTID; // break; // } //} //else //{ // return; //} string selectedtype = treeOrganization.sType; if (!string.IsNullOrEmpty(selectedtype)) { switch (selectedtype) { case "Company": sType = 0; break; case "Department": sType = 1; break; case "Post": sType = 2; break; } sValue = treeOrganization.sValue; } else { return; } if (Checkstate != CheckStates.All.ToInt32().ToString()) { state = Checkstate; } else { state = CheckStates.UnSubmit.ToInt32().ToString(); } NumericUpDown nuYear = Utility.FindChildControl <NumericUpDown>(expander, "Nuyear"); NumericUpDown nuStartmounth = Utility.FindChildControl <NumericUpDown>(expander, "NuStartmounth"); Form.Salary.EmployeeAddSumMassAudit form = new Form.Salary.EmployeeAddSumMassAudit(FormTypes.Audit, sType, sValue, nuYear.Value.ToString(), nuStartmounth.Value.ToString(), state); EntityBrowser browser = new EntityBrowser(form); browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.FormType = FormTypes.Audit; browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } } catch (Exception ex) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message.ToString())); } }
void btnAudit_Click(object sender, RoutedEventArgs e) { try { ///TODO:ADD 审核 if (DtGrid.SelectedItems.Count > 0) { T_HR_EMPLOYEEADDSUM tmpEnt = DtGrid.SelectedItems[0] as T_HR_EMPLOYEEADDSUM; Form.Salary.EmployeeAddSumForm form = new Form.Salary.EmployeeAddSumForm(FormTypes.Audit, tmpEnt.ADDSUMID); EntityBrowser browser = new EntityBrowser(form); form.MinWidth = 600; form.MinHeight = 240; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.FormType = FormTypes.Audit; browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { int sType = 0; string sValue = ""; string state = ""; //TreeViewItem selectedItem = treeOrganization.SelectedItem as TreeViewItem; //if (selectedItem != null) //{ // string IsTag = selectedItem.Tag.ToString(); // switch (IsTag) // { // case "0": // OrganizationWS.T_HR_COMPANY company = selectedItem.DataContext as OrganizationWS.T_HR_COMPANY; // sType = 0; // sValue = company.COMPANYID; // break; // case "1": // OrganizationWS.T_HR_DEPARTMENT department = selectedItem.DataContext as OrganizationWS.T_HR_DEPARTMENT; // sType = 1; // sValue = department.DEPARTMENTID; // break; // case "2": // OrganizationWS.T_HR_POST post = selectedItem.DataContext as OrganizationWS.T_HR_POST; // sType = 2; // sValue = post.POSTID; // break; // } //} //else //{ // return; //} string selectedtype = treeOrganization.sType; if (!string.IsNullOrEmpty(selectedtype)) { switch (selectedtype) { case "Company": sType = 0; break; case "Department": sType = 1; break; case "Post": sType = 2; break; } sValue = treeOrganization.sValue; } else { return; } if (Checkstate != CheckStates.All.ToInt32().ToString()) { state = Checkstate; } else { state = CheckStates.UnSubmit.ToInt32().ToString(); } NumericUpDown nuYear = Utility.FindChildControl<NumericUpDown>(expander, "Nuyear"); NumericUpDown nuStartmounth = Utility.FindChildControl<NumericUpDown>(expander, "NuStartmounth"); Form.Salary.EmployeeAddSumMassAudit form = new Form.Salary.EmployeeAddSumMassAudit(FormTypes.Audit, sType, sValue, nuYear.Value.ToString(), nuStartmounth.Value.ToString(), state); EntityBrowser browser = new EntityBrowser(form); browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.FormType = FormTypes.Audit; browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } } catch (Exception ex) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message.ToString())); } }
public void MassAudit_Click(object o, RoutedEventArgs e) { try { ///TODO:ADD 审核 if (DtGrid.SelectedItems.Count > 0) { T_HR_EMPLOYEEADDSUM tmpEnt = DtGrid.SelectedItems[0] as T_HR_EMPLOYEEADDSUM; Form.Salary.EmployeeAddSumForm form = new Form.Salary.EmployeeAddSumForm(FormTypes.Audit, tmpEnt.ADDSUMID); EntityBrowser browser = new EntityBrowser(form); form.MinWidth = 570; form.MinHeight = 240; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.FormType = FormTypes.Audit; browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { int sType = 0; string sValue = ""; string state = ""; string strCollection = string.Empty; string selectedType = treeOrganization.sType; if (!string.IsNullOrEmpty(selectedType)) { switch (selectedType) { case "Company": sType = 0; break; case "Department": sType = 1; break; case "Post": sType = 2; break; } sValue = treeOrganization.sValue; } else { loadbar.Stop(); return; } // state = CheckStates.UnSubmit.ToInt32().ToString(); //注释掉是因为在审核中取不到数据 liujx state = Checkstate;//批量审核也可以根据状态进行加载 NumericUpDown nuYear = Utility.FindChildControl <NumericUpDown>(expander, "Nuyear"); NumericUpDown nuStartmounth = Utility.FindChildControl <NumericUpDown>(expander, "NuStartmounth"); Form.Salary.EmployeeAddSumMassAudit form = new Form.Salary.EmployeeAddSumMassAudit(FormTypes.Audit, sType, sValue, nuYear.Value.ToString(), nuStartmounth.Value.ToString(), state); //Form.Salary.EmployeeAddSumMassAudit form = new Form.Salary.EmployeeAddSumMassAudit(FormTypes.Audit, "919a594b-77fc-49e1-a024-a6f9b2009d5b"); //Form.Salary.EmployeeAddSumMassAudit form = new Form.Salary.EmployeeAddSumMassAudit(); //strCollection = sType.ToString() + "," + sValue + "," + nuYear.Value.ToString() + "," + nuStartmounth.Value.ToString() + "," + state; //Form.Salary.EmployeeAddSumMassAudit form = new Form.Salary.EmployeeAddSumMassAudit(FormTypes.Audit, strCollection); EntityBrowser browser = new EntityBrowser(form); browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.FormType = FormTypes.Audit; browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } } catch (Exception ex) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message.ToString())); } }
public void MassAudit_Click(object o, RoutedEventArgs e) { try { ///TODO:ADD 审核 if (DtGrid.SelectedItems.Count > 0) { T_HR_EMPLOYEEADDSUM tmpEnt = DtGrid.SelectedItems[0] as T_HR_EMPLOYEEADDSUM; Form.Salary.EmployeeAddSumForm form = new Form.Salary.EmployeeAddSumForm(FormTypes.Audit, tmpEnt.ADDSUMID); EntityBrowser browser = new EntityBrowser(form); form.MinWidth = 570; form.MinHeight = 240; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.FormType = FormTypes.Audit; browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { int sType = 0; string sValue = ""; string state = ""; string strCollection = string.Empty; string selectedType = treeOrganization.sType; if (!string.IsNullOrEmpty(selectedType)) { switch (selectedType) { case "Company": sType = 0; break; case "Department": sType = 1; break; case "Post": sType = 2; break; } sValue = treeOrganization.sValue; } else { loadbar.Stop(); return; } // state = CheckStates.UnSubmit.ToInt32().ToString(); //注释掉是因为在审核中取不到数据 liujx state = Checkstate;//批量审核也可以根据状态进行加载 NumericUpDown nuYear = Utility.FindChildControl<NumericUpDown>(expander, "Nuyear"); NumericUpDown nuStartmounth = Utility.FindChildControl<NumericUpDown>(expander, "NuStartmounth"); Form.Salary.EmployeeAddSumMassAudit form = new Form.Salary.EmployeeAddSumMassAudit(FormTypes.Audit, sType, sValue, nuYear.Value.ToString(), nuStartmounth.Value.ToString(), state); //Form.Salary.EmployeeAddSumMassAudit form = new Form.Salary.EmployeeAddSumMassAudit(FormTypes.Audit, "919a594b-77fc-49e1-a024-a6f9b2009d5b"); //Form.Salary.EmployeeAddSumMassAudit form = new Form.Salary.EmployeeAddSumMassAudit(); //strCollection = sType.ToString() + "," + sValue + "," + nuYear.Value.ToString() + "," + nuStartmounth.Value.ToString() + "," + state; //Form.Salary.EmployeeAddSumMassAudit form = new Form.Salary.EmployeeAddSumMassAudit(FormTypes.Audit, strCollection); EntityBrowser browser = new EntityBrowser(form); browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.FormType = FormTypes.Audit; browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } } catch (Exception ex) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message.ToString())); } }