public void LoadData(FormTypes type, string resumeID, T_HR_RESUME hrResume) { formType = type; Resume = hrResume; if (formType == FormTypes.Browse) { this.IsEnabled = false; } if (formType == FormTypes.New) { //判断是否已添加 if (ExperienceList.Count > 0) { DataGridBinder(); } else { ExperienceAdd(); } } else { if (ExperienceList != null && ExperienceList.Count > 0) { DataGridBinder(); } else { client.GetExperienceAllAsync(resumeID); } } }
void btnEdit_Click(object sender, RoutedEventArgs e) { if (DtGrid.SelectedItems.Count > 0) { T_HR_RESUME temp = DtGrid.SelectedItems[0] as T_HR_RESUME; if (!SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(temp, "T_HR_RESUME", 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; } ResumeForm form = new ResumeForm(FormTypes.Edit, temp.RESUMEID); EntityBrowser browser = new EntityBrowser(form); browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); form.MinWidth = 750; 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); } }
public void LoadData(SMT.SaaS.FrameworkUI.FormTypes type, string resumeID) { formType = type; if (formType == FormTypes.Browse) { this.IsEnabled = false; } if (formType == SMT.SaaS.FrameworkUI.FormTypes.New) { if (Resume == null) { Resume = new T_HR_RESUME(); Resume.RESUMEID = Guid.NewGuid().ToString(); Resume.CREATEDATE = DateTime.Now; Resume.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; } } else { if (Resume == null) { client.GetResumeByidAsync(resumeID); } } }
public void LoadData(FormTypes type, string resumeID,T_HR_RESUME hrResume) { formType = type; Resume = hrResume; if(formType ==FormTypes.Browse) { this.IsEnabled =false; } if (formType == FormTypes.New) { //判断是否已添加 if (ExperienceList.Count>0) { DataGridBinder(); } else { ExperienceAdd(); } } else { if (ExperienceList!=null&&ExperienceList.Count > 0) { DataGridBinder(); } else { client.GetExperienceAllAsync(resumeID); } } }
public void LoadData(FormTypes type, string resumeID, T_HR_RESUME hrResume) { formType = type; Resume = hrResume; if (formType == FormTypes.Browse) { this.IsEnabled = false; this.btnAdd.Visibility = Visibility.Collapsed; } if (formType == FormTypes.New) { //判断是否已添加 if (EducateHistory.Count > 0) { DataGridBinder(); } else { //新添加行 EducateHistoryAdd(); } } else { //判断是否已添加 if (EducateHistory != null && EducateHistory.Count > 0) { DataGridBinder(); } else { client.GetEducateHistoryAllAsync(resumeID); } } }
/// <summary> /// 根据身份证获取简历 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_GetResumeByNumberCompleted(object sender, GetResumeByNumberCompletedEventArgs e) { if (e.Result != null) { resume = e.Result; //LoadExp(); //LoadEdu(); experience.LoadData(FormTypes.Edit, resume.RESUMEID, resume); educateHistory.LoadData(FormTypes.Edit, resume.RESUMEID, resume); } }
void client_GetResumeByidCompleted(object sender, GetResumeByidCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { Resume = e.Result; //未绑定的控件赋值 OtherControlBinder(); } }
void BtnView_Click(object sender, RoutedEventArgs e) { if (DtGrid.SelectedItems.Count > 0) { T_HR_RESUME temp = DtGrid.SelectedItems[0] as T_HR_RESUME; ResumeForm form = new ResumeForm(FormTypes.Browse, temp.RESUMEID); EntityBrowser browser = new EntityBrowser(form); browser.FormType = FormTypes.Browse; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); form.MinWidth = 750; 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); } }
public void LoadData(FormTypes type, string resumeID,T_HR_RESUME hrResume) { formType = type; Resume = hrResume; if(formType == FormTypes.Browse) { this.IsEnabled = false; this.btnAdd.Visibility = Visibility.Collapsed; } if (formType == FormTypes.New) { //判断是否已添加 if (EducateHistory.Count > 0) { DataGridBinder(); } else { //新添加行 EducateHistoryAdd(); } } else { //判断是否已添加 if (EducateHistory!=null&&EducateHistory.Count > 0) { DataGridBinder(); } else { client.GetEducateHistoryAllAsync(resumeID); } } }
public void ResumeUpdate(T_HR_RESUME entity, List<T_HR_EXPERIENCE> experience, List<T_HR_EDUCATEHISTORY> eduHistory, List<T_HR_EXPERIENCE> delexps, List<T_HR_EDUCATEHISTORY> deledus, ref string strMsg) { using (ResumeBLL bll = new ResumeBLL()) { bll.ResumeUpdate(entity, ref strMsg); ExperienceBLL expbll = new ExperienceBLL(); expbll.ExperienceDelete(delexps); expbll.ExperienceUpdate(experience); EducateHistoryBLL edubll = new EducateHistoryBLL(); edubll.EducateHistoryDelete(deledus); edubll.EducateHistoryUpdate(eduHistory); } }
public void ResumeAdd(T_HR_RESUME entity, T_HR_EXPERIENCE[] experience, T_HR_EDUCATEHISTORY[] eduHistory, ref string strMsg) { using (ResumeBLL bll = new ResumeBLL()) { bll.ResumeAdd(entity, ref strMsg); ExperienceBLL expbll = new ExperienceBLL(); foreach (var exp in experience) { expbll.ExperienceAdd(exp); } EducateHistoryBLL edubll = new EducateHistoryBLL(); foreach (var edu in eduHistory) { edubll.EducateHistoryAdd(edu); } } }
public void saveResume() { // ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED"), //Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); string strMsg = string.Empty; if (resume == null) { resume = new T_HR_RESUME(); resume.NAME = Employee.EMPLOYEECNAME; resume.RESUMEID = Guid.NewGuid().ToString(); resume.IDCARDNUMBER = Employee.IDNUMBER; foreach (var ent in experience.ExperienceList) { ent.T_HR_RESUME = new T_HR_RESUME(); ent.T_HR_RESUME.RESUMEID = resume.RESUMEID; } foreach (var tmp in educateHistory.EducateHistory) { tmp.T_HR_RESUME = new T_HR_RESUME(); tmp.T_HR_RESUME.RESUMEID = resume.RESUMEID; } client.ResumeAddCompleted += (o, m) => { if (m.Error == null) { if (string.IsNullOrEmpty(strMsg)) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(strMsg), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } }; client.ResumeAddAsync(resume, experience.ExperienceList, educateHistory.EducateHistory, strMsg); } else { client.ResumeUpdateCompleted += (o, m) => { if (m.Error == null) { if (string.IsNullOrEmpty(strMsg)) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(strMsg), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } }; foreach (var ent in experience.ExperienceList) { ent.T_HR_RESUME = new T_HR_RESUME(); ent.T_HR_RESUME.RESUMEID = resume.RESUMEID; } foreach (var tmp in educateHistory.EducateHistory) { tmp.T_HR_RESUME = new T_HR_RESUME(); tmp.T_HR_RESUME.RESUMEID = resume.RESUMEID; } client.ResumeUpdateAsync(resume, experience.ExperienceList, educateHistory.EducateHistory, experience.DelableExp, educateHistory.DelableEdu, strMsg); } }
/// <summary> /// 简历 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Client_GetResumeByNumberCompleted(object sender, GetResumeByNumberCompletedEventArgs e) { if (e.Error != null && e.Error.Message != string.Empty) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { if (e.Result != null) { Resume = e.Result; if (e.UserState.ToString() == "Edu") { client.GetEducateHistoryAllAsync(Resume.RESUMEID); } else { client.GetExperienceAllAsync(Resume.RESUMEID); } } else { Resume = new T_HR_RESUME(); Resume.RESUMEID = System.Guid.NewGuid().ToString(); Resume.IDCARDNUMBER = Employee.IDNUMBER; Resume.NAME = Employee.EMPLOYEECNAME; ObservableCollection<T_HR_EDUCATEHISTORY> colEdu = new ObservableCollection<T_HR_EDUCATEHISTORY>(); ObservableCollection<T_HR_EXPERIENCE> colExp = new ObservableCollection<T_HR_EXPERIENCE>(); client.ResumeAddAsync(Resume, colExp, colEdu, "RESUME"); } } }