示例#1
0
        public void E_EliminarBusiness()
        {
            ListBusinessViewModel a = new ListBusinessViewModel();

            a.fill();
            int      codigo      = a.ListBusiness[a.ListBusiness.Count - 1].idBusiness;
            Business objBusiness = new Business();

            objBusiness.idBusiness = codigo;
            AddEditBusinessViewModel objViewModel = new AddEditBusinessViewModel();

            objViewModel.EliminarBusiness(objBusiness.idBusiness);
            Assert.True(true);
        }
示例#2
0
        public ActionResult DeleteBusiness(int businessid)
        {
            AddEditBusinessViewModel objViewModel = new AddEditBusinessViewModel();

            try
            {
                objViewModel.EliminarBusiness(businessid);
                TempData["Mensaje"] = "El negocio se se eliminó correctamente";
                return(RedirectToAction("ListBusiness"));
            }
            catch (Exception e)
            {
                TempData["MensajeError"] = "Error! " + e.Message.ToList();
                return(RedirectToAction("ListBusiness"));
            }
        }