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)); }
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)); }
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; } }