Пример #1
0
        protected void btnDeleteCliente_Click(object sender, EventArgs e)
        {
            /*--TRAER ID--*/
            string idActual;

            idActual = Request.QueryString["DocCliente"].ToString();
            if (gestion.eliminarCliente(idActual))
            {
                if (gestionLogin.eliminarLogin(idActual))
                {
                    /*--MENSAJE DE ALERTA--*/
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "swal({title: 'Cliente eliminado!', text: 'El usuario fue eliminado correctamente del sistema', icon: 'success', type: 'success'}).then(function() {window.location = 'BaseClientesAsesor.aspx';});", true);
                }
                else
                {
                    /*--MENSAJE DE ALERTA--*/
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "swal({title: 'Error!',text: 'No se pudo eliminar el Cliente, inténtalo más tarde', icon: 'error', timer: 2500,button: false}).then(function() { },function(dismiss) {if (dismiss === 'timer'){console.log('I was closed by the timer')}})", true);
                }
            }
            else
            {
                /*--MENSAJE DE ALERTA--*/
                ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "swal({title: 'Error!',text: 'No se pudo eliminar el Cliente, inténtalo más tarde', icon: 'error', timer: 2500,button: false}).then(function() { },function(dismiss) {if (dismiss === 'timer'){console.log('I was closed by the timer')}})", true);
            }
        }
Пример #2
0
 public bool eliminarCliente(Cliente obj)
 {
     if (autenticacion != null && autenticacion.esValido())
     {
         return(gestionCliente.eliminarCliente(obj));
     }
     return(false);
 }