Ejemplo n.º 1
0
        public ActionResult DeleteCustomer(int Id)
        {
            if (Id == 0)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
            }

            var partyRepo = new PartyRepository();
            var item      = partyRepo.DeleteCustomerById(Id);

            if (item.Success)
            {
                return(Json(item));
            }
            else
            {
                return(new HttpStatusCodeResult(Utils.ToHttpCode(item.Status), item.ExceptionMessage));
            }
        }