public IndividualAdjustMonthlySalaryForm(string salary_plan, string group, bool isCheck)
            : this()
        {
            this.salary_plan = salary_plan;
            this.group       = group;
            this.isCheck     = isCheck;
            //获取公司代码
            company_code = PsHelper.GetCompanyCode(salary_plan);
            //获取职等(默认自动为每个职等建立一个群组)
            jobgrade = JobGrade.GetJobGrade(salary_plan, group);
            //获取期号
            int lastestPeriodNonYear = MonthlySalary.GetLastestPeriodNonYear(salary_plan, group);

            period = lastestPeriodNonYear == -1 ? 100001 : lastestPeriodNonYear + 1;

            //通过薪等编号获取员工名单
            emp_list = GetEmployeeList();
            //设置标记, 标记有异动的人员
            foreach (EmployeeInfo emp in emp_list)
            {
                MonthlySalary effectiveMonthlySalary = MonthlySalary.GetEffective(emp.员工编号, DateTime.Today);
                if (effectiveMonthlySalary == null)
                {
                    emp.标记 = true;
                }
            }
        }
        public AdjustMonthlySalaryForm(string salary_plan, string group, int year, SemiannualType st, bool isCheck)
            : this()
        {
            this.salary_plan = salary_plan;
            this.group       = group;
            this.year        = year;
            this.sntype      = st;
            this.isCheck     = isCheck;

            this.period = year * 10 + (byte)st;
            //获取公司代码
            company_code = PsHelper.GetCompanyCode(salary_plan);
            //获取职等(默认自动为每个职等建立一个群组)
            jobgrade = JobGrade.GetJobGrade(salary_plan, group);

            //通过薪等编号获取员工名单
            emp_list = GetEmployeeList();
            //设置标记, 标记有异动的人员
            foreach (EmployeeInfo emp in emp_list)
            {
                MonthlySalary effectiveMonthlySalary = MonthlySalary.GetEffective(emp.员工编号, DateTime.Today);
                if (effectiveMonthlySalary == null)
                {
                    emp.标记 = true;
                }
            }
        }
        private MonthlySalaryInput AddRow(int order, EmployeeInfo emp)
        {
            string lastSalaryGrade = SalaryResult.GetLastestSalaryGrade(emp.员工编号);

            if (lastSalaryGrade == null)
            {
                lastSalaryGrade = emp.职等;
            }

            //2018-7-11 软件开发人员的职等的专门的,不同于其他管理人员
            if (salary_plan == "软件开发" && jobgrade != null)
            {
                lastSalaryGrade = jobgrade.称;
            }
            bool copyEffective = false;
            //将当前执行的标准带过来
            MonthlySalary effectiveMonthlySalary = MonthlySalary.GetEffective(emp.员工编号, DateTime.Today);

            if (effectiveMonthlySalary != null)
            {
                if (effectiveMonthlySalary.薪酬体系 == salary_plan && effectiveMonthlySalary.职等 == lastSalaryGrade)
                {
                    copyEffective = true;
                }
                //如果是管培生或副总以上人员,都带出来
                if (jobgrade == null)
                {
                    copyEffective = true;
                }
            }
            //创建员工月薪记录
            MonthlySalaryInput ms = MonthlySalaryInput.AddMonthlySalaryInput(emp.员工编号, period, isCheck, copyEffective);

            ms.序号   = order;
            ms.薪酬体系 = salary_plan;
            ms.职等   = lastSalaryGrade;
            ms.群组   = group;
            //2018-4-23 新建的记录备注不要带过来
            if (ms.录入人.Trim() == "")
            {
                ms.开始执行日期 = DateTime.MinValue;
                ms.调整类型   = "";
                ms.备注     = "";
            }
            if (jobgrade == null)
            {
                ms.执行_月薪类型 = "特资";
            }
            ms.Save();
            return(ms);
        }
