Esempio n. 1
0
        public static List <SalaryAdjustment> RePackage(SqlDataReader dr)
        {
            var salaryAdjustmentList = new List <SalaryAdjustment>();

            if (dr.HasRows)
            {
                var salaryAdjustmentSalaryAdjustmentId = dr.GetOrdinal("SalaryAdjustmentId");
                var salaryAdjustmentPercentIncrease    = dr.GetOrdinal("PercentIncrease");
                var salaryAdjustmentEffectiveDate      = dr.GetOrdinal("EffectiveDate");

                while (dr.Read())
                {
                    var salaryAdjustment = new SalaryAdjustment();

                    salaryAdjustment.SalaryAdjustmentId = Convert.ToInt32(dr[salaryAdjustmentSalaryAdjustmentId]);
                    salaryAdjustment.PercentIncrease    = Convert.ToDecimal(dr[salaryAdjustmentPercentIncrease]);
                    salaryAdjustment.EffectiveDate      = Convert.ToDateTime(dr[salaryAdjustmentEffectiveDate]);

                    salaryAdjustmentList.Add(salaryAdjustment);
                }
            }
            return(salaryAdjustmentList);
        }
Esempio n. 2
0
 public static bool Create(List <int> employeeIdList, SalaryAdjustment salaryAdj)
 {
     return(SalaryAdjustmentSQL.Create(employeeIdList, salaryAdj));
 }
Esempio n. 3
0
 public static List <SalaryAdjustment> GetSalaryAdjustmentsByEmpId(int employeeId, SalaryAdjustmentGetType type)
 {
     return(SalaryAdjustment.RePackage(SalaryAdjustmentSQL.GetSalaryAdjustmentByEmpId(employeeId, type)));
 }
Esempio n. 4
0
 public static List <int> GetEmployeeIds(int salaryAdjId)
 {
     return(SalaryAdjustment.RePackageEmpIdList(SalaryAdjustmentSQL.GetEmployeeIds(salaryAdjId)));
 }