Esempio n. 1
0
 public IActionResult DeleteSize(DeleteSizeModel deleteModel)
 {
     try
     {
         if (ModelState.IsValid)
         {
             bool isDeleted = iSize.DeleteSize(DBHelper.ParseInt64(deleteModel.sizeId));
             if (isDeleted)
             {
                 return(Ok(ResponseHelper.Success(MessageConstants.SizeDeleted)));
             }
             else
             {
                 return(Ok(ResponseHelper.Error(MessageConstants.DataNotFound)));
             }
         }
         else
         {
             return(Ok(ResponseHelper.Error(MessageConstants.CompulsoryData)));
         }
     }
     catch (Exception ex)
     {
         LogHelper.ExceptionLog(ex.Message + "  :::::  " + ex.StackTrace);
         return(Ok(ResponseHelper.Error(ex.Message)));
     }
 }
 public IActionResult DeleteSize(int id)
 {
     _reposSize.DeleteSize(id);
     return(RedirectToAction(nameof(SizeList)));
 }