public ResponseModel CreateDiscount(InvDiscount aObj)
 {
     if (aObj.DiscountId == 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"));
     }
 }
        public JsonResult CreateDiscount(InvDiscount aObj)
        {
            var data = _aManager.CreateDiscount(aObj);

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