public void SalaryLevelADD(T_HR_SALARYLEVEL obj) { PostLevelDistinctionBLL plBll = new PostLevelDistinctionBLL(); List <T_HR_POSTLEVELDISTINCTION> postlevels = plBll.GetAllPostLevelDistinction(); T_HR_POSTLEVELDISTINCTION tmpEnts = (from s in postlevels where s.POSTLEVEL == obj.T_HR_POSTLEVELDISTINCTION.POSTLEVEL select s).First(); var ent = from a in dal.GetTable() where a.SALARYLEVEL == obj.SALARYLEVEL && a.T_HR_POSTLEVELDISTINCTION.POSTLEVELID == tmpEnts.POSTLEVELID select a; //obj.T_HR_POSTLEVELDISTINCTION = new T_HR_POSTLEVELDISTINCTION(); //obj.T_HR_POSTLEVELDISTINCTION = tmpEnts; if (ent.Count() <= 0) { if (tmpEnts != null) { obj.T_HR_POSTLEVELDISTINCTIONReference.EntityKey = new System.Data.EntityKey(qualifiedEntitySetName + "T_HR_POSTLEVELDISTINCTION", "POSTLEVELID", tmpEnts.POSTLEVELID); } dal.Add(obj); } }
void client_GetAllPostLevelDistinctionCompleted(object sender, SMT.Saas.Tools.SalaryWS.GetAllPostLevelDistinctionCompletedEventArgs e) { if (e.Error != null) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } else { postLevels = e.Result; foreach (var dict in postLevelDicts) { if (!IsLevelAdded(dict)) { T_HR_POSTLEVELDISTINCTION level = new T_HR_POSTLEVELDISTINCTION(); level.POSTLEVEL = Convert.ToDecimal(dict.DICTIONARYVALUE); level.POSTLEVELID = Guid.NewGuid().ToString(); postLevels.Add(level); } } DtGrid.ItemsSource = postLevels; } //client.GetAllSalaryLevelAsync(); loadbar.Stop(); }
void PostSalaryForm_Loaded(object sender, RoutedEventArgs e) { InitParas(); if (!string.IsNullOrEmpty(postSalaryID)) { client.GetPostLevelDistinctionByIDAsync(postSalaryID); } else { distinction = new T_HR_POSTLEVELDISTINCTION(); distinction.POSTLEVELID = Guid.NewGuid().ToString(); this.DataContext = distinction; } }
void PostSalaryForm_Loaded(object sender, RoutedEventArgs e) { InitParas(); if (!string.IsNullOrEmpty(postSalaryID)) { client.GetPostLevelDistinctionByIDAsync(postSalaryID); } else { distinction = new T_HR_POSTLEVELDISTINCTION(); distinction.POSTLEVELID = Guid.NewGuid().ToString(); this.DataContext = distinction; } }
/// <summary> /// 获取所有的岗位薪资 和级差额 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_GetPostLevelDistinctionBySystemIDCompleted(object sender, GetPostLevelDistinctionBySystemIDCompletedEventArgs e) { if (e.Error != null) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { postLevels = e.Result; if (postLevels != null) { foreach (var dict in postLevelDicts) { if (!IsLevelAdded(dict)) { T_HR_POSTLEVELDISTINCTION level = new T_HR_POSTLEVELDISTINCTION(); level.POSTLEVEL = Convert.ToDecimal(dict.DICTIONARYVALUE); level.POSTLEVELID = Guid.NewGuid().ToString(); level.T_HR_SALARYSYSTEM = new T_HR_SALARYSYSTEM(); level.T_HR_SALARYSYSTEM.SALARYSYSTEMID = salarySystem.SALARYSYSTEMID; postLevels.Add(level); } } } else { postLevels = new ObservableCollection <T_HR_POSTLEVELDISTINCTION>(); foreach (var dict in postLevelDicts) { T_HR_POSTLEVELDISTINCTION level = new T_HR_POSTLEVELDISTINCTION(); level.POSTLEVEL = Convert.ToDecimal(dict.DICTIONARYVALUE); level.POSTLEVELID = Guid.NewGuid().ToString(); level.T_HR_SALARYSYSTEM = new T_HR_SALARYSYSTEM(); level.T_HR_SALARYSYSTEM.SALARYSYSTEMID = salarySystem.SALARYSYSTEMID; postLevels.Add(level); } } DtGridPostDis.ItemsSource = postLevels.OrderBy(c => c.POSTLEVEL); } //client.GetAllSalaryLevelAsync(); }
void btnEdit_Click(object sender, RoutedEventArgs e) { // client.PostLevelDistinctionUpdateAsync(postLevels); if (DtGrid.SelectedItems.Count > 0) { T_HR_POSTLEVELDISTINCTION tmpEnt = DtGrid.SelectedItems[0] as T_HR_POSTLEVELDISTINCTION; Form.Salary.PostSalaryForm form = new SMT.HRM.UI.Form.Salary.PostSalaryForm(FormTypes.Edit, tmpEnt.POSTLEVELID); EntityBrowser browser = new EntityBrowser(form); form.MinWidth = 570; form.MinHeight = 220; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT")); return; } }
/// <summary> /// 获取所有的岗位薪资 和级差额 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_GetPostLevelDistinctionBySystemIDCompleted(object sender, GetPostLevelDistinctionBySystemIDCompletedEventArgs e) { if (e.Error != null) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { postLevels = e.Result; if (postLevels != null) { foreach (var dict in postLevelDicts) { if (!IsLevelAdded(dict)) { T_HR_POSTLEVELDISTINCTION level = new T_HR_POSTLEVELDISTINCTION(); level.POSTLEVEL = Convert.ToDecimal(dict.DICTIONARYVALUE); level.POSTLEVELID = Guid.NewGuid().ToString(); level.T_HR_SALARYSYSTEM = new T_HR_SALARYSYSTEM(); level.T_HR_SALARYSYSTEM.SALARYSYSTEMID = salarySystem.SALARYSYSTEMID; postLevels.Add(level); } } } else { postLevels = new ObservableCollection<T_HR_POSTLEVELDISTINCTION>(); foreach (var dict in postLevelDicts) { T_HR_POSTLEVELDISTINCTION level = new T_HR_POSTLEVELDISTINCTION(); level.POSTLEVEL = Convert.ToDecimal(dict.DICTIONARYVALUE); level.POSTLEVELID = Guid.NewGuid().ToString(); level.T_HR_SALARYSYSTEM = new T_HR_SALARYSYSTEM(); level.T_HR_SALARYSYSTEM.SALARYSYSTEMID = salarySystem.SALARYSYSTEMID; postLevels.Add(level); } } DtGridPostDis.ItemsSource = postLevels.OrderBy(c => c.POSTLEVEL); } //client.GetAllSalaryLevelAsync(); }
public string PostLevelDistinctionADD(T_HR_POSTLEVELDISTINCTION ent) { using (PostLevelDistinctionBLL bll = new PostLevelDistinctionBLL()) { return bll.PostLevelDistinctionADD(ent); } }
void client_GetAllPostLevelDistinctionCompleted(object sender, SMT.Saas.Tools.SalaryWS.GetAllPostLevelDistinctionCompletedEventArgs e) { if (e.Error != null) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } else { postLevels = e.Result; foreach (var dict in postLevelDicts) { if (!IsLevelAdded(dict)) { T_HR_POSTLEVELDISTINCTION level = new T_HR_POSTLEVELDISTINCTION(); level.POSTLEVEL = Convert.ToDecimal(dict.DICTIONARYVALUE); level.POSTLEVELID = Guid.NewGuid().ToString(); postLevels.Add(level); } } DtGrid.ItemsSource = postLevels; } //client.GetAllSalaryLevelAsync(); loadbar.Stop(); }