Ejemplo n.º 1
0
 public async Task <IActionResult> Delete(int companyId)
 {
     try
     {
         if (!(await _company.CheckCompanyExist(companyId)))
         {
             return(BadRequest(Messages.CompanyNotExist));
         }
         return(Ok(await _company.Delete(companyId)));
     }
     catch (Exception ex)
     {
         return(BadRequest(Messages.GeneralError));
     }
 }
Ejemplo n.º 2
0
        public IActionResult Delete(int id)
        {
            User currentAdmin = HttpContext.Session.Get <User>("currentUser");

            try
            {
                companyBLL.Delete(id);
                this._logger.LogInformation($"AdminID : {currentAdmin.ID} is updated  CompanyID : {id}.");
            }
            catch (Exception)
            {
                throw;
            }
            return(View("Index"));
        }
Ejemplo n.º 3
0
 public IActionResult Delete(int id)
 {
     companyBLL.Delete(id);
     return(Ok());
 }