Exemplo n.º 1
0
        /// <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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 public static Boolean ModifyEmployee(Employee emp)
 {
     return(HRSQL.ModifyEmployee(emp));
 }
Exemplo n.º 5
0
 public static Boolean ValidatePayrollCode(string entryCode)
 {
     return(HRSQL.ValidatePayrollCode(entryCode));
 }
Exemplo n.º 6
0
 public static Boolean CalculatePayroll()
 {
     return(HRSQL.CalculatePayroll());
 }
Exemplo n.º 7
0
 public static Boolean HasCalculatePayrollBeenRun()
 {
     return(HRSQL.HasCalculatePayrollBeenRun());
 }
Exemplo n.º 8
0
 public static Boolean CreateCostOfLivingIncrease(Double percentage, DateTime dateOfIncrease)
 {
     return(HRSQL.CreateCostOfLivingIncrease(percentage, dateOfIncrease));
 }
Exemplo n.º 9
0
 public static Boolean CreatePerformanceIncrease(int empID, Double percentage, DateTime dateOfIncrease)
 {
     return(HRSQL.CreatePerformanceIncrease(empID, percentage, dateOfIncrease));
 }
Exemplo n.º 10
0
 /// <summary>
 /// Checks that it is a pay date
 /// </summary>
 /// <returns>passcode for checking</returns>
 public static String isPaydate()
 {
     return(HRSQL.PayrollCheck());
 }
Exemplo n.º 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);
 }
Exemplo n.º 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]));
 }
Exemplo n.º 13
0
 /// <summary>
 /// Executes the bi-weekly pay
 /// </summary>
 /// <returns>Paystubs</returns>
 public static DataTable generatePay()
 {
     return(HRSQL.PayrollExecute());
 }
Exemplo n.º 14
0
 public static Boolean CreateNewSickDay(SickDays sickDays)
 {
     return(HRSQL.CreateNewSickDay(sickDays));
 }
Exemplo n.º 15
0
 public static int CreateEmp(Employee emp)
 {
     return(HRSQL.CreateNewEmployee(emp));
 }
Exemplo n.º 16
0
 public static Boolean UpdateEmployeeEmp(Employee emp)
 {
     return(HRSQL.UpdateEmployeeEmp(emp));
 }
Exemplo n.º 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));
 }