Esempio n. 1
0
        //
        // GET: /User/User/

        public ActionResult Index()
        {
            object id = Session["employee_id"];

            ViewBag.employee_salary = EmployeesalaryHelper.Find(id);
            ViewBag.pay_type        = ViewBag.employee_salary.Paytype;

            return(View());
        }
Esempio n. 2
0
        //
        // GET: /User/Salary/

        public async Task <ActionResult> Index()
        {
            ISession se = NHibernateHelper.CurrentSession;

            SalaryView o = new SalaryView();

            object   id       = Session["employee_id"];
            Employee employee = se.Get <Employee>(id);

            o.Employeesalary = EmployeesalaryHelper.Find(id);
            double adjustment = await SalaryadjustmentHelper.GetSalaryAdjustment(new Dictionary <string, object>
            {
                { "staff_id", employee.Staffid },
                { "year", DateTime.Now.Year }
            });

            o.BasicPay = o.Employeesalary.Salary + adjustment;

            return(View(o));
        }