/// <summary>
        /// get pension by id
        /// </summary>
        /// <param name="Id">pension id</param>
        /// <returns>pension state</returns>
        public static Pension Retrieve(int Id)
        {
            DataRow   drPen   = HRSQL.getPensionInfo(Id).Rows[0];
            DataTable dtGross = HRSQL.getTopGross(Id);

            return(RePackager(drPen, dtGross));
        }
示例#2
0
        /// <summary>
        /// Fetchs all employee emails that have requested an email when paid
        /// </summary>
        /// <returns>list of emails</returns>
        public static List <String> PayrollEmails()
        {
            List <String> emails = new List <String>();
            DataTable     dt     = HRSQL.getPayrollEmail();

            foreach (DataRow row in dt.Rows)
            {
                emails.Add(row[0].ToString());
            }
            return(emails);
        }
示例#3
0
        /// <summary>
        /// Gives an employee a raise
        /// </summary>
        /// <param name="raise">All info needed for a raise</param>
        /// <returns>Updated raise info</returns>
        public static PayRaise UpdateRaise(IPayRaise raise)
        {
            raise = HRSQL.CommitRaise(raise, false);
            PayRaise objRaise = PayFactory.Create();

            objRaise.empId      = raise.empId;
            objRaise.payIn      = raise.payIn;
            objRaise.oldPay     = raise.oldPay;
            objRaise.oldAffDate = raise.oldAffDate;
            objRaise.newPay     = raise.newPay;
            objRaise.newAffDate = raise.newAffDate;

            return(objRaise);
        }
示例#4
0
 public static Boolean ModifyEmployee(Employee emp)
 {
     return(HRSQL.ModifyEmployee(emp));
 }
示例#5
0
 public static Boolean ValidatePayrollCode(string entryCode)
 {
     return(HRSQL.ValidatePayrollCode(entryCode));
 }
示例#6
0
 public static Boolean CalculatePayroll()
 {
     return(HRSQL.CalculatePayroll());
 }
示例#7
0
 public static Boolean HasCalculatePayrollBeenRun()
 {
     return(HRSQL.HasCalculatePayrollBeenRun());
 }
示例#8
0
 public static Boolean CreateCostOfLivingIncrease(Double percentage, DateTime dateOfIncrease)
 {
     return(HRSQL.CreateCostOfLivingIncrease(percentage, dateOfIncrease));
 }
示例#9
0
 public static Boolean CreatePerformanceIncrease(int empID, Double percentage, DateTime dateOfIncrease)
 {
     return(HRSQL.CreatePerformanceIncrease(empID, percentage, dateOfIncrease));
 }
示例#10
0
 /// <summary>
 /// Checks that it is a pay date
 /// </summary>
 /// <returns>passcode for checking</returns>
 public static String isPaydate()
 {
     return(HRSQL.PayrollCheck());
 }
示例#11
0
 /// <summary>
 /// Gives all employees and departments a living cost raise
 /// </summary>
 /// <param name="raise">All info for a raise</param>
 public static void UpdateAllRaises(IPayRaise raise)
 {
     raise = HRSQL.CommitRaise(raise, true);
 }
示例#12
0
 /// <summary>
 /// Sees when the next pay will be
 /// </summary>
 /// <returns>paydate</returns>
 public static DateTime nextPaydate()
 {
     return(Convert.ToDateTime(HRSQL.nextPaydate().Rows[0][0]));
 }
示例#13
0
 /// <summary>
 /// Executes the bi-weekly pay
 /// </summary>
 /// <returns>Paystubs</returns>
 public static DataTable generatePay()
 {
     return(HRSQL.PayrollExecute());
 }
示例#14
0
 public static Boolean CreateNewSickDay(SickDays sickDays)
 {
     return(HRSQL.CreateNewSickDay(sickDays));
 }
示例#15
0
 public static int CreateEmp(Employee emp)
 {
     return(HRSQL.CreateNewEmployee(emp));
 }
示例#16
0
 public static Boolean UpdateEmployeeEmp(Employee emp)
 {
     return(HRSQL.UpdateEmployeeEmp(emp));
 }
示例#17
0
 /// <summary>
 /// inserts a sickday into the db
 /// </summary>
 /// <param name="sick">all state needed for a sickday record</param>
 /// <returns>number of sickdays total</returns>
 public static int Insert(Sickday sick)
 {
     return(HRSQL.InsertSickday(sick));
 }