Пример #1
0
        /// <summary>
        /// 选择离职人员
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btHistory_Click(object sender, RoutedEventArgs e)
        {
            Form.Salary.ResignForm form    = new SMT.HRM.UI.Form.Salary.ResignForm();
            EntityBrowser          browser = new EntityBrowser(form);

            form.SaveClicked += (obj, ev) =>
            {
                if (form.SelectedEmployees != null)
                {
                    foreach (var ent in form.SelectedEmployees)
                    {
                        var tmp = EmployeeAddsumInfoList.Where(s => s.EMPLOYEEID == ent.EMPLOYEEID).FirstOrDefault();
                        if (tmp != null)
                        {
                            continue;
                        }

                        V_EmployeeAddsumView addSumInfo = new V_EmployeeAddsumView();
                        addSumInfo.ADDSUMID       = Guid.NewGuid().ToString();
                        addSumInfo.CompanyName    = ent.CompanyName;
                        addSumInfo.PostName       = ent.PostName;
                        addSumInfo.DepartmentName = ent.DepartmentName;
                        addSumInfo.EMPLOYEECODE   = ent.EMPLOYEECODE;
                        addSumInfo.EMPLOYEEID     = ent.EMPLOYEEID;
                        //addSumInfo.EMPLOYEENAME = ent.EMPLOYEENAME;
                        addSumInfo.OWNERID           = ent.EMPLOYEEID;
                        addSumInfo.OWNERCOMPANYID    = ent.OWNERCOMPANYID;
                        addSumInfo.OWNERDEPARTMENTID = ent.OWNERDEPARTMENTID;
                        addSumInfo.OWNERPOSTID       = ent.OWNERPOSTID;
                        //去掉PROJECTNAME,先用该字段显示员工姓名(形式:姓名-部门-公司)
                        //addSumInfo.PROJECTNAME = ent.EMPLOYEENAME + "-" + ent.PostName + "-" + ent.DepartmentName + "-" + ent.CompanyName;
                        string name = ent.EMPLOYEENAME;// +"-" + ent.PostName + "-" + ent.DepartmentName + "-" + ent.CompanyName;
                        addSumInfo.EMPLOYEENAME = name;
                        EmployeeAddsumInfoList.Add(addSumInfo);
                    }
                    DtGrid.ItemsSource = EmployeeAddsumInfoList;
                    SetProjectMoneySum();
                }
            };
            //  form.MinWidth = 450;
            form.Height = 400;
            browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
        }
Пример #2
0
        /// <summary>
        /// 选择离职人员
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btHistory_Click(object sender, RoutedEventArgs e)
        {
            Form.Salary.ResignForm form = new SMT.HRM.UI.Form.Salary.ResignForm();
            EntityBrowser browser = new EntityBrowser(form);
            form.SaveClicked += (obj, ev) =>
            {
                if (form.SelectedEmployees != null)
                {
                    foreach (var ent in form.SelectedEmployees)
                    {
                        var tmp = EmployeeAddsumInfoList.Where(s => s.EMPLOYEEID == ent.EMPLOYEEID).FirstOrDefault();
                        if (tmp != null)
                        {
                            continue;
                        }

                        V_EmployeeAddsumView addSumInfo = new V_EmployeeAddsumView();
                        addSumInfo.ADDSUMID = Guid.NewGuid().ToString();
                        addSumInfo.CompanyName = ent.CompanyName;
                        addSumInfo.PostName = ent.PostName;
                        addSumInfo.DepartmentName = ent.DepartmentName;
                        addSumInfo.EMPLOYEECODE = ent.EMPLOYEECODE;
                        addSumInfo.EMPLOYEEID = ent.EMPLOYEEID;
                        //addSumInfo.EMPLOYEENAME = ent.EMPLOYEENAME;
                        addSumInfo.OWNERID = ent.EMPLOYEEID;
                        addSumInfo.OWNERCOMPANYID = ent.OWNERCOMPANYID;
                        addSumInfo.OWNERDEPARTMENTID = ent.OWNERDEPARTMENTID;
                        addSumInfo.OWNERPOSTID = ent.OWNERPOSTID;
                        //去掉PROJECTNAME,先用该字段显示员工姓名(形式:姓名-部门-公司)
                        //addSumInfo.PROJECTNAME = ent.EMPLOYEENAME + "-" + ent.PostName + "-" + ent.DepartmentName + "-" + ent.CompanyName;
                        string name = ent.EMPLOYEENAME;// +"-" + ent.PostName + "-" + ent.DepartmentName + "-" + ent.CompanyName;
                        addSumInfo.EMPLOYEENAME = name;
                        EmployeeAddsumInfoList.Add(addSumInfo);
                    }
                    DtGrid.ItemsSource = EmployeeAddsumInfoList;
                    SetProjectMoneySum();
                }
            };
            //  form.MinWidth = 450;
            form.Height = 400;
            browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });

        }