示例#1
0
        /// <summary>
        /// The Main method for Payroll Processing.
        /// Process Payroll for the given week
        /// </summary>
        /// <param name="date"></param>
        /// <param name="payrollid"></param>
        /// <param name="FranchiseId"></param>
        /// <returns></returns>
        public ActionResult ProcessWeek(DateTime date, int payrollid, string FranchiseId)
        {
            SiteBlue.Business.Payroll.PayrollService payrollService =
                SiteBlue.Business.Payroll.PayrollService.Create <SiteBlue.Business.Payroll.PayrollService>(UserInfo.UserKey);
            OperationResult <SiteBlue.Business.Payroll.Payroll> result = payrollService.ProcessPayrollForWeek(date, payrollid, FranchiseId, true, UserInfo.UserKey);

            return(RedirectToAction("PayrollProcessing", new { dt = date }));
        }
示例#2
0
        public ActionResult Lock_SelectedWeek(DateTime date, int payrollid, string FranchiseId)
        {
            DateTime dateToLockPayroll = DateTime.Now.Date;

            SiteBlue.Business.Payroll.PayrollService payrollService =
                SiteBlue.Business.Payroll.PayrollService.Create <SiteBlue.Business.Payroll.PayrollService>(UserInfo.UserKey);
            OperationResult <DateTime> result =
                payrollService.LockPayrollForWeekOnDate(date, dateToLockPayroll, FranchiseId, true, UserInfo.UserKey);

            ViewBag.Date = date.ToShortDateString();
            return(RedirectToAction("PayrollProcessing", new { dt = date }));
        }