예제 #1
0
        protected void CrearTipoDocumento(object sender, EventArgs e)
        {
            try
            {
                obj_tipoDocumento = new TipoDocumento();

                if (obj_tipoDocumento.InsertartipoDocu(TipoDocumentoNombre.Text))
                {
                    TipoDocumentoNombre.Text = "";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", " Swal.fire(  'REGISTRO ALMACENADO',  '', 'success')", true);
                    CargarTipoDocumento();
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", " Swal.fire(  'EL REGISTRO NO FUE ALMACENADO',  '', 'error')", true);
                }
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", " Swal.fire(  'ERROR DE CONEXION',  '', 'error')", true);
            }
        }