public JsonResult Create(AssetPurchaseEntryVM vmObj) { bool isSaved = false; if (ModelState.IsValid) { var var = vmObj; isSaved = _Manager.Save(var.AssetPurchaseEntry); } if (isSaved) { status = true; message = "Succesfully Saved"; } else { message = "Error! Please try again."; } return(new JsonResult { Data = new { status = status, message = message } }); }
public JsonResult Search(AssetPurchaseEntryVM vmObj) { var var = vmObj; var var2 = _Manager.GetBySearchItem(var.AssetPurchaseEntry); return(new JsonResult { Data = var2, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public ActionResult Index() { var selectListItem = GetSelectListItems(); var model = new AssetPurchaseEntryVM(); model.GeneralCategoryList = selectListItem; model.AssetPurchaseEntry = new AssetPurchaseEntry(); return(View(model)); }
public JsonResult Edit(AssetPurchaseEntryVM vmObj) { bool isUpdated = _Manager.Update(vmObj.AssetPurchaseEntry); if (isUpdated) { status = true; message = "Update Successfully!!"; } return(new JsonResult { Data = new { status = status, message = message } }); }