// GET: /Inventory/Size/CreateSize

        public JsonResult CreateSize(InvSize aObj)
        {
            var data = _aManager.CreateSize(aObj);

            // var data = _aManager.CreatAssetCategory(aObj);

            return(Json(new { success = data.Status, data }, JsonRequestBehavior.AllowGet));
            // return null;
        }
 public ResponseModel CreateSize(InvSize aObj)
 {
     try
     {
         if (aObj.SizeId == 0)
         {
             aObj.CreatedDate = DateTime.Now;
             _aRepository.Insert(aObj);
             _aRepository.Save();
             return(_aModel.Respons(true, "New Size Successfully Saved"));
         }
         else
         {
             _aRepository.Update(aObj);
             _aRepository.Save();
             return(_aModel.Respons(true, "Size Successfully Updated"));
         }
     }
     catch (Exception)
     {
         return(_aModel.Respons(false, "Sorry! Some Error Happned."));
     }
 }