public ResponseModel CreateTax(InvTax aObj)
 {
     if (aObj.TaxId == 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"));
     }
 }
Example #2
0
        public JsonResult CreateTax(InvTax aObj)
        {
            var data = _aManager.CreateTax(aObj);

            return(Json(new { success = data.Status, data }, JsonRequestBehavior.AllowGet));
        }