private void lkEmployee_FindClick(object sender, EventArgs e) { //TODO: 根据薪资方案分配过滤出可用的标准 Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("EMPLOYEECNAME", "T_HR_EMPLOYEE.EMPLOYEECNAME"); cols.Add("EMPLOYEECODE", "T_HR_EMPLOYEE.EMPLOYEECODE"); cols.Add("SEX", "SEX"); cols.Add("MOBILE", "MOBILE"); cols.Add("OFFICEPHONE", "OFFICEPHONE"); LookupForm lookup = new LookupForm(EntityNames.Employee, typeof(List <T_HR_EMPLOYEE>), cols); lookup.SelectedClick += (o, ev) => { SMT.Saas.Tools.OrganizationWS.V_EMPLOYEEPOST ent = lookup.SelectedObj as SMT.Saas.Tools.OrganizationWS.V_EMPLOYEEPOST;; if (ent != null) { lkEmployee.DataContext = ent; } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
/// <summary> /// 选择班次 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lkShiftName_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("SHIFTNAME", "SHIFTNAME"); cols.Add("WORKTIME", "WORKTIME"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.ShiftDefine, typeof(T_HR_SHIFTDEFINE[]), cols); lookup.SelectedClick += (o, ev) => { T_HR_SHIFTDEFINE ent = lookup.SelectedObj as T_HR_SHIFTDEFINE; LookUp lkShiftName = sender as LookUp; if (ent != null) { lkShiftName.DataContext = ent; if (lkDefaultShiftName.DataContext != null) { T_HR_SHIFTDEFINE entDefault = lkDefaultShiftName.DataContext as T_HR_SHIFTDEFINE; if (ent.SHIFTDEFINEID != entDefault.SHIFTDEFINEID) { lkDefaultShiftName.DataContext = null; } } } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkSalarySolution_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("SALARYSOLUTIONNAME", "SALARYSOLUTIONNAME"); //cols.Add("BANKNAME", "BANKNAME"); cols.Add("BANKACCOUNTNO", "BANKACCOUNTNO"); System.Collections.ObjectModel.ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); string filter = ""; filter = "CHECKSTATE==@" + paras.Count; paras.Add(Convert.ToInt16(CheckStates.Approved).ToString()); //LookupForm lookup = new LookupForm(EntityNames.SalarySolution, // typeof(List<T_HR_SALARYSOLUTION>), cols); LookupForm lookup = new LookupForm(EntityNames.SalarySolution, typeof(List <T_HR_SALARYSOLUTION>), cols, filter, paras); lookup.SelectedClick += (o, ev) => { T_HR_SALARYSOLUTION ent = lookup.SelectedObj as T_HR_SALARYSOLUTION; if (ent != null) { lkSalarySolution.DataContext = ent; archive.SALARYSOLUTIONID = ent.SALARYSOLUTIONID; archive.SALARYSOLUTIONNAME = ent.SALARYSOLUTIONNAME; } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void LookUp_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("EMPLOYEECODE", "T_HR_EMPLOYEE.EMPLOYEECODE"); cols.Add("EMPLOYEECNAME", "T_HR_EMPLOYEE.EMPLOYEECNAME"); cols.Add("EMPLOYEEENAME", "T_HR_EMPLOYEE.EMPLOYEEENAME"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.Employee, typeof(SMT.Saas.Tools.OrganizationWS.V_EMPLOYEEPOST[]), cols); lookup.SelectedClick += (o, ev) => { SMT.Saas.Tools.OrganizationWS.V_EMPLOYEEPOST ent = lookup.SelectedObj as SMT.Saas.Tools.OrganizationWS.V_EMPLOYEEPOST;; if (ent != null) { lkEmployeeName.DataContext = ent.T_HR_EMPLOYEE; performanceRewardRecord.EMPLOYEENAME = ent.T_HR_EMPLOYEE.EMPLOYEECNAME; performanceRewardRecord.EMPLOYEECODE = ent.T_HR_EMPLOYEE.EMPLOYEECODE; performanceRewardRecord.EMPLOYEEID = ent.T_HR_EMPLOYEE.EMPLOYEEID; } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkDictionaryType_FindClick(object sender, EventArgs e) { //Dictionary<string, string> cols = new Dictionary<string, string>(); //cols.Add("DICTIONCATEGORY", "DICTIONCATEGORYNAME"); ////string[] cols = { "DICTIONCATEGORY", "DICTIONCATEGORYNAME" }; //LookupForm lookups = new LookupForm(EntityNames.SysDictionary, // typeof(List<Permission.UI.PermissionService.T_SYS_DICTIONARY>), cols); Dictionary <string, string> para = new Dictionary <string, string>(); para.Add("SysDictionary", "2"); string[] cols = { "DICTIONCATEGORY", "DICTIONCATEGORYNAME" }; LookupForm lookups = new LookupForm(EntityNames.SysDictionary, typeof(List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>), cols, para); lookups.SelectedClick += (o, ev) => { SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY ent = lookups.SelectedObj as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY; if (ent != null) { lkDictionaryType.DataContext = ent; txtDictCatogry.Text = ent.DICTIONCATEGORY.Trim(); this.lkDictionaryType.TxtLookUp.IsReadOnly = true; txtDictCatogry.IsReadOnly = true; } }; lookups.Show(); }
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) => { }); }
public void ShowLookupForm() { FrmLookup_LookupHide(null, null); frmLookup = new LookupForm(); switch (lookupColName) { case QUOTATIONITEMS.PRODUCT_ID: { frmLookup.LookupColNames = new string[] { PRODUCT.PRODUCT_NAME }; frmLookup.SelectedPkValue = editgrid[QUOTATIONITEMS.PRODUCT_ID, lookupRow].Value; frmLookup.AllowNewEntry = true; frmLookup.AllowEmptySelection = true; if (txt_party_id.Text != "") { frmLookup.LookupList = CProduct_exten.GetforLookup(new DAL()); frmLookup.LoadLookupList(); } } break; case QUOTATIONITEMS.SIZES_ID: frmLookup.LookupColNames = new string[] { SIZES.SIZES_NAME }; frmLookup.SelectedPkValue = editgrid[QUOTATIONITEMS.SIZES_ID, lookupRow].Value; frmLookup.AllowNewEntry = true; frmLookup.AllowEmptySelection = true; frmLookup.LookupList = CSizes_exten.GetforLookup(new DAL()); frmLookup.LoadLookupList(); break; default: throw new Exception("'" + lookupColName + "' Not Found"); } frmLookup.LookupSelected += new EventHandler(FrmLookup_LookupSelected); frmLookup.AfterSelection += new EventHandler(FrmLookup_AfterSelection); frmLookup.LookupHide += new EventHandler(FrmLookup_LookupHide); frmLookup.NewEntryNeeded += new LookupForm.NewEntryHandler(FrmLookup_NewEntryNeeded); frmLookup.Owner = this.FindForm(); ////////// frmLookup.Show(); ////////// int vWidth = frmLookup.GetAutoWidth(); int vCellWidth = editgrid.Columns[lookupColName].Width; if (vWidth < vCellWidth) { vWidth = vCellWidth; } frmLookup.AutoFillLastColumn(); int vHeight = frmLookup.GetAutoHeight(); Rectangle screenRect = Global.GetScreenRect(editgrid); frmLookup.Bounds = Global.GetSnapRect(screenRect, vWidth, vHeight); }
private void lkSalaryStandard_FindClick(object sender, EventArgs e) { //TODO: 根据薪资方案分配过滤出可用的标准 Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("SALARYSTANDARDNAME", "SALARYSTANDARDNAME"); cols.Add("POSTSALARY", "POSTSALARY"); cols.Add("SECURITYALLOWANCE", "SECURITYALLOWANCE"); cols.Add("HOUSINGALLOWANCE", "HOUSINGALLOWANCE"); cols.Add("AREADIFALLOWANCE", "AREADIFALLOWANCE"); LookupForm lookup = new LookupForm(EntityNames.SalaryStandard, typeof(List <T_HR_SALARYSTANDARD>), cols); lookup.SelectedClick += (o, ev) => { T_HR_SALARYSTANDARD ent = lookup.SelectedObj as T_HR_SALARYSTANDARD; if (ent != null) { //lkSalaryStandard.DataContext = ent; CopySalaryStandardToArchive(ent); } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkOTReward_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("OVERTIMEREWARDNAME", "OVERTIMEREWARDNAME"); cols.Add("USUALOVERTIMEPAYRATE", "USUALOVERTIMEPAYRATE"); cols.Add("WEEKENDPAYRATE", "WEEKENDPAYRATE"); cols.Add("VACATIONPAYRATE", "VACATIONPAYRATE"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.OvertimeReward, typeof(T_HR_OVERTIMEREWARD[]), cols); lookup.SelectedClick += (o, ev) => { T_HR_OVERTIMEREWARD ent = lookup.SelectedObj as T_HR_OVERTIMEREWARD; if (ent != null) { lkOTReward.DataContext = ent; txtUsualOverTimePayRate.Text = ent.USUALOVERTIMEPAYRATE.Value.ToString(); txtVacationPayRate.Text = ent.VACATIONPAYRATE.Value.ToString(); txtWeekendPayRate.Text = ent.WEEKENDPAYRATE.Value.ToString(); txtRemark.Text = ent.REMARK == null ? string.Empty : ent.REMARK; } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
// ******************************************************************************** /// <summary> /// /// </summary> /// <param name="str"></param> /// <param name="lang1"></param> /// <param name="lang2"></param> /// <returns></returns> /// <created>UPh,16.11.2015</created> /// <changed>UPh,16.11.2015</changed> // ******************************************************************************** public override uint LookupTerminology(string str, int lcid1, int lcid2) { if (!PrepareRequest(lcid1, lcid2)) { return(1); } List <TermInfoResultArgs> result = _Query.RequestSyncTermInfos(str); if (result == null || result.Count == 0) { return(1); } if (_LookupForm == null) { _LookupForm = new LookupForm(); _LookupForm.FormClosed += LookupForm_FormClosed; } _LookupForm.Show(); _LookupForm.SetData(str, _TermBaseSet, result); return(0); }
private void LookUp_FindClick(object sender, EventArgs e) { string filter = ""; ObservableCollection <object> paras = new ObservableCollection <object>(); Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("SALARYITEMNAME", "SALARYITEMNAME"); filter += "CREATECOMPANYID==@" + paras.Count().ToString(); paras.Add(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID); LookupForm lookup = new LookupForm(EntityNames.SalaryItemSet, typeof(List <T_HR_SALARYITEM>), cols, filter, paras); lookup.TitleContent = Utility.GetResourceStr("SALARYITEM"); lookup.SelectedClick += (o, ev) => { T_HR_SALARYITEM ent = lookup.SelectedObj as T_HR_SALARYITEM; if (ent != null) { salarySolutionItem.T_HR_SALARYITEM = new T_HR_SALARYITEM(); salarySolutionItem.T_HR_SALARYITEM.SALARYITEMID = ent.SALARYITEMID; lkSolutionItem.DataContext = ent; } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void barButtonLookup_ItemClick(object sender, ItemClickEventArgs e) { LookupForm xform1 = new LookupForm(_FlexSys) { MdiParent = this }; xform1.Show(); }
public void ShowLookupForm() { FrmLookup_LookupHide(null, null); frmLookup = new LookupForm(); switch (lookupColName) { case INWARDITEMS.STYLE_ID: frmLookup.LookupColNames = new string[] { STYLE.STYLE_NO }; frmLookup.SelectedPkValue = editgrid[INWARDITEMS.STYLE_ID, lookupRow].Value; frmLookup.AllowNewEntry = true; frmLookup.AllowEmptySelection = true; frmLookup.LookupList = CStyle_exten.LookupNo(); frmLookup.LoadLookupList(); break; case INWARDITEMS.ARTICLE_ID: frmLookup.LookupColNames = new string[] { ARTICLE.ARTICLE_NO }; frmLookup.SelectedPkValue = editgrid[INWARDITEMS.ARTICLE_ID, lookupRow].Value; frmLookup.AllowNewEntry = true; frmLookup.AllowEmptySelection = true; frmLookup.LookupList = CArticle_exten.GetforLookup(); frmLookup.LoadLookupList(); break; default: throw new Exception("'" + lookupColName + "' Not Found"); } frmLookup.LookupSelected += new EventHandler(FrmLookup_LookupSelected); frmLookup.AfterSelection += new EventHandler(FrmLookup_AfterSelection); frmLookup.LookupHide += new EventHandler(FrmLookup_LookupHide); frmLookup.NewEntryNeeded += new LookupForm.NewEntryHandler(FrmLookup_NewEntryNeeded); frmLookup.Owner = this.FindForm(); ////////// frmLookup.Show(); ////////// int vWidth = frmLookup.GetAutoWidth(); int vCellWidth = editgrid.Columns[lookupColName].Width; if (vWidth < vCellWidth) { vWidth = vCellWidth; } frmLookup.AutoFillLastColumn(); int vHeight = frmLookup.GetAutoHeight(); Rectangle screenRect = Global.GetScreenRect(editgrid); frmLookup.Bounds = Global.GetSnapRect(screenRect, vWidth, vHeight); }
void FrmLookup_LookupHide(object sender, EventArgs e) { Application.DoEvents(); Application.DoEvents(); if (frmLookup != null) { frmLookup.Dispose(); frmLookup = null; } }
/// <summary> /// 选择已审核通过的请假单据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lkEmployeeLeave_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("EMPLOYEENAME", "EMPLOYEENAME"); cols.Add("EMPLOYEECODE", "EMPLOYEECODE"); cols.Add("STARTDATETIME", "STARTDATETIME"); cols.Add("ENDDATETIME", "ENDDATETIME"); cols.Add("LEAVEDAYS", "LEAVEDAYS"); StringBuilder strfilter = new StringBuilder(); ObservableCollection <object> objArgs = new ObservableCollection <object>(); strfilter.Append(" EMPLOYEEID == @0"); strfilter.Append(" && CHECKSTATE == @1"); objArgs.Add(cancelLeave.EMPLOYEEID); objArgs.Add(Convert.ToInt32(SMT.SaaS.FrameworkUI.CheckStates.Approved).ToString()); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.EmployeeLeaveRecord, typeof(List <T_HR_EMPLOYEELEAVERECORD>), cols, strfilter.ToString(), objArgs); lookup.SelectedClick += (o, ev) => { T_HR_EMPLOYEELEAVERECORD ent = lookup.SelectedObj as T_HR_EMPLOYEELEAVERECORD; if (ent == null) { return; } lkEmployeeLeave.DataContext = ent; cancelLeave.T_HR_EMPLOYEELEAVERECORD = ent; this.GetTxtCancelRecord(ent.T_HR_EMPLOYEECANCELLEAVE); dpStartDate.Value = ent.STARTDATETIME; dpEndDate.Value = ent.ENDDATETIME; if (ent.LEAVEDAYS != null) { nudLeaveDay.Value = ent.LEAVEDAYS.Value.ToDouble(); } if (ent.LEAVEHOURS != null) { nudLeaveHours.Value = ent.LEAVEHOURS.Value.ToDouble(); } if (ent.TOTALHOURS != null) { nudTotalDays.Value = ent.TOTALHOURS.Value.ToDouble(); } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkCustomSalary_FindClick(object sender, EventArgs e) { string filter = ""; ObservableCollection <object> paras = new ObservableCollection <object>(); Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("GUERDONNAME", "GUERDONNAME"); cols.Add("GUERDONSUM", "GUERDONSUM"); cols.Add("UPDATEDATE", "UPDATEDATE"); filter += "OWNERCOMPANYID==@" + paras.Count().ToString(); paras.Add(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID); LookupForm lookup = new LookupForm(EntityNames.CustomGuerdonSet, typeof(List <T_HR_CUSTOMGUERDONSET>), cols, filter, paras); lookup.TitleContent = Utility.GetResourceStr("CUSTOMSALARY"); lookup.SelectedClick += (o, ev) => { T_HR_CUSTOMGUERDONSET ent = lookup.SelectedObj as T_HR_CUSTOMGUERDONSET; if (!GetExit(ent.GUERDONNAME)) { if (ent != null) { lkCustomSalary.DataContext = ent; T_HR_SALARYSTANDARD entSALARYSTANDARD = new T_HR_SALARYSTANDARD(); entSALARYSTANDARD.SALARYSTANDARDID = SAVEID; customGuerdon.CUSTOMGUERDONID = Guid.NewGuid().ToString(); customGuerdon.T_HR_SALARYSTANDARD = entSALARYSTANDARD; customGuerdon.T_HR_CUSTOMGUERDONSET = ent; customGuerdon.SUM = ent.GUERDONSUM; customGuerdon.CREATEDATE = System.DateTime.Now; customGuerdon.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; customGuerdon.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; customGuerdon.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; customGuerdon.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; customGuerdon.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; customGuerdon.CREATECOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; customGuerdon.CREATEDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; customGuerdon.CREATEPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; client.CustomGuerdonAddAsync(customGuerdon); RefreshUI(RefreshedTypes.ProgressBar); } } else { ent.GUERDONNAME = "";// Utility.GetResourceStr("ALREADYEXISTS"); lkCustomSalary.DataContext = ent; Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ALREADYEXISTS")); } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
//<summary> //选择当前员工的请假类型 //</summary> //<param name="sender"></param> //<param name="e"></param> private void lkLeaveTypeName_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("LEAVETYPENAME", "LEAVETYPENAME"); cols.Add("ISFREELEAVEDAY", "ISFREELEAVEDAY,ISCHECKED,DICTIONARYCONVERTER"); //string filter = ""; //System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); //filter += " ISFREELEAVEDAY=@" + paras.Count().ToString() + ""; //paras.Add("2"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.LeaveTypeSet, typeof(SMT.Saas.Tools.AttendanceWS.T_HR_LEAVETYPESET[]), cols); lookup.SelectedClick += (o, ev) => { SMT.Saas.Tools.AttendanceWS.T_HR_LEAVETYPESET ent = lookup.SelectedObj as SMT.Saas.Tools.AttendanceWS.T_HR_LEAVETYPESET; if (ent != null) { if (!string.IsNullOrEmpty(ent.POSTLEVELRESTRICT)) { decimal dlevel = 0, dCheckLevel = 0; //decimal.TryParse(tbEmpLevel.Text, out dlevel); decimal.TryParse(ent.POSTLEVELRESTRICT, out dCheckLevel); if (dlevel > dCheckLevel) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("EMPLOYEELEAVERECORD"), Utility.GetResourceStr("LEAVETYPERESTRICT", "POSTLEVELRESTRICT")); return; } } //LeaveRecord = new Saas.Tools.AttendanceWS.T_HR_EMPLOYEELEAVERECORD(); //LeaveRecord.T_HR_LEAVETYPESET = ent; this.lkLeaveTypeName.DataContext = ent; strleaveType = ent.LEAVETYPESETID; if (ent.FINETYPE == (Convert.ToInt32(LeaveFineType.Free) + 1).ToString() || ent.FINETYPE == (Convert.ToInt32(LeaveFineType.Deduct) + 1).ToString()) { //toolbar1.IsEnabled = false; //toolbar1.Visibility = System.Windows.Visibility.Collapsed; //dgLevelDayList.Visibility = System.Windows.Visibility.Collapsed; } } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
public UserEditor(User user) { try { InitializeComponent(); this.User = user; this.Roles = new BindingList<Role>(UserService.GetRoles(user)); this.txtName.DataBindings.Add(new Binding("Text", User, "Name")); this.txtLastName.DataBindings.Add(new Binding("Text", User, "LastName")); this.txtUsername.DataBindings.Add(new Binding("Text", User, "Username")); this.lstRoles.DataSource = Roles; this.btnRemoveRole.Click += (s, e) => { if (lstRoles.SelectedItem == null) return; Roles.Remove((Role)lstRoles.SelectedItem); }; this.btnAddRole.Click += (s, e) => { using (LookupForm<Role> lookup = new LookupForm<Role>()) { lookup.DataSource = RoleService .GetAll(r => r.Name) .Where(r => !Roles.Contains(r)) .ToList(); var dr = lookup.ShowDialog(); if (dr != DialogResult.OK) return; Role role = lookup.SelectedItem; if (role != null) Roles.Add(role); } }; } catch (Exception ex) { ex.ShowMessageBox(); } }
public void ShowLookupForm() { FrmLookup_LookupHide(null, null); frmLookup = new LookupForm(); switch (lookupColName) { case PAYMENTITEMS.PAYMENT_BY: { frmLookup.LookupColNames = new string[] { PAYMENTITEMS.PAYMENT_BY, PAYMENTITEMS.PURCHASE_NO, PAYMENTITEMS.PURCHASE_AMOUNT, PAYMENTITEMS.PAYMENT_AMOUNT }; frmLookup.SelectedPkValue = editgrid[PAYMENTITEMS.PAYMENT_BY, lookupRow].Value; frmLookup.AllowNewEntry = true; frmLookup.AllowEmptySelection = true; if (txt_party_id.Text != "") { frmLookup.LookupList = CPayment_manual.PaymentLookup(txt_party_id.Text); frmLookup.LoadLookupList(); } } break; default: throw new System.Exception("'" + lookupColName + "' Not Found"); } frmLookup.LookupSelected += new EventHandler(FrmLookup_LookupSelected); frmLookup.AfterSelection += new EventHandler(FrmLookup_AfterSelection); frmLookup.LookupHide += new EventHandler(FrmLookup_LookupHide); frmLookup.Owner = this.FindForm(); ////////// frmLookup.Show(); ////////// int vWidth = frmLookup.GetAutoWidth(); int vCellWidth = editgrid.Columns[lookupColName].Width; if (vWidth < vCellWidth) { vWidth = vCellWidth; } frmLookup.AutoFillLastColumn(); int vHeight = frmLookup.GetAutoHeight(); Rectangle screenRect = Global.GetScreenRect(editgrid); frmLookup.Bounds = Global.GetSnapRect(screenRect, vWidth, vHeight); }
void btnNew_Click(object sender, RoutedEventArgs e) { string filter = ""; ObservableCollection <object> paras = new ObservableCollection <object>(); T_HR_SALARYSTANDARDITEM salarystandarditem = new T_HR_SALARYSTANDARDITEM(); T_HR_SALARYSTANDARD salarystandard = new T_HR_SALARYSTANDARD(); salarystandard.SALARYSTANDARDID = savesid; Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("SALARYITEMNAME", "SALARYITEMNAME"); cols.Add("GUERDONSUM", "GUERDONSUM"); cols.Add("CALCULATEFORMULA", "CALCULATEFORMULA"); RefreshUI(RefreshedTypes.ProgressBar); filter += "CREATECOMPANYID==@" + paras.Count().ToString(); paras.Add(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID); LookupForm lookup = new LookupForm(EntityNames.SalaryItemSet, typeof(List <T_HR_SALARYITEM>), cols, filter, paras); lookup.TitleContent = Utility.GetResourceStr("SALARYITEM"); lookup.SelectedClick += (o, ev) => { T_HR_SALARYITEM ent = lookup.SelectedObj as T_HR_SALARYITEM; if (ent != null) { salarystandarditem.STANDRECORDITEMID = Guid.NewGuid().ToString(); salarystandarditem.T_HR_SALARYITEM = ent; salarystandarditem.T_HR_SALARYSTANDARD = salarystandard; salarystandarditem.SUM = ent.GUERDONSUM.ToString(); salarystandarditem.REMARK = ent.REMARK; salarystandarditem.CREATEDATE = System.DateTime.Now; salarystandarditem.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; client.SalaryStandardItemAddAsync(salarystandarditem); } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); #region ---- //System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); ////string filter = ""; ////filter = "CHECKSTATE==@" + paras.Count; //paras.Add(Convert.ToInt16(CheckStates.Approved).ToString()); //LookupForm lookup = new LookupForm(EntityNames.SalaryStandard, // typeof(List<T_HR_SALARYSTANDARD>), cols, filter, paras); #endregion }
/// <summary> /// 添加职员信息转存到银行 /// </summary> private void AddLeaveItemToList() { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("VACATIONNAME", "LEAVETYPENAME"); cols.Add("FINETYPE", "FINETYPE,LEAVEFINETYPE,DICTIONARYCONVERTER"); cols.Add("LEAVEMAXDAYS", "MAXDAYS"); StringBuilder strfilter = new StringBuilder(); ObservableCollection <object> objArgs = new ObservableCollection <object>(); strfilter.Append(" ISFREELEAVEDAY == @0"); objArgs.Add((Convert.ToInt32(IsChecked.Yes) + 1).ToString()); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.LeaveTypeSet, typeof(T_HR_LEAVETYPESET[]), cols, strfilter.ToString(), objArgs); lookup.SelectedClick += (o, ev) => { T_HR_LEAVETYPESET ent = lookup.SelectedObj as T_HR_LEAVETYPESET; if (ent != null) { T_HR_LEAVETYPESET entView = ent; ObservableCollection <T_HR_LEAVETYPESET> entList = new ObservableCollection <T_HR_LEAVETYPESET>(); if (dgLeaveSetlist.ItemsSource != null) { entList = dgLeaveSetlist.ItemsSource as ObservableCollection <T_HR_LEAVETYPESET>; bool flag = false; flag = IsContainsEntity(entList, entView); if (flag) { return; } } entList.Add(entView); dgLeaveSetlist.ItemsSource = entList; } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkSchedulingTemplateMaster_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("TEMPLATENAME", "TEMPLATENAME"); cols.Add("REMARK", "REMARK"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.SchedulingTemplateMaster, typeof(SMT.Saas.Tools.OrganizationWS.T_HR_SCHEDULINGTEMPLATEMASTER[]), cols); lookup.SelectedClick += (o, ev) => { entTemplateMaster = ReplicateDataToNewStructure(lookup.SelectedObj); if (entTemplateMaster != null) { lkSchedulingTemplateMaster.DataContext = entTemplateMaster; txtRemark.Text = entTemplateMaster.REMARK == null ? string.Empty : entTemplateMaster.REMARK; if (cbxkSchedulingCircleType.ItemsSource != null) { foreach (object obj in cbxkSchedulingCircleType.ItemsSource) { T_SYS_DICTIONARY ent = obj as T_SYS_DICTIONARY; if (entTemplateMaster.SCHEDULINGCIRCLETYPE == ent.DICTIONARYVALUE.Value.ToString()) { cbxkSchedulingCircleType.SelectedItem = obj; break; } } } cbxkSchedulingCircleType.IsEnabled = false; txtRemark.IsEnabled = false; string strTemplateMasterID = string.Empty, strSortkey = string.Empty; strTemplateMasterID = entTemplateMaster.TEMPLATEMASTERID; strSortkey = "SCHEDULINGINDEX"; clientAtt.GetAllSchedulingTemplateDetailRdListByMasterIdAsync(strTemplateMasterID, strSortkey); } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
/// <summary> /// 显示考勤异常扣款的设置记录列表 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addNewDeduct() { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("ATTENDABNORMALNAME", "ATTENDABNORMALNAME"); cols.Add("ISACCUMULATING", "ISACCUMULATING,ISCHECKED,DICTIONARYCONVERTER"); cols.Add("ISPERFECTATTENDANCEFACTOR", "ISPERFECTATTENDANCEFACTOR,ISCHECKED,DICTIONARYCONVERTER"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.AttendanceDeductMaster, typeof(SMT.Saas.Tools.OrganizationWS.T_HR_ATTENDANCEDEDUCTMASTER[]), cols); lookup.SelectedClick += (o, ev) => { SMT.Saas.Tools.OrganizationWS.T_HR_ATTENDANCEDEDUCTMASTER ent = lookup.SelectedObj as SMT.Saas.Tools.OrganizationWS.T_HR_ATTENDANCEDEDUCTMASTER; if (ent != null) { T_HR_ATTENDANCEDEDUCTMASTER entView = ReplicateDataToNewStructure(ent); ObservableCollection <T_HR_ATTENDANCEDEDUCTMASTER> entList = new ObservableCollection <T_HR_ATTENDANCEDEDUCTMASTER>(); if (entView == null) { return; } if (dgAttendanceDeductlist.ItemsSource != null) { entList = dgAttendanceDeductlist.ItemsSource as ObservableCollection <T_HR_ATTENDANCEDEDUCTMASTER>; bool flag = false; flag = IsContainsEntity(entList, entView); if (flag) { return; } } entList.Add(entView); dgAttendanceDeductlist.ItemsSource = entList; } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkAttSol_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("ATTENDANCESOLUTIONNAME", "ATTENDANCESOLUTIONNAME"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.AttendanceSolution, typeof(T_HR_ATTENDANCESOLUTION[]), cols); lookup.SelectedClick += (o, ev) => { T_HR_ATTENDANCESOLUTION ent = lookup.SelectedObj as T_HR_ATTENDANCESOLUTION; if (ent != null) { lkAttSol.DataContext = ent; } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => {}); }
private void btnStandardAdd_Click(object sender, RoutedEventArgs e) { T_HR_SALARYSOLUTIONSTANDARD solutionSatandard = new T_HR_SALARYSOLUTIONSTANDARD(); if (SalarySolution != null && !string.IsNullOrEmpty(SalarySolution.SALARYSOLUTIONID)) { solutionSatandard.T_HR_SALARYSOLUTION = new T_HR_SALARYSOLUTION(); solutionSatandard.T_HR_SALARYSOLUTION.SALARYSOLUTIONID = SalarySolution.SALARYSOLUTIONID; Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("SALARYSTANDARDNAME", "SALARYSTANDARDNAME"); cols.Add("POSTSALARY", "POSTSALARY"); cols.Add("SECURITYALLOWANCE", "SECURITYALLOWANCE"); cols.Add("HOUSINGALLOWANCE", "HOUSINGALLOWANCE"); cols.Add("AREADIFALLOWANCE", "AREADIFALLOWANCE"); System.Collections.ObjectModel.ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); string filter = ""; filter = "CHECKSTATE==@" + paras.Count; paras.Add(Convert.ToInt16(CheckStates.Approved).ToString()); LookupForm lookup = new LookupForm(EntityNames.SalaryStandard, typeof(List <T_HR_SALARYSTANDARD>), cols); //LookupForm lookup = new LookupForm(EntityNames.SalaryStandard, // typeof(List<T_HR_SALARYSTANDARD>), cols, filter, paras); lookup.SelectedClick += (o, ev) => { T_HR_SALARYSTANDARD ent = lookup.SelectedObj as T_HR_SALARYSTANDARD; if (ent != null) { solutionSatandard.SOLUTIONSTANDARDID = Guid.NewGuid().ToString(); solutionSatandard.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; solutionSatandard.CREATEDATE = System.DateTime.Now; solutionSatandard.T_HR_SALARYSTANDARD = new T_HR_SALARYSTANDARD(); solutionSatandard.T_HR_SALARYSTANDARD.SALARYSTANDARDID = ent.SALARYSTANDARDID; client.SalarySolutionStandardAddAsync(solutionSatandard); } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } }
private void ChooseLicense() { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("LICENSENAME", "LICENSENAME"); cols.Add("LEGALPERSON", "LEGALPERSON"); cols.Add("LICENCENO", "LICENCENO"); cols.Add("DAY", "DAY"); LookupForm lookup = new LookupForm(SMT.SaaS.OA.UI.SmtOADocumentAdminService.EntityNames.LicenseBorrow, typeof(T_OA_LICENSEMASTER[]), cols); lookup.SelectedClick += (o, ev) => { T_OA_LICENSEMASTER ent = lookup.SelectedObj as T_OA_LICENSEMASTER; if (ent != null) { LicenseObj.T_OA_LICENSEMASTER = ent; this.txtLicenseName.Text = ent.LICENSENAME; } }; lookup.Show(); }
/// <summary> /// 考勤方案查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> //private void lkAttendanceSolutionName_FindClick(object sender, EventArgs e) //{ // Dictionary<string, string> cols = new Dictionary<string, string>(); // cols.Add("ATTENDANCESOLUTIONID", "ATTENDANCESOLUTIONID"); // cols.Add("ATTENDANCESOLUTIONNAME", "ATTENDANCESOLUTIONNAME"); // LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.AttendanceSolution, // typeof(T_HR_ATTENDANCESOLUTION[]), cols); // lookup.SelectedClick += (o, ev) => // { // T_HR_ATTENDANCESOLUTION ent = lookup.SelectedObj as T_HR_ATTENDANCESOLUTION; // if (ent != null) // { // lkAttendanceSolutionName.DataContext = ent; // } // }; // // lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) =>{}); //} /// <summary> /// 请假类型查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lkLeaveTypeName_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("VACATIONNAME", "LEAVETYPENAME"); cols.Add("FINETYPE", "FINETYPE"); cols.Add("LEAVEMAXDAYS", "MAXDAYS"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.LeaveTypeSet, typeof(T_HR_LEAVETYPESET[]), cols); lookup.SelectedClick += (o, ev) => { T_HR_LEAVETYPESET ent = lookup.SelectedObj as T_HR_LEAVETYPESET; if (ent != null) { lkLeaveTypeName.DataContext = ent; } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => {}); }
private void lkFather_FindClick(object sender, EventArgs e) { //Dictionary<string, string> cols = new Dictionary<string, string>(); //cols.Add("DICTIONCATEGORY", "DICTIONCATEGORYNAME"); ////cols.Add("DICTIONCATEGORY", "DICTIONCATEGORY"); ////cols.Add("DICTIONARYNAME", "DICTIONARYNAME"); ////cols.Add("DICTIONARYVALUE", "DICTIONARYVALUE"); ////cols.Add("DICTIONCATEGORYNAME", "DICTIONCATEGORYNAME"); ////string[] cols = { "DICTIONCATEGORY", "DICTIONCATEGORYNAME" }; //LookupForm lookup = new LookupForm(EntityNames.SysDictionary, // typeof(List<Permission.UI.PermissionService.T_SYS_DICTIONARY>), cols); Dictionary <string, string> para = new Dictionary <string, string>(); para.Add("SysDictionary", "1"); //cols.Add("DICTIONCATEGORY", "DICTIONCATEGORY"); //cols.Add("DICTIONARYNAME", "DICTIONARYNAME"); //cols.Add("DICTIONARYVALUE", "DICTIONARYVALUE"); //cols.Add("DICTIONCATEGORYNAME", "DICTIONCATEGORYNAME"); string[] cols = { "DICTIONCATEGORY", "DICTIONCATEGORYNAME", "DICTIONARYNAME" }; LookupForm lookup = new LookupForm(EntityNames.SysDictionary, typeof(List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>), cols, para); lookup.SelectedClick += (o, ev) => { SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY ent = lookup.SelectedObj as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY; if (ent != null) { lkFather.DataContext = ent; dictionary.T_SYS_DICTIONARY2 = new T_SYS_DICTIONARY(); dictionary.T_SYS_DICTIONARY2.DICTIONARYID = ent.DICTIONARYID; } }; lookup.Show(); }
private void LookUp_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("POSTCODE", "T_HR_POSTDICTIONARY.POSTCODE"); cols.Add("POSTNAME", "T_HR_POSTDICTIONARY.POSTNAME"); LookupForm lookup = new LookupForm(EntityNames.Post, typeof(T_HR_POST[]), cols); lookup.SelectedClick += (o, ev) => { T_HR_POST ent = lookup.SelectedObj as T_HR_POST; if (ent != null) { lkPost.DataContext = ent; HandlePostChanged(ent); } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => {}); }
private void lkCustomSalary_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("COMPANRYCODE", "COMPANRYCODE"); cols.Add("CNAME", "CNAME"); cols.Add("ADDRESS", "ADDRESS"); LookupForm lookup = new LookupForm(EntityNames.Company, typeof(List <T_HR_COMPANY>), cols); lookup.SelectedClick += (o, ev) => { T_HR_COMPANY ent = lookup.SelectedObj as T_HR_COMPANY; if (ent != null) { lkCustomSalary.DataContext = ent; lkCustomSalary.TxtLookUp.Text = ent.CNAME; AttendMachineSet.COMPANYID = ent.COMPANYID; } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkCompany_FindClick(object sender, EventArgs e) { Dictionary <string, string> cols = new Dictionary <string, string>(); cols.Add("COMPANRYCODE", "COMPANRYCODE"); cols.Add("CNAME", "CNAME"); cols.Add("ENAME", "ENAME"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.Company, typeof(T_HR_COMPANY[]), cols); lookup.SelectedClick += (o, ev) => { T_HR_COMPANY ent = lookup.SelectedObj as T_HR_COMPANY; if (ent != null) { lkCompany.DataContext = ent; //HandleComapnyChanged(); } }; lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
//选择薪资方案 private void lkSalarySolution_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("SALARYSOLUTIONNAME", "SALARYSOLUTIONNAME"); cols.Add("BANKNAME", "BANKNAME"); cols.Add("BANKACCOUNTNO", "BANKACCOUNTNO"); //LookupForm lookup = new LookupForm(EntityNames.SalarySolution, // typeof(List<T_HR_SALARYSOLUTION>), cols); string filter = ""; System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); filter += " CHECKSTATE=@" + paras.Count().ToString() + ""; paras.Add("2"); LookupForm lookup = new LookupForm(EntityNames.SalarySolution, typeof(List<T_HR_SALARYSOLUTION>), cols, filter, paras); lookup.SelectedClick += (o, ev) => { T_HR_SALARYSOLUTION ent = lookup.SelectedObj as T_HR_SALARYSOLUTION; if (ent != null) { lkSalarySolution.DataContext = ent; SalaryArchive.SALARYSOLUTIONID = ent.SALARYSOLUTIONID; SalaryArchive.SALARYSOLUTIONNAME = ent.SALARYSOLUTIONNAME; if (lkEmployee.DataContext as SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEE != null) { cbxSalaryLevel.IsEnabled = true; } BindStand(); } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void LookUp_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("POSTLEVEL", "T_HR_POSTLEVELDISTINCTION.POSTLEVEL"); cols.Add("SALARYLEVEL", "SALARYLEVEL"); LookupForm lookup = new LookupForm(EntityNames.SalaryLevel, typeof(List<T_HR_SALARYLEVEL>), cols); lookup.SelectedClick += (o, ev) => { T_HR_SALARYLEVEL ent = lookup.SelectedObj as T_HR_SALARYLEVEL; if (ent != null) { lkSalaryLevel.DataContext = ent; SalaryStandard.T_HR_SALARYLEVEL = new T_HR_SALARYLEVEL(); SalaryStandard.T_HR_SALARYLEVEL.SALARYLEVELID = ent.SALARYLEVELID; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkSalarySolution_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("SALARYSOLUTIONNAME", "SALARYSOLUTIONNAME"); //cols.Add("BANKNAME", "BANKNAME"); cols.Add("BANKACCOUNTNO", "BANKACCOUNTNO"); System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); string filter = ""; filter = "CHECKSTATE==@" + paras.Count; paras.Add(Convert.ToInt16(CheckStates.Approved).ToString()); //LookupForm lookup = new LookupForm(EntityNames.SalarySolution, // typeof(List<T_HR_SALARYSOLUTION>), cols); LookupForm lookup = new LookupForm(EntityNames.SalarySolution, typeof(List<T_HR_SALARYSOLUTION>), cols, filter, paras); lookup.SelectedClick += (o, ev) => { T_HR_SALARYSOLUTION ent = lookup.SelectedObj as T_HR_SALARYSOLUTION; if (ent != null) { lkSalarySolution.DataContext = ent; archive.SALARYSOLUTIONID = ent.SALARYSOLUTIONID; archive.SALARYSOLUTIONNAME = ent.SALARYSOLUTIONNAME; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkSalaryStandard_FindClick(object sender, EventArgs e) { //TODO: 根据薪资方案分配过滤出可用的标准 Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("SALARYSTANDARDNAME", "SALARYSTANDARDNAME"); cols.Add("POSTSALARY", "POSTSALARY"); cols.Add("SECURITYALLOWANCE", "SECURITYALLOWANCE"); cols.Add("HOUSINGALLOWANCE", "HOUSINGALLOWANCE"); cols.Add("AREADIFALLOWANCE", "AREADIFALLOWANCE"); LookupForm lookup = new LookupForm(EntityNames.SalaryStandard, typeof(List<T_HR_SALARYSTANDARD>), cols); lookup.SelectedClick += (o, ev) => { T_HR_SALARYSTANDARD ent = lookup.SelectedObj as T_HR_SALARYSTANDARD; if (ent != null) { //lkSalaryStandard.DataContext = ent; CopySalaryStandardToArchive(ent); } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkCustomSalary_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("COMPANRYCODE", "COMPANRYCODE"); cols.Add("CNAME", "CNAME"); cols.Add("ADDRESS", "ADDRESS"); LookupForm lookup = new LookupForm(EntityNames.Company, typeof(List<T_HR_COMPANY>), cols); lookup.SelectedClick += (o, ev) => { T_HR_COMPANY ent = lookup.SelectedObj as T_HR_COMPANY; if (ent != null) { lkCustomSalary.DataContext = ent; lkCustomSalary.TxtLookUp.Text = ent.CNAME; AttendMachineSet.COMPANYID = ent.COMPANYID; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
/// <summary> /// 选择当前员工的请假类型 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lkLeaveTypeName_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("LEAVETYPENAME", "LEAVETYPENAME"); cols.Add("ISFREELEAVEDAY", "ISFREELEAVEDAY,ISCHECKED,DICTIONARYCONVERTER"); string filter = ""; System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); filter += " leaverecordemployeeid=@" + paras.Count().ToString() + ""; paras.Add(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.LeaveTypeSet, typeof(T_HR_LEAVETYPESET[]), cols,filter,paras); lookup.SelectedClick += (o, ev) => { T_HR_LEAVETYPESET ent = lookup.SelectedObj as T_HR_LEAVETYPESET; if (ent != null) { if (ent.SEXRESTRICT != "2") { if (ent.SEXRESTRICT != tbEmpSex.Text) { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("EMPLOYEELEAVERECORD"), Utility.GetResourceStr("LEAVETYPERESTRICT", "SEXRESTRICT")); MessageBox.Show("该假期标准只限于女性"); return; } } #region 五四青年节 string strBirthDay = tbEmpBirthday.Text; //五四青年节 if (ent.LEAVETYPEVALUE == "12") { if (string.IsNullOrEmpty(strBirthDay)) { MessageBox.Show("五四青年节没获取到生日信息,不能选择此假"); return; } DateTime dtBirthday = new DateTime(); DateTime dtYouth = new DateTime(); DateTime.TryParse(strBirthDay, out dtBirthday); DateTime.TryParse(DateTime.Now.Year.ToString() + "-05-04", out dtYouth); if (dtBirthday.AddYears(28) < dtYouth) { MessageBox.Show("已超过五四假的设置条件,不能选择此假"); return; } } #endregion if (!string.IsNullOrEmpty(ent.POSTLEVELRESTRICT)) { decimal dlevel = 0, dCheckLevel = 0; decimal.TryParse(tbEmpLevel.Text, out dlevel); decimal.TryParse(ent.POSTLEVELRESTRICT, out dCheckLevel); if (dlevel > dCheckLevel) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("EMPLOYEELEAVERECORD"), Utility.GetResourceStr("LEAVETYPERESTRICT", "POSTLEVELRESTRICT")); return; } } LeaveRecord.T_HR_LEAVETYPESET = ent; //选择的请假类型 11 字典表 表示产前检查假 LeaveRecordType = ent.LEAVETYPEVALUE; txtMaxDays.Text = ent.MAXDAYS.Value.ToString(); //nudLeaveDay.Maximum = Convert.ToDouble(ent.MAXDAYS); toolbar1.IsEnabled = true; toolbar1.Visibility = System.Windows.Visibility.Visible; dgLevelDayList.Visibility = System.Windows.Visibility.Visible; if (ent.FINETYPE == (Convert.ToInt32(LeaveFineType.Free) + 1).ToString() || ent.FINETYPE == (Convert.ToInt32(LeaveFineType.Deduct) + 1).ToString()) { toolbar1.IsEnabled = false; toolbar1.Visibility = System.Windows.Visibility.Collapsed; dgLevelDayList.Visibility = System.Windows.Visibility.Collapsed; } ResetForm(); } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkSchedulingTemplateMaster_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("TEMPLATENAME", "TEMPLATENAME"); cols.Add("REMARK", "REMARK"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.SchedulingTemplateMaster, typeof(SMT.Saas.Tools.OrganizationWS.T_HR_SCHEDULINGTEMPLATEMASTER[]), cols); lookup.SelectedClick += (o, ev) => { entTemplateMaster = ReplicateDataToNewStructure(lookup.SelectedObj); if (entTemplateMaster != null) { lkSchedulingTemplateMaster.DataContext = entTemplateMaster; txtRemark.Text = entTemplateMaster.REMARK == null ? string.Empty : entTemplateMaster.REMARK; if (cbxkSchedulingCircleType.ItemsSource != null) { foreach (object obj in cbxkSchedulingCircleType.ItemsSource) { T_SYS_DICTIONARY ent = obj as T_SYS_DICTIONARY; if (entTemplateMaster.SCHEDULINGCIRCLETYPE == ent.DICTIONARYVALUE.Value.ToString()) { cbxkSchedulingCircleType.SelectedItem = obj; break; } } } cbxkSchedulingCircleType.IsEnabled = false; txtRemark.IsEnabled = false; string strTemplateMasterID = string.Empty, strSortkey = string.Empty; strTemplateMasterID = entTemplateMaster.TEMPLATEMASTERID; strSortkey = "SCHEDULINGINDEX"; clientAtt.GetAllSchedulingTemplateDetailRdListByMasterIdAsync(strTemplateMasterID, strSortkey); } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void InitializeHandlers() { // Select Measurement this.btnLookupMeasurement.Click += (s, e) => { try { using (LookupForm<Measurement> lookup = new LookupForm<Measurement>()) { lookup.DataSource = MeasurementService.GetAll(m => m.Name).ToList(); var dr = lookup.ShowDialog(); if (dr != DialogResult.OK) return; Measurement measurement = lookup.SelectedItem; if (measurement != null) Item.BaseMeasurement = measurement; } } catch (Exception ex) { ex.ShowMessageBox(); } }; // Select ItemType this.btnLookupItemType.Click += (s, e) => { try { using (LookupForm<ItemType> lookup = new LookupForm<ItemType>()) { lookup.DataSource = ItemTypeService.GetAll(i => i.Name).ToList(); var dr = lookup.ShowDialog(); if (dr != DialogResult.OK) return; ItemType itemType = lookup.SelectedItem; if (itemType != null) Item.ItemType = itemType; } } catch (Exception ex) { ex.ShowMessageBox(); } }; // Manage Prices this.btnPrices.Click += (s, e) => { try { Double current = this.Item.CurrentPrice == null ? 0 : this.Item.CurrentPrice.Value; using (PriceEditor editor = new PriceEditor(current)) { var dr = editor.ShowDialog(); if (dr != DialogResult.OK) return; if (editor.NewValue != editor.CurrentValue) { Price newPrice = new Price { Date = DateTime.Now, Value = editor.NewValue }; Item.CurrentPrice = newPrice; } } } catch (Exception ex) { ex.ShowMessageBox(); } }; }
/// <summary> /// 选择已审核通过的请假单据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lkEmployeeLeave_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("EMPLOYEENAME", "EMPLOYEENAME"); cols.Add("EMPLOYEECODE", "EMPLOYEECODE"); cols.Add("STARTDATETIME", "STARTDATETIME"); cols.Add("ENDDATETIME", "ENDDATETIME"); cols.Add("LEAVEDAYS", "LEAVEDAYS"); StringBuilder strfilter = new StringBuilder(); ObservableCollection<object> objArgs = new ObservableCollection<object>(); strfilter.Append(" EMPLOYEEID == @0"); strfilter.Append(" && CHECKSTATE == @1"); objArgs.Add(cancelLeave.EMPLOYEEID); objArgs.Add(Convert.ToInt32(SMT.SaaS.FrameworkUI.CheckStates.Approved).ToString()); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.EmployeeLeaveRecord, typeof(List<T_HR_EMPLOYEELEAVERECORD>), cols, strfilter.ToString(), objArgs); lookup.SelectedClick += (o, ev) => { T_HR_EMPLOYEELEAVERECORD ent = lookup.SelectedObj as T_HR_EMPLOYEELEAVERECORD; if (ent == null) { return; } lkEmployeeLeave.DataContext = ent; cancelLeave.T_HR_EMPLOYEELEAVERECORD = ent; this.GetTxtCancelRecord(ent.T_HR_EMPLOYEECANCELLEAVE); dpStartDate.Value = ent.STARTDATETIME; dpEndDate.Value = ent.ENDDATETIME; if (ent.LEAVEDAYS != null) { nudLeaveDay.Value = ent.LEAVEDAYS.Value.ToDouble(); } if (ent.LEAVEHOURS != null) { nudLeaveHours.Value = ent.LEAVEHOURS.Value.ToDouble(); } if (ent.TOTALHOURS != null) { nudTotalDays.Value = ent.TOTALHOURS.Value.ToDouble(); } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkAttSol_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("ATTENDANCESOLUTIONNAME", "ATTENDANCESOLUTIONNAME"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.AttendanceSolution, typeof(T_HR_ATTENDANCESOLUTION[]), cols); lookup.SelectedClick += (o, ev) => { T_HR_ATTENDANCESOLUTION ent = lookup.SelectedObj as T_HR_ATTENDANCESOLUTION; if (ent != null) { lkAttSol.DataContext = ent; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) =>{}); }
/// <summary> /// 选择预算科目 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lkSubject_FindClick(object sender, EventArgs e) { string filter = string.Empty; ObservableCollection<object> paras = new ObservableCollection<object>(); string strOrgType = string.Empty; string strOrgID = string.Empty; OrgSelectEntity ose = lkOrg.DataContext as OrgSelectEntity; if (ose == null) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARNING"), "请选择机构后再进行查询"); return; } else if (ose.IsMultipleType) { Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("WARNING"), "请选择相同类型的机构,如全是公司或全是人员"); return; } ose.GetSqlValue(ref filter, ref paras); var intOrgType = (int)ose.SelectedOrgType; Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("SUBJECTCODE", "SUBJECTCODE"); cols.Add("SUBJECTNAME", "SUBJECTNAME"); if (intOrgType == 3) { paras.Clear(); List<string> filters = new List<string>(); foreach (var item in ose.SelectedValue) { var entEmp = item.ObjectInstance as SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEE; var temp = string.Format("(OWNERPOSTID=@{0})", paras.Count ); paras.Add(entEmp.OWNERPOSTID); filters.Add(temp); } filter = "( " + string.Join(" or ", filters)+ " )"; } LookupForm lookup = new LookupForm(FBAEnumsBLLPrefixNames.Execution, typeof(T_FB_SUBJECT[]), cols, "T_FB_BUDGETCHECK", filter, paras); lookup.SelectedClick += (o, ev) => { if (lookup.SelectedObj == null) { return; } ObservableCollection<object> entList = lookup.SelectedObj as ObservableCollection<object>; StringBuilder strIDlist = new StringBuilder(); StringBuilder strNamelist = new StringBuilder(); foreach (var obj in entList) { T_FB_SUBJECT ent = obj as T_FB_SUBJECT; strIDlist.Append(ent.SUBJECTID + ";"); strNamelist.Append(ent.SUBJECTNAME + ";"); } strSearchSubjects = strIDlist.ToString(); lkSubject.TxtLookUp.Text = strNamelist.ToString(); }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkCompany_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("COMPANRYCODE", "COMPANRYCODE"); cols.Add("CNAME", "CNAME"); cols.Add("ENAME", "ENAME"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.Company, typeof(T_HR_COMPANY[]), cols); lookup.SelectedClick += (o, ev) => { T_HR_COMPANY ent = lookup.SelectedObj as T_HR_COMPANY; if (ent != null) { lkCompany.DataContext = ent; //HandleComapnyChanged(); } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
//<summary> //选择当前员工的请假类型 //</summary> //<param name="sender"></param> //<param name="e"></param> private void lkLeaveTypeName_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("LEAVETYPENAME", "LEAVETYPENAME"); cols.Add("ISFREELEAVEDAY", "ISFREELEAVEDAY,ISCHECKED,DICTIONARYCONVERTER"); string filter = ""; System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); filter += " ISFREELEAVEDAY=@" + paras.Count().ToString() + ""; paras.Add("2"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.LeaveTypeSet, typeof(SMT.Saas.Tools.AttendanceWS.T_HR_LEAVETYPESET[]), cols, filter, paras); lookup.SelectedClick += (o, ev) => { SMT.Saas.Tools.AttendanceWS.T_HR_LEAVETYPESET ent = lookup.SelectedObj as SMT.Saas.Tools.AttendanceWS.T_HR_LEAVETYPESET; if (ent != null) { if (ent.SEXRESTRICT != "2") { if (ent.SEXRESTRICT != tbEmpSex.Text) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("EMPLOYEELEAVERECORD"), Utility.GetResourceStr("LEAVETYPERESTRICT", "SEXRESTRICT")); return; } } if (!string.IsNullOrEmpty(ent.POSTLEVELRESTRICT)) { decimal dlevel = 0, dCheckLevel = 0; //decimal.TryParse(tbEmpLevel.Text, out dlevel); decimal.TryParse(ent.POSTLEVELRESTRICT, out dCheckLevel); if (dlevel > dCheckLevel) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("EMPLOYEELEAVERECORD"), Utility.GetResourceStr("LEAVETYPERESTRICT", "POSTLEVELRESTRICT")); return; } } //LeaveRecord = new Saas.Tools.AttendanceWS.T_HR_EMPLOYEELEAVERECORD(); //LeaveRecord.T_HR_LEAVETYPESET = ent; this.lkLeaveTypeName.DataContext = ent; strleaveType = ent.LEAVETYPESETID; if (ent.FINETYPE == (Convert.ToInt32(LeaveFineType.Free) + 1).ToString() || ent.FINETYPE == (Convert.ToInt32(LeaveFineType.Deduct) + 1).ToString()) { //toolbar1.IsEnabled = false; //toolbar1.Visibility = System.Windows.Visibility.Collapsed; //dgLevelDayList.Visibility = System.Windows.Visibility.Collapsed; } } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkEmployee_FindClick(object sender, EventArgs e) { //TODO: 根据薪资方案分配过滤出可用的标准 Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("EMPLOYEECNAME", "T_HR_EMPLOYEE.EMPLOYEECNAME"); cols.Add("EMPLOYEECODE", "T_HR_EMPLOYEE.EMPLOYEECODE"); cols.Add("SEX", "SEX"); cols.Add("MOBILE", "MOBILE"); cols.Add("OFFICEPHONE", "OFFICEPHONE"); LookupForm lookup = new LookupForm(EntityNames.Employee, typeof(List<T_HR_EMPLOYEE>), cols); lookup.SelectedClick += (o, ev) => { SMT.Saas.Tools.OrganizationWS.V_EMPLOYEEPOST ent = lookup.SelectedObj as SMT.Saas.Tools.OrganizationWS.V_EMPLOYEEPOST; ; if (ent != null) { lkEmployee.DataContext = ent; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
/// <summary> /// 显示考勤异常扣款的设置记录列表 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addNewDeduct() { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("ATTENDABNORMALNAME", "ATTENDABNORMALNAME"); cols.Add("ISACCUMULATING", "ISACCUMULATING,ISCHECKED,DICTIONARYCONVERTER"); cols.Add("ISPERFECTATTENDANCEFACTOR", "ISPERFECTATTENDANCEFACTOR,ISCHECKED,DICTIONARYCONVERTER"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.AttendanceDeductMaster, typeof(SMT.Saas.Tools.OrganizationWS.T_HR_ATTENDANCEDEDUCTMASTER[]), cols); lookup.SelectedClick += (o, ev) => { SMT.Saas.Tools.OrganizationWS.T_HR_ATTENDANCEDEDUCTMASTER ent = lookup.SelectedObj as SMT.Saas.Tools.OrganizationWS.T_HR_ATTENDANCEDEDUCTMASTER; if (ent != null) { T_HR_ATTENDANCEDEDUCTMASTER entView = ReplicateDataToNewStructure(ent); ObservableCollection<T_HR_ATTENDANCEDEDUCTMASTER> entList = new ObservableCollection<T_HR_ATTENDANCEDEDUCTMASTER>(); if (entView == null) { return; } if (dgAttendanceDeductlist.ItemsSource != null) { entList = dgAttendanceDeductlist.ItemsSource as ObservableCollection<T_HR_ATTENDANCEDEDUCTMASTER>; bool flag = false; flag = IsContainsEntity(entList, entView); if (flag) { return; } } entList.Add(entView); dgAttendanceDeductlist.ItemsSource = entList; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
/// <summary> /// 添加职员信息转存到银行 /// </summary> private void AddLeaveItemToList() { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("VACATIONNAME", "LEAVETYPENAME"); cols.Add("FINETYPE", "FINETYPE,LEAVEFINETYPE,DICTIONARYCONVERTER"); cols.Add("LEAVEMAXDAYS", "MAXDAYS"); StringBuilder strfilter = new StringBuilder(); ObservableCollection<object> objArgs = new ObservableCollection<object>(); strfilter.Append(" ISFREELEAVEDAY == @0"); objArgs.Add((Convert.ToInt32(IsChecked.Yes) + 1).ToString()); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.LeaveTypeSet, typeof(T_HR_LEAVETYPESET[]), cols, strfilter.ToString(), objArgs); lookup.SelectedClick += (o, ev) => { T_HR_LEAVETYPESET ent = lookup.SelectedObj as T_HR_LEAVETYPESET; if (ent != null) { T_HR_LEAVETYPESET entView = ent; ObservableCollection<T_HR_LEAVETYPESET> entList = new ObservableCollection<T_HR_LEAVETYPESET>(); if (dgLeaveSetlist.ItemsSource != null) { entList = dgLeaveSetlist.ItemsSource as ObservableCollection<T_HR_LEAVETYPESET>; bool flag = false; flag = IsContainsEntity(entList, entView); if (flag) { return; } } entList.Add(entView); dgLeaveSetlist.ItemsSource = entList; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void LookUp_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("EMPLOYEECODE", "T_HR_EMPLOYEE.EMPLOYEECODE"); cols.Add("EMPLOYEECNAME", "T_HR_EMPLOYEE.EMPLOYEECNAME"); cols.Add("EMPLOYEEENAME", "T_HR_EMPLOYEE.EMPLOYEEENAME"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.Employee, typeof(SMT.Saas.Tools.OrganizationWS.V_EMPLOYEEPOST[]), cols); lookup.SelectedClick += (o, ev) => { SMT.Saas.Tools.OrganizationWS.V_EMPLOYEEPOST ent = lookup.SelectedObj as SMT.Saas.Tools.OrganizationWS.V_EMPLOYEEPOST; ; if (ent != null) { lkEmployeeName.DataContext = ent.T_HR_EMPLOYEE; FormMaster.CHECKPERSON = ent.T_HR_EMPLOYEE.EMPLOYEEID; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkCustomSalary_FindClick(object sender, EventArgs e) { string filter = ""; ObservableCollection<object> paras = new ObservableCollection<object>(); Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("GUERDONNAME", "GUERDONNAME"); cols.Add("GUERDONSUM", "GUERDONSUM"); cols.Add("UPDATEDATE", "UPDATEDATE"); filter += "OWNERCOMPANYID==@" + paras.Count().ToString(); paras.Add(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID); LookupForm lookup = new LookupForm(EntityNames.CustomGuerdonSet, typeof(List<T_HR_CUSTOMGUERDONSET>), cols, filter, paras); lookup.TitleContent = Utility.GetResourceStr("CUSTOMSALARY"); lookup.SelectedClick += (o, ev) => { T_HR_CUSTOMGUERDONSET ent = lookup.SelectedObj as T_HR_CUSTOMGUERDONSET; if (!GetExit(ent.GUERDONNAME)) { if (ent != null) { lkCustomSalary.DataContext = ent; T_HR_SALARYSTANDARD entSALARYSTANDARD = new T_HR_SALARYSTANDARD(); entSALARYSTANDARD.SALARYSTANDARDID = SAVEID; customGuerdon.CUSTOMGUERDONID = Guid.NewGuid().ToString(); customGuerdon.T_HR_SALARYSTANDARD = entSALARYSTANDARD; customGuerdon.T_HR_CUSTOMGUERDONSET = ent; customGuerdon.SUM = ent.GUERDONSUM; customGuerdon.CREATEDATE = System.DateTime.Now; customGuerdon.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; customGuerdon.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; customGuerdon.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; customGuerdon.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; customGuerdon.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; customGuerdon.CREATECOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; customGuerdon.CREATEDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; customGuerdon.CREATEPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; client.CustomGuerdonAddAsync(customGuerdon); RefreshUI(RefreshedTypes.ProgressBar); } } else { ent.GUERDONNAME = "";// Utility.GetResourceStr("ALREADYEXISTS"); lkCustomSalary.DataContext = ent; Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ALREADYEXISTS")); } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkDictionaryType_FindClick(object sender, EventArgs e) { LookUp lkDictionaryType = sender as LookUp; Dictionary<string, string> para = new Dictionary<string, string>(); para.Add("SysDictionary", "2"); string[] cols = { "DICTIONCATEGORY", "DICTIONCATEGORYNAME" }; LookupForm lookups = new LookupForm(EntityNames.SysDictionary, typeof(List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>), cols, para); lookups.SelectedClick += (o, ev) => { SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY ent = lookups.SelectedObj as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY; //if (ent != null) //{ lkDictionaryType.DataContext = ent; //} }; lookups.Show(); }
/// <summary> /// 选择考勤方案 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lkAttSol_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("ATTENDANCESOLUTIONNAME", "ATTENDANCESOLUTIONNAME"); cols.Add("ATTENDANCETYPE", "ATTENDANCETYPE,ATTENDANCETYPE,DICTIONARYCONVERTER"); cols.Add("CARDTYPE", "CARDTYPE,CARDTYPE,DICTIONARYCONVERTER"); cols.Add("WORKDAYTYPE", "WORKDAYTYPE,WORKDAYTYPE,DICTIONARYCONVERTER"); cols.Add("WORKMODE", "WORKMODE"); string filter = ""; System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); filter += " CHECKSTATE=@" + paras.Count().ToString() + ""; paras.Add("2"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.AttendanceSolution, typeof(T_HR_ATTENDANCESOLUTION[]), cols, filter, paras); lookup.SelectedClick += (o, ev) => { T_HR_ATTENDANCESOLUTION ent = lookup.SelectedObj as T_HR_ATTENDANCESOLUTION; if (ent != null) { lkAttSol.DataContext = ent; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void btnStandardAdd_Click(object sender, RoutedEventArgs e) { T_HR_SALARYSOLUTIONSTANDARD solutionSatandard = new T_HR_SALARYSOLUTIONSTANDARD(); if (SalarySolution != null && !string.IsNullOrEmpty(SalarySolution.SALARYSOLUTIONID)) { solutionSatandard.T_HR_SALARYSOLUTION = new T_HR_SALARYSOLUTION(); solutionSatandard.T_HR_SALARYSOLUTION.SALARYSOLUTIONID = SalarySolution.SALARYSOLUTIONID; Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("SALARYSTANDARDNAME", "SALARYSTANDARDNAME"); cols.Add("POSTSALARY", "POSTSALARY"); cols.Add("SECURITYALLOWANCE", "SECURITYALLOWANCE"); cols.Add("HOUSINGALLOWANCE", "HOUSINGALLOWANCE"); cols.Add("AREADIFALLOWANCE", "AREADIFALLOWANCE"); System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); string filter = ""; filter = "CHECKSTATE==@" + paras.Count; paras.Add(Convert.ToInt16(CheckStates.Approved).ToString()); LookupForm lookup = new LookupForm(EntityNames.SalaryStandard, typeof(List<T_HR_SALARYSTANDARD>), cols); //LookupForm lookup = new LookupForm(EntityNames.SalaryStandard, // typeof(List<T_HR_SALARYSTANDARD>), cols, filter, paras); lookup.SelectedClick += (o, ev) => { T_HR_SALARYSTANDARD ent = lookup.SelectedObj as T_HR_SALARYSTANDARD; if (ent != null) { solutionSatandard.SOLUTIONSTANDARDID = Guid.NewGuid().ToString(); solutionSatandard.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; solutionSatandard.CREATEDATE = System.DateTime.Now; solutionSatandard.T_HR_SALARYSTANDARD = new T_HR_SALARYSTANDARD(); solutionSatandard.T_HR_SALARYSTANDARD.SALARYSTANDARDID = ent.SALARYSTANDARDID; client.SalarySolutionStandardAddAsync(solutionSatandard); } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } }
private void LookUp_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("POSTCODE", "T_HR_POSTDICTIONARY.POSTCODE"); cols.Add("POSTNAME", "T_HR_POSTDICTIONARY.POSTNAME"); LookupForm lookup = new LookupForm(EntityNames.Post, typeof(T_HR_POST[]), cols); lookup.SelectedClick += (o, ev) => { T_HR_POST ent = lookup.SelectedObj as T_HR_POST; if (ent != null) { lkPost.DataContext = ent; HandlePostChanged(ent); } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) =>{}); }
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) => { }); }
private void lkOTReward_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("OVERTIMEREWARDNAME", "OVERTIMEREWARDNAME"); cols.Add("USUALOVERTIMEPAYRATE", "USUALOVERTIMEPAYRATE"); cols.Add("WEEKENDPAYRATE", "WEEKENDPAYRATE"); cols.Add("VACATIONPAYRATE", "VACATIONPAYRATE"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.OvertimeReward, typeof(T_HR_OVERTIMEREWARD[]), cols); lookup.SelectedClick += (o, ev) => { T_HR_OVERTIMEREWARD ent = lookup.SelectedObj as T_HR_OVERTIMEREWARD; if (ent != null) { lkOTReward.DataContext = ent; txtUsualOverTimePayRate.Text = ent.USUALOVERTIMEPAYRATE.Value.ToString(); txtVacationPayRate.Text = ent.VACATIONPAYRATE.Value.ToString(); txtWeekendPayRate.Text = ent.WEEKENDPAYRATE.Value.ToString(); txtRemark.Text = ent.REMARK == null ? string.Empty : ent.REMARK; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkSalarySystem_FindClick(object sender, EventArgs e) { 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_SALARYSYSTEM ent = lookup.SelectedObj as T_HR_SALARYSYSTEM; if (ent != null) { lkSalarySystem.DataContext = ent; SalarySolution.T_HR_SALARYSYSTEM = new T_HR_SALARYSYSTEM(); SalarySolution.T_HR_SALARYSYSTEM.SALARYSYSTEMID = ent.SALARYSYSTEMID; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
private void lkSubject_FindClick(object sender, EventArgs e) { if (lkOrg.DataContext == null) { return; } Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("SUBJECTCODE", "SUBJECTCODE"); cols.Add("SUBJECTNAME", "SUBJECTNAME"); StringBuilder strfilter = new StringBuilder(); ObservableCollection<object> objArgs = new ObservableCollection<object>(); switch (strOrgType.ToUpper()) { case "COMPANY": strfilter.Append(" OWNERCOMPANYID == @0"); break; case "DEPARTMENT": strfilter.Append(" OWNERDEPARTMENTID == @0"); break; case "POST": strfilter.Append(" OWNERPOSTID == @0"); break; case "PERSONNAL": strfilter.Append(" OWNERPOSTID == @0"); break; } if (strOrgType.ToUpper() == "PERSONNAL" && lkOrg.DataContext != null) { SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEE entEmp = lkOrg.DataContext as SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEE; if (entEmp != null) { strOrgId = entEmp.OWNERPOSTID; } } objArgs.Add(strOrgId); LookupForm lookup = new LookupForm(FBAEnumsBLLPrefixNames.Execution, typeof(T_FB_SUBJECT[]), cols, "MonthlyBudgetAnalysis", strfilter.ToString(), objArgs); lookup.SelectedClick += (o, ev) => { ObservableCollection<object> entList = lookup.SelectedObj as ObservableCollection<object>; StringBuilder strIDlist = new StringBuilder(); StringBuilder strNamelist = new StringBuilder(); foreach (var obj in entList) { T_FB_SUBJECT ent = obj as T_FB_SUBJECT; strIDlist.Append(ent.SUBJECTID + ";"); strNamelist.Append(ent.SUBJECTNAME + ";"); } strSearchSubjects = strIDlist.ToString(); lkSubject.TxtLookUp.Text = strNamelist.ToString(); }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
void btnNew_Click(object sender, RoutedEventArgs e) { string filter = ""; ObservableCollection<object> paras = new ObservableCollection<object>(); T_HR_SALARYSTANDARDITEM salarystandarditem = new T_HR_SALARYSTANDARDITEM(); T_HR_SALARYSTANDARD salarystandard = new T_HR_SALARYSTANDARD(); salarystandard.SALARYSTANDARDID = savesid; Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("SALARYITEMNAME", "SALARYITEMNAME"); cols.Add("GUERDONSUM", "GUERDONSUM"); cols.Add("CALCULATEFORMULA", "CALCULATEFORMULA"); RefreshUI(RefreshedTypes.ProgressBar); filter += "CREATECOMPANYID==@" + paras.Count().ToString(); paras.Add(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID); LookupForm lookup = new LookupForm(EntityNames.SalaryItemSet, typeof(List<T_HR_SALARYITEM>), cols, filter,paras); lookup.TitleContent = Utility.GetResourceStr("SALARYITEM"); lookup.SelectedClick += (o, ev) => { T_HR_SALARYITEM ent = lookup.SelectedObj as T_HR_SALARYITEM; if (ent != null) { salarystandarditem.STANDRECORDITEMID = Guid.NewGuid().ToString(); salarystandarditem.T_HR_SALARYITEM = ent; salarystandarditem.T_HR_SALARYSTANDARD = salarystandard; salarystandarditem.SUM = ent.GUERDONSUM.ToString(); salarystandarditem.REMARK = ent.REMARK; salarystandarditem.CREATEDATE = System.DateTime.Now; salarystandarditem.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; client.SalaryStandardItemAddAsync(salarystandarditem); } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); #region ---- //System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); ////string filter = ""; ////filter = "CHECKSTATE==@" + paras.Count; //paras.Add(Convert.ToInt16(CheckStates.Approved).ToString()); //LookupForm lookup = new LookupForm(EntityNames.SalaryStandard, // typeof(List<T_HR_SALARYSTANDARD>), cols, filter, paras); #endregion }
private void LookUp_FindClick(object sender, EventArgs e) { string filter = ""; ObservableCollection<object> paras = new ObservableCollection<object>(); Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("SALARYITEMNAME", "SALARYITEMNAME"); filter += "CREATECOMPANYID==@" + paras.Count().ToString(); paras.Add(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID); LookupForm lookup = new LookupForm(EntityNames.SalaryItemSet, typeof(List<T_HR_SALARYITEM>), cols, filter, paras); lookup.TitleContent = Utility.GetResourceStr("SALARYITEM"); lookup.SelectedClick += (o, ev) => { T_HR_SALARYITEM ent = lookup.SelectedObj as T_HR_SALARYITEM; if (ent != null) { salarySolutionItem.T_HR_SALARYITEM = new T_HR_SALARYITEM(); salarySolutionItem.T_HR_SALARYITEM.SALARYITEMID = ent.SALARYITEMID; lkSolutionItem.DataContext = ent; } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lkDefaultShiftName_FindClick(object sender, EventArgs e) { Dictionary<string, string> cols = new Dictionary<string, string>(); cols.Add("SHIFTNAME", "SHIFTNAME"); cols.Add("WORKTIME", "WORKTIME"); LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.ShiftDefine, typeof(T_HR_SHIFTDEFINE[]), cols); lookup.SelectedClick += (o, ev) => { T_HR_SHIFTDEFINE ent = lookup.SelectedObj as T_HR_SHIFTDEFINE; if (ent != null) { lkDefaultShiftName.DataContext = ent; MakeDetailItemSource(); } }; lookup.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }