/// <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)); }
/// <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); }
/// <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); }
public static Boolean ModifyEmployee(Employee emp) { return(HRSQL.ModifyEmployee(emp)); }
public static Boolean ValidatePayrollCode(string entryCode) { return(HRSQL.ValidatePayrollCode(entryCode)); }
public static Boolean CalculatePayroll() { return(HRSQL.CalculatePayroll()); }
public static Boolean HasCalculatePayrollBeenRun() { return(HRSQL.HasCalculatePayrollBeenRun()); }
public static Boolean CreateCostOfLivingIncrease(Double percentage, DateTime dateOfIncrease) { return(HRSQL.CreateCostOfLivingIncrease(percentage, dateOfIncrease)); }
public static Boolean CreatePerformanceIncrease(int empID, Double percentage, DateTime dateOfIncrease) { return(HRSQL.CreatePerformanceIncrease(empID, percentage, dateOfIncrease)); }
/// <summary> /// Checks that it is a pay date /// </summary> /// <returns>passcode for checking</returns> public static String isPaydate() { return(HRSQL.PayrollCheck()); }
/// <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); }
/// <summary> /// Sees when the next pay will be /// </summary> /// <returns>paydate</returns> public static DateTime nextPaydate() { return(Convert.ToDateTime(HRSQL.nextPaydate().Rows[0][0])); }
/// <summary> /// Executes the bi-weekly pay /// </summary> /// <returns>Paystubs</returns> public static DataTable generatePay() { return(HRSQL.PayrollExecute()); }
public static Boolean CreateNewSickDay(SickDays sickDays) { return(HRSQL.CreateNewSickDay(sickDays)); }
public static int CreateEmp(Employee emp) { return(HRSQL.CreateNewEmployee(emp)); }
public static Boolean UpdateEmployeeEmp(Employee emp) { return(HRSQL.UpdateEmployeeEmp(emp)); }
/// <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)); }