Beispiel #1
0
        public ActionResult EliminarAsesor(byte id)
        {
            try
            {
                CotizarService.CotizarServiceClient objService = new CotizarService.CotizarServiceClient();
                if (objService.Asesor_Eliminar(new CotizarService.Asesor()
                {
                    idasesor = id
                }))
                {
                    base.RegistrarNotificación("Se ha eliminado/inactivado el asesor.", Models.Enumeradores.TiposNotificaciones.success, Recursos.TituloNotificacionExitoso);
                }
                else
                {
                    base.RegistrarNotificación("El asesor no pudo ser eliminado. Posiblemente se ha inhabilitado.", Models.Enumeradores.TiposNotificaciones.notice, Recursos.TituloNotificacionAdvertencia);
                }
            }
            catch (Exception ex)
            {
                //Controlar la excepción
                base.RegistrarNotificación("Falla en el servicio de eliminación.", Models.Enumeradores.TiposNotificaciones.error, Recursos.TituloNotificacionError);
            }

            return(RedirectToAction("ListaAsesores", "Comercial"));
        }
Beispiel #2
0
        public ActionResult EliminarAsesor(byte id)
        {
            try
            {
                CotizarService.CotizarServiceClient objService = new CotizarService.CotizarServiceClient();
                if (objService.Asesor_Eliminar(new CotizarService.Asesor() { idasesor = id }))
                    base.RegistrarNotificación("Se ha eliminado/inactivado el asesor.", Models.Enumeradores.TiposNotificaciones.success, Recursos.TituloNotificacionExitoso);
                else
                    base.RegistrarNotificación("El asesor no pudo ser eliminado. Posiblemente se ha inhabilitado.", Models.Enumeradores.TiposNotificaciones.notice, Recursos.TituloNotificacionAdvertencia);
            }
            catch (Exception ex)
            {
                //Controlar la excepción
                base.RegistrarNotificación("Falla en el servicio de eliminación.", Models.Enumeradores.TiposNotificaciones.error, Recursos.TituloNotificacionError);
            }

            return RedirectToAction("ListaAsesores", "Comercial");
        }