Esempio n. 1
0
        public HttpResponseMessage Delete(int id)
        {
            ClaimsPrincipal p = RequestContext.Principal as ClaimsPrincipal;

            CustomerDA.DeleteCustomer(id, p.Claims);
            return(new HttpResponseMessage(HttpStatusCode.OK));
        }
        public HttpResponseMessage Delete(long id)
        {
            ClaimsPrincipal p = RequestContext.Principal as ClaimsPrincipal;
            int             i = CustomerDA.DeleteCustomer(id, p.Claims);

            if (i == 0)
            {
                return(new HttpResponseMessage(HttpStatusCode.NoContent));
            }
            return(new HttpResponseMessage(HttpStatusCode.OK));
        }
Esempio n. 3
0
 public HttpResponseMessage Delete(int id)
 {
     try
     {
         ClaimsPrincipal p = RequestContext.Principal as ClaimsPrincipal;
         CustomerDA.DeleteCustomer(id, p.Claims);
         return(new HttpResponseMessage(HttpStatusCode.OK));
     }
     catch
     {
         return(new HttpResponseMessage(HttpStatusCode.InternalServerError));
     }
 }
Esempio n. 4
0
        public bool RemoveCustomer(Int32 customerID)
        {
            try
            {
                Int32 numberOfRecordsDeleted = customerDA.DeleteCustomer(customerID);

                if (numberOfRecordsDeleted == 1)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
            }
        }
 public void Delete(int id)
 {
     da.DeleteCustomer(id);
 }