public ActionResult Create(string phy_key) { physician_shift_rate physicianRate = new physician_shift_rate(); physicianRate.psr_phy_key = phy_key; return(GetViewResult(physicianRate)); }
public ActionResult Edit(physician_shift_rate physicianRate) { if (ModelState.IsValid) { physicianRate.psr_modified_by = loggedInUser.Id; physicianRate.psr_modified_by_name = loggedInUser.FullName; physicianRate.psr_modified_date = DateTime.Now.ToEST(); _physicianRateService.Edit(physicianRate); return(ShowSuccessMessageOnly("Physician Floor Rate Successfully Updated.", physicianRate)); } return(GetErrorResult(physicianRate)); }
public ActionResult Edit(int?id) { if (id == null) { new SelectListItem { }; return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } physician_shift_rate rateService = _physicianRateService.GetDetails(Convert.ToInt32(id)); // get physician name ViewBag.name = _physicianRateService.GetPhysicianName(rateService.psr_phy_key); if (rateService == null) { return(HttpNotFound()); } return(GetViewResult(rateService)); }
public ActionResult Create(physician_shift_rate physicianRate) { if (ModelState.IsValid) { //string phy_key = physicianRate.psr_phy_key; physicianRate.psr_created_by = loggedInUser.Id; physicianRate.psr_created_by_name = loggedInUser.FullName; physicianRate.psr_created_date = DateTime.Now.ToEST(); bool alreadyExist = _physicianRateService.IsAlreadyExists(physicianRate.psr_phy_key, Convert.ToDateTime(physicianRate.psr_start_date), Convert.ToDateTime(physicianRate.psr_end_date), physicianRate.psr_shift.ToInt()); if (!alreadyExist) { _physicianRateService.Create(physicianRate); return(ShowSuccessMessageOnly("Physician Floor Rate Successfully Added", physicianRate)); } else { return(ShowErrorMessageOnly("Record Already Exist. Please try an other dates/Shifts", physicianRate)); } } return(GetErrorResult(physicianRate)); }
public void Edit(physician_shift_rate entity) { _unitOfWork.PhysicianRateRepository.Update(entity); _unitOfWork.Save(); _unitOfWork.Commit(); }
public void Create(physician_shift_rate entity) { _unitOfWork.PhysicianRateRepository.Insert(entity); _unitOfWork.Save(); _unitOfWork.Commit(); }