public ActionResult Manage(int? id) { PloatBooking model = new PloatBooking(); ViewBag.MemberLookUp = new MemberBAL().GetMemberLookUp(); if (id != 0 && id != null) { model = new PloatBookingBAL().GetById(id.Value); } return PartialView(model); }
public JsonResult Save(PloatBooking model) { try { bool Add_Flag = new PloatBookingBAL().isNewEntry(model.PloatBookingId); if (Add_Flag) new PloatBookingBAL().Create(model); else new PloatBookingBAL().Update(model); return Json(new { success = true, message = CommonMsg.Success(EntityNames.PloatBooking, (Add_Flag == true ? En_CRUD.Insert : En_CRUD.Update)) }); } catch (Exception ex) { return Json(new { success = false, message = CommonMsg.Fail(EntityNames.PloatBooking, En_CRUD.Update) }); } }