void btnCreate_Click(object sender, RoutedEventArgs e) { if (DtGrid.SelectedItems.Count > 0) { // T_HR_LEFTOFFICE temp = DtGrid.SelectedItems[0] as T_HR_LEFTOFFICE; V_LEFTOFFICEVIEW tempview = DtGrid.SelectedItems[0] as V_LEFTOFFICEVIEW; T_HR_LEFTOFFICE temp = new T_HR_LEFTOFFICE(); temp.DIMISSIONID = tempview.DIMISSIONID; temp.CREATEUSERID = tempview.CREATEUSERID; temp.CHECKSTATE = tempview.CHECKSTATE; temp.OWNERCOMPANYID = tempview.OWNERCOMPANYID; temp.OWNERDEPARTMENTID = tempview.OWNERDEPARTMENTID; temp.OWNERPOSTID = tempview.OWNERPOSTID; temp.OWNERID = tempview.EMPLOYEEID; temp.T_HR_EMPLOYEE = new T_HR_EMPLOYEE(); temp.T_HR_EMPLOYEE.EMPLOYEEID = tempview.EMPLOYEEID; temp.T_HR_EMPLOYEE.EMPLOYEECNAME = tempview.EMPLOYEECNAME; temp.APPLYDATE = tempview.APPLYDATE; temp.LEFTOFFICEDATE = tempview.LEFTOFFICEDATE; temp.LEFTOFFICECATEGORY = tempview.LEFTOFFICECATEGORY; temp.LEFTOFFICEREASON = tempview.LEFTOFFICEREASON; temp.REMARK = tempview.REMARK; temp.T_HR_EMPLOYEEPOST = new T_HR_EMPLOYEEPOST(); temp.T_HR_EMPLOYEEPOST.EMPLOYEEPOSTID = tempview.EMPLOYEEPOSTID; if (temp.CHECKSTATE == Convert.ToInt32(CheckStates.Approved).ToString()) { LeftOfficeConfirmForm form = new LeftOfficeConfirmForm(FormTypes.New, temp); EntityBrowser browser = new EntityBrowser(form); browser.FormType = FormTypes.New; // form.MinHeight = 350; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("离职单未审核通过"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } } 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); } }
void btnEdit_Click(object sender, RoutedEventArgs e) { if (DtGrid.SelectedItems.Count > 0) { T_HR_LEFTOFFICECONFIRM temp = DtGrid.SelectedItems[0] as T_HR_LEFTOFFICECONFIRM; if (temp.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString()) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("NOTONLYCANMODIFYTHEDATASUBMITTED"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); return; } //if (!SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(temp, "T_HR_LEFTOFFICECONFIRM", 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; //} LeftOfficeConfirmForm form = new LeftOfficeConfirmForm(FormTypes.Edit, temp.CONFIRMID); EntityBrowser browser = new EntityBrowser(form); browser.FormType = FormTypes.Edit; // form.MinHeight = 450; 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", "EDIT"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }
/// <summary> /// 重新提交 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnReSubmit_Click(object sender, RoutedEventArgs e) { if (DtGrid.SelectedItems.Count > 0) { T_HR_LEFTOFFICECONFIRM temp = DtGrid.SelectedItems[0] as T_HR_LEFTOFFICECONFIRM; LeftOfficeConfirmForm form = new LeftOfficeConfirmForm(FormTypes.Resubmit, temp.CONFIRMID); EntityBrowser browser = new EntityBrowser(form); browser.FormType = FormTypes.Resubmit; 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) { LeftOfficeConfirmForm form = new LeftOfficeConfirmForm(FormTypes.New, ""); EntityBrowser browser = new EntityBrowser(form); // form.MinHeight = 450; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }