コード例 #1
0
        public PartialViewResult _PhotoReleaseForm()
        {
            PhotoRelease model         = new PhotoRelease();
            var          objloginmodel = (eTracLoginModel)(Session["etrac"]);
            var          d             = _IGuestUserRepository.GetPhotoRelease(objloginmodel.UserId);

            model.Name = d;
            return(PartialView("_PhotoReleaseForm", model));
        }
コード例 #2
0
        public ActionResult _photoreleaseform(PhotoRelease model)
        {
            if (ModelState.IsValid)
            {
                var objloginmodel = (eTracLoginModel)(Session["etrac"]);


                _IGuestUserRepository.SetPhotoRelease(objloginmodel.UserId, model);
                return(Json(true, JsonRequestBehavior.AllowGet));
            }
            ViewBag.notsaved = true;
            return(PartialView("_photoreleaseform", model));
        }
コード例 #3
0
 public void SetPhotoRelease(long userId, PhotoRelease model)
 {
     try
     {
         using (workorderEMSEntities Context = new workorderEMSEntities())
         {
             var empid   = Context.UserRegistrations.Where(x => x.UserId == userId)?.FirstOrDefault().EmployeeID;
             var isexist = GetPhotoRelease(userId);
             if (string.IsNullOrEmpty(isexist))
             {
                 Context.spSetPhotoReleaseForm("I", model.PRFId, empid, model.IsActive);
             }
             else
             {
                 Context.spSetPhotoReleaseForm("U", model.PRFId, empid, model.IsActive);
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }