예제 #1
0
        public ActionResult Index()
        {
            etblPropertySpaMap obj = new etblPropertySpaMap();

            obj = BL_tblPropertySpaMap.GetSingleRecordById(Convert.ToInt32(Session["PropId"]));
            return(View("~/Views/Spa/view.cshtml", obj));
        }
예제 #2
0
        public JsonResult ValidateSpaName(string sSpaName, string InitialSpaName)
        {
            bool ifNotExist = true;

            if (sSpaName == InitialSpaName)
            {
                return(Json(true, JsonRequestBehavior.AllowGet));
            }
            ifNotExist = BL_tblPropertySpaMap.CheckDataExist(sSpaName, Convert.ToInt32(Session["PropId"]));

            return(Json(ifNotExist, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        public ActionResult Modify(etblPropertySpaMap obj)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    try
                    {
                        bool type = false;
                        obj.dtActionDate = DateTime.Now;
                        obj.iActionBy    = ((OneFineRateBLL.BL_Login.UserDetails)Session["UserDetails"]).iUserId;
                        obj.iPropId      = Convert.ToInt32(Session["PropId"]);
                        string Name = BL_tblPropertySpaMap.CheckDataExist(obj.iPropId);
                        if (Name != string.Empty)
                        {
                            type = true;
                        }

                        int result = BL_tblPropertySpaMap.UpdateRecord(obj, type);
                        if (result == 1)
                        {
                            TempData["msg"] = "Wellness Facilites Modified Successfully";
                            return(RedirectToAction("Index"));
                        }
                        else
                        {
                            TempData["ERROR"] = "Kindly try after some time.";
                            return(RedirectToAction("Index"));
                        }
                    }
                    catch (Exception)
                    {
                        TempData["ERROR"] = "Kindly try after some time.";
                        throw;
                    }
                }
            }
            catch (Exception)
            {
                TempData["ERROR"] = "Kindly try after some time.";
            }
            return(View("~/Views/Spa/view.cshtml", obj));
        }