Esempio n. 4
0
        protected void LoadData()
        {
            CreateWaitDialog("正在查询...", "请稍等");

            List <EmployeeInfo> emp_list = GetEmployeeList();

            //排序
            emp_list = emp_list.OrderBy(a => a.部门序号).ThenBy(a => a.员工序号).ToList();

            List <MonthlySalary> monthly_salary_list = new List <MonthlySalary>();

            foreach (EmployeeInfo emp in emp_list)
            {
                //获取员工的执行月薪记录
                MonthlySalary ms = MonthlySalary.GetEffective(emp.员工编号, DateTime.Today);
                //如果没有找到,构造一个空的实例
                if (ms == null)
                {
                    ms      = new MonthlySalary();
                    ms.员工编号 = emp.员工编号;
                }
                monthly_salary_list.Add(ms);
            }
            //排序
            monthly_salary_list = monthly_salary_list.OrderByDescending(a => a.执行_月薪).ToList();
            int order = 1;

            foreach (MonthlySalary item in monthly_salary_list)
            {
                item.序号 = order++;
                if (jobgrade == null)
                {
                    item.执行_月薪类型 = "特资";
                }
            }

            SetWaitDialogCaption("正在加载...");

            CloseWaitDialog();
            gridControl1.DataSource = monthly_salary_list;
            gridControl1.RefreshDataSource();

            btn导出.Enabled = true;

            CloseWaitDialog();
        }
        List <MonthlySalaryInput> CreateEditingRows()
        {
            List <MonthlySalaryInput> list = new List <MonthlySalaryInput>();

            //排序
            emp_list = emp_list.OrderBy(a => a.部门序号).ThenBy(a => a.机构序号).ThenBy(a => a.机构名称).ThenBy(a => a.员工序号).ToList();
            DateTime lastSalaryDate = SalaryResult.GetLastSalaryDate();
            int      order          = 1;

            foreach (EmployeeInfo emp in emp_list)
            {
                //2018-5-25 只创建没有月薪标准的人员
                //将当前执行的标准带过来
                MonthlySalary effectiveMonthlySalary = MonthlySalary.GetEffective(emp.员工编号, lastSalaryDate);
                if (effectiveMonthlySalary != null)
                {
                    continue;
                }

                string lastSalaryGrade = SalaryResult.GetLastestSalaryGrade(emp.员工编号);
                if (lastSalaryGrade == null)
                {
                    lastSalaryGrade = emp.职等;
                }

                //创建员工月薪记录
                MonthlySalaryInput ms = MonthlySalaryInput.AddMonthlySalaryInput(emp.员工编号, period, isCheck, true);
                ms.序号   = order;
                ms.薪酬体系 = salary_plan;
                ms.职等   = lastSalaryGrade;
                ms.群组   = group;
                //2018-4-23 新建的记录备注不要带过来
                if (ms.录入人.Trim() == "")
                {
                    ms.开始执行日期 = DateTime.MinValue;
                    ms.调整类型   = "";
                    ms.备注     = "";
                }
                ms.Save();
                list.Add(ms);
                order++;
            }

            return(list);
        }
Esempio n. 6
0
        //获取员工的月薪资料
        bool ReadMonthlySalaryData()
        {
            MonthlySalary ms = MonthlySalary.GetEffective(this.员工编号, 期间开始);

            if (ms == null)
            {
                return(false);
            }

            薪酬体系   = ms.薪酬体系;
            评定职等   = ms.职等;
            评定职级   = ms.评定_职级;
            执行职级   = ms.执行_职级;
            标准职级月薪 = ms.评定_月薪;
            执行职级月薪 = ms.执行_月薪;
            月薪类型   = ms.执行_月薪类型;

            return(true);
        }
        private void OnEmployeeSelectd(object sender, EmployeeInfo emp)
        {
            if (monthly_salary_list.Find(a => a.员工编号 == emp.员工编号) == null)
            {
                string lastSalaryGrade = SalaryResult.GetLastestSalaryGrade(emp.员工编号);
                if (lastSalaryGrade == null)
                {
                    lastSalaryGrade = emp.职等;
                }

                bool copyEffective = false;
                //将当前执行的标准带过来
                MonthlySalary effectiveMonthlySalary = MonthlySalary.GetEffective(emp.员工编号, DateTime.Today);
                if (effectiveMonthlySalary != null)
                {
                    if (effectiveMonthlySalary.薪酬体系 == salary_plan && effectiveMonthlySalary.职等 == lastSalaryGrade)
                    {
                        copyEffective = true;
                    }
                    //如果是管培生或副总以上人员,都带出来
                    if (jobgrade == null)
                    {
                        copyEffective = true;
                    }
                }
                //创建员工月薪记录
                MonthlySalaryInput item = MonthlySalaryInput.AddMonthlySalaryInput(emp.员工编号, period, isCheck, copyEffective);
                item.序号   = advBandedGridView1.RowCount;
                item.薪酬体系 = salary_plan;
                item.职等   = emp.职等;
                item.群组   = group;
                //2018-4-23 调整类型和备注不要带过来
                item.调整类型 = "";
                item.备注   = "";
                item.Save();

                monthly_salary_list.Add(item);
                UpdateRowNumber();
                gridControl1.RefreshDataSource();
                advBandedGridView1.FocusedRowHandle = advBandedGridView1.RowCount - 1;
            }
        }
Esempio n. 8
0
        private void EditSalaryStructureForm_Load(object sender, EventArgs e)
        {
            this.Text = "员工薪酬结构录入 - " + currSalaryStructureEntry.员工编号 + " - " + (currSalaryStructureEntry.是验证录入 ? "验证录入" : "初次录入");

            emp = currSalaryStructureEntry.员工信息;
            ms  = MonthlySalary.GetEffective(emp.员工编号, DateTime.Today);

            if (ms == null)
            {
                MessageBox.Show("找不到该员工的执行月薪标准,请录入标准后再试");
                Close();
            }

            满勤奖标准    = PsHelper.GetFullAttendancePayFromCache(emp.薪资体系, emp.薪等, new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1));
            未休年休假工资  = PsHelper.GetVacPayFromCache(emp.薪资体系, emp.薪等, new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1));
            交通餐饮补助标准 = PsHelper.GetTrafficSubsidies(emp.员工编号, new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1));

            lbl用户.Text   = currSalaryStructureEntry.员工信息.姓名;
            lbl员工编号.Text = currSalaryStructureEntry.员工编号;
            comboBoxEdit结构类型.EditValue = currSalaryStructureEntry.类型;

            LoadData();
        }