Esempio n. 1
0
 // DELETE: api/Company/5
 public void Delete(int id)
 {
     try
     {
         CompBL.DeleteCompany(id);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message, ex.InnerException);
     }
 }
Esempio n. 2
0
        public ActionResult Delete(int id)
        {
            CompanyBL    companyBL = new CompanyBL();
            ReturnResult result    = companyBL.DeleteCompany(id);

            //if (!result.IsSuccess)
            //{
            //    TempData["Message"] = "Error while deleting category.";
            //}
            return(RedirectToAction("Index"));
            //return View();
        }
Esempio n. 3
0
 public HttpResponseMessage DeleteCompany([FromBody] CompanyAddressDTO CompanyAddressDTOobject)
 {
     try
     {
         bool flag = CompanyBLobject.DeleteCompany(CompanyAddressDTOobject);
         if (flag == true)
         {
             return(Request.CreateResponse(HttpStatusCode.OK));
         }
         else
         {
             return(Request.CreateResponse(HttpStatusCode.BadRequest));
         }
     }
     catch (Exception e)
     {
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, e.Message));
     }
 }