/// <summary> /// Add the common area bookings /// </summary> /// <param name="model"></param> /// <returns></returns> public JsonResult AddCommonAreaBooking(StrataOwnerBookingRequestModel model) { string strMsg = "NotOk"; int val = -1; if (model.CommonAreaId == 0) { strMsg = "Common area required."; } else { StrataOwnerHelper strataOwnerHelper = new StrataOwnerHelper(); model.Status = "1"; int result = strataOwnerHelper.AddStrataOwnerBookingRequest(model); if (result == 1) { val = 0; strMsg = "Booking request has been created successfully."; } else if (result == -1) { strMsg = "Booking request already exists to this User for given dates."; } else { strMsg = "Booking request creation failed."; } } return(Json(new { Msg = strMsg, Result = val }, JsonRequestBehavior.AllowGet)); }
public JsonResult AddCommonAreaBooking(BookingRequestModel model) { string strMsg = "NotOk"; int val = -1; if (model.CommonAreaId == 0) { strMsg = "Common area required."; } else { StrataOwnerHelper strataOwnerHelper = new StrataOwnerHelper(); model.Status = "1"; model.AdminStatus = 1; // As area is booked by admin then no need for approval int result = strataOwnerHelper.AddStrataAdminBookingRequest(model); if (result == 1) { val = 0; strMsg = "Booking request has been created successfully."; } else if (result == -1) { strMsg = "Booking request already exists in these dates."; } else { strMsg = "Booking request creation failed."; } } return(Json(new { Msg = strMsg, Result = val }, JsonRequestBehavior.AllowGet)); }
public ActionResult GetOwnerList(StrataOwnerModel model) { StrataOwnerHelper objHelper = new StrataOwnerHelper(); var Owners = objHelper.GetOwnerList(model); if (Owners == null) { return(Content("0")); } if (Owners.Count <= 0) { return(Content("0")); } else { return(PartialView("_OwnerList", Owners)); } }