Пример #1
0
        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) => { });
        }
Пример #2
0
        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) => { });
        }