public ResponseModel CreateCategory(InvCategory aObj) { if (aObj.CategoryId == 0) { aObj.CreatedDate = DateTime.Now; _aRepository.Insert(aObj); _aRepository.Save(); return(_aModel.Respons(true, "New Asset Details Successfully Saved")); } else { _aRepository.Update(aObj); _aRepository.Save(); return(_aModel.Respons(true, "Asset Details Successfully Updated")); } }
// POST: /Inventory/Employee/CreateEmployee public JsonResult CreateCategory(InvCategory aObj) { var data = _aManager.CreateCategory(aObj); return(Json(new { success = data.Status, data }, JsonRequestBehavior.AllowGet)); }