public IHttpActionResult DeleteTender(int tenderID)
        {
            WebResponseContentModel <bool> deleteTender = new WebResponseContentModel <bool>();

            try
            {
                deleteTender.Content = tenderRepo.DeleteTender(tenderID);

                if (deleteTender.Content)
                {
                    deleteTender.IsRequestSuccesful = true;
                }
                else
                {
                    deleteTender.IsRequestSuccesful = false;
                    deleteTender.ValidationError    = ValidationExceptionError.res_04;
                }
            }
            catch (Exception ex)
            {
                deleteTender.IsRequestSuccesful = false;
                deleteTender.ValidationError    = ExceptionValidationHelper.GetExceptionSource(ex);
                return(Json(deleteTender));
            }

            return(Json(deleteTender));
        }
Example #2
0
 public void DeleteTender(int id)
 {
     _tenderRepository.DeleteTender(id);
 }