public bool Create(int userid, Salary salary)
        {
            salary.CreateTime = DateTime.Now;
            salary.UserId     = userid;
            bool result = salaryService.AddEntity(salary);

            return(result);
        }
Esempio n. 2
0
        public ActionResult Create(Salary salary)
        {
            S_User user = Session["CurrentUser"] as S_User;

            salary.CreateTime = DateTime.Now;
            salary.UserId     = user.id;
            bool result = salaryService.AddEntity(salary);

            if (!result)
            {
                return(RedirectToAction("/Create", result));
            }
            return(RedirectToAction("/Index"));
        }