Ejemplo n.º 1
0
        public ActionResult SaveMainScholarship(MainScholarshipModel scholarship)
        {
            string sessionId = Session["User-SessionID"].ToString();

            Site.Core.Repository.User _user = SessionUtil.GetInstance.GetUserBySessionID(sessionId);

            scholarship.UpdatedBy   = _user.UserID;
            scholarship.UpdatedDate = DateTime.Now;
            BaseResponse response = _mainScholarshipService.Update(scholarship);

            ViewBag.Message = response;
            return(View("UpdateMainScholarship", scholarship));
        }
Ejemplo n.º 2
0
        public JsonResult SaveUpdateMainScholarship(MainScholarshipModel scholarship)
        {
            var sessionId = this.Session["SessionID"].ToString();
            IUserSessionRepository userSessionRepository = RepositoryClassFactory.GetInstance().GetUserSessionRepository();
            UserSession            userSession           = userSessionRepository.FindByID(sessionId);

            if (userSession == null)
            {
                return(Json(new { errorCode = (int)ErrorCode.Redirect, message = Resources.AdminResource.msg_sessionInvalid }, JsonRequestBehavior.AllowGet));
            }

            scholarship.UpdatedBy   = userSession.UserID;
            scholarship.UpdatedDate = DateTime.Now;
            BaseResponse response = _mainScholarshipService.Update(scholarship);

            return(Json(new { errorCode = response.ErrorCode, message = response.Message }, JsonRequestBehavior.AllowGet));
        }