public ActionResult Edit(int Id) { obj = BL_tblPropertyTaxMap.GetSingleRecordById(Id); ViewBag.heading = "Modify Taxes"; obj.Mode = "Edit"; if (obj.dtStayFrom != null) { obj.stayfrom = String.Format("{0:dd/MM/yyyy}", obj.dtStayFrom); } if (obj.dtStayTo != null) { obj.stayto = String.Format("{0:dd/MM/yyyy}", obj.dtStayTo); } //obj.PlanId = obj.iRoomId + "|" + obj.iRPId; if (obj.iRoomId == null) { obj.iRoomId = 0; } obj.ListRatePlans = BL_tblPropertyRoomMap.GetAllPropertyTypes(Convert.ToInt32(Session["PropId"])); obj.ListTaxes = BL_Tax.GetAllTaxOfProperty(Id); return(PartialView("PropertyTax", obj)); }
public string UpdateStatus(int Id, bool Mode) { object result = null; string strReturn = string.Empty; try { obj = BL_tblPropertyTaxMap.GetSingleRecordById(Id); if (Mode == true) { obj.cStatus = "A"; } else { obj.cStatus = "I"; } int i = BL_tblPropertyTaxMap.UpdateStatus(obj); if (i == 1) { result = new { st = 1, msg = "Updated successfully." }; } else if (i == 2) { result = new { st = 0, msg = "Tax already exixts for selected Rate Plan and Stay Validity" }; } else { result = new { st = 0, msg = "Kindly try after some time." }; } } catch (Exception) { result = new { st = 0, msg = "Kindly try after some time." }; } strReturn = OneFineRateAppUtil.clsUtils.ConvertToJson(result); return(strReturn); }