public string UpdateStatus(int Id, string Name, bool Mode) { object result = null; string strReturn = string.Empty; try { etblPropertyDiningMap obj = BL_tblPropertyDiningMap.GetSingleRecord(Id, Name); obj.bActive = Mode ? true : false; int i = BL_tblPropertyDiningMap.UpdateRecord(obj); if (i == 1) { result = new { st = 1, msg = "Updated successfully." }; } 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); }
public ActionResult Edit(int Id, string Name) { etblPropertyDiningMap obj = new etblPropertyDiningMap(); ViewBag.HeaderText = "Modify Property Dining"; obj = BL_tblPropertyDiningMap.GetSingleRecord(Id, Name); obj.Mode = "Edit"; //obj.sTimingFromHHOld = obj.sTimingFromHH; //obj.sTimingToHHOld = obj.sTimingToHH; //obj.sTimingFromHH = obj.sTimingFromHH + ":" + obj.sTimingFromMM; //obj.sTimingToHH = obj.sTimingToHH + ":" + obj.sTimingToMM; return(PartialView("PropertyDining", obj)); }