public AreaForm(FormTypes type, string areaID) { InitializeComponent(); InitParas(); FormType = type; if (string.IsNullOrEmpty(areaID)) { area = new T_HR_AREADIFFERENCE(); area.AREADIFFERENCEID = Guid.NewGuid().ToString(); area.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; area.CREATEDATE = System.DateTime.Now; area.UPDATEDATE = System.DateTime.Now; area.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; this.DataContext = area; } else { client.GetAreaCategoryByIDAsync(areaID); } }
private void lkArea_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("AREACATEGORY", "AREACATEGORY"); // cols.Add("SALARYLEVEL", "SALARYLEVEL"); LookupForm lookup = new LookupForm(EntityNames.AreaCategory, typeof(List <T_HR_AREADIFFERENCE>), cols); //Dictionary<string, string> cols = new Dictionary<string, string>(); //cols.Add("SALARYSYSTEMNAME", "SALARYSYSTEMNAME"); //// cols.Add("SALARYLEVEL", "SALARYLEVEL"); //LookupForm lookup = new LookupForm(EntityNames.SalarySystem, // typeof(List<T_HR_SALARYSYSTEM>), cols); lookup.SelectedClick += (o, ev) => { T_HR_AREADIFFERENCE ent = lookup.SelectedObj as T_HR_AREADIFFERENCE; if (ent != null) { lkArea.DataContext = ent; SalarySolution.T_HR_AREADIFFERENCE = ent; //SalarySolution.T_HR_SALARYLEVEL.SALARYLEVELID = ent.SALARYLEVELID; } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
/// <summary> /// 获取地区 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e) { if (e.Error != null) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); return; } else { if (e.Result != null) { DtGridArea.ItemsSource = e.Result; areaDifference = e.Result.ToList(); dataPagerArea.PageCount = e.pageCount; currentArea = e.Result[0]; LoadCity(); } } }
public AreaSortForm(FormTypes type, string areaID) { InitializeComponent(); InitParas(); this.areaID = areaID; FormType = type; if (string.IsNullOrEmpty(areaID)) { area = new T_HR_AREADIFFERENCE(); area.AREADIFFERENCEID = Guid.NewGuid().ToString(); area.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; area.CREATEDATE = System.DateTime.Now; area.UPDATEDATE = System.DateTime.Now; area.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; this.DataContext = area; } else { client.GetAreaCategoryByIDAsync(areaID); } }
public string AreaCategoryADD(T_HR_AREADIFFERENCE obj) { using (AreaCategoryBLL bll = new AreaCategoryBLL()) { return bll.AreaCategoryADD(obj); } }
public void AreaCategoryUpdate(T_HR_AREADIFFERENCE obj) { using (AreaCategoryBLL bll = new AreaCategoryBLL()) { bll.AreaCategoryUpdate(obj); } }
private void btEdit_Click(object sender, RoutedEventArgs e) { if (DtGrid.SelectedItems.Count > 0) { this.selectedAreaDifference = (DtGrid.SelectedItems[0] as T_HR_AREAALLOWANCE).T_HR_AREADIFFERENCE; Form.Salary.AreaAllowanceForm form = new SMT.HRM.UI.Form.Salary.AreaAllowanceForm(FormTypes.Edit, (DtGrid.SelectedItems[0] as T_HR_AREAALLOWANCE).AREAALLOWANCEID, AreaID, (DtGrid.SelectedItems[0] as T_HR_AREAALLOWANCE).POSTLEVEL); EntityBrowser browser = new EntityBrowser(form); form.MinHeight = 150; form.MinWidth = 410; 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; } }
private void DtGridArea_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (DtGridArea.SelectedItems.Count > 0) { currentArea = DtGridArea.SelectedItems[0] as T_HR_AREADIFFERENCE; AreaID = currentArea.AREADIFFERENCEID; client.GetAreaAllowanceByAreaIDAsync(AreaID); } }
private void DtGridArea_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (DtGridArea.SelectedItems.Count > 0) { currentArea = DtGridArea.SelectedItems[0] as T_HR_AREADIFFERENCE; AreaID = currentArea.AREADIFFERENCEID; LoadCity(); } }
/// <summary> /// 获取地区 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e) { if (e.Error != null) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); return; } else { if (e.Result != null) { DtGridArea.ItemsSource = e.Result; areaDifference = e.Result.ToList(); dataPagerArea.PageCount = e.pageCount; currentArea = e.Result[0]; LoadCity(); } } }