Exemple #1
0
 public void buscaMetodo()
 {
     try
     {
         this.Metodo           = new Metodo_pagos();
         this.Metodo.Opc       = 2;
         this.Metodo.Id_metodo = id_metodo;
         this.MetodoHelper     = new Metodo_pago_Helper(Metodo);
         this.datos            = new DataTable();
         this.datos            = this.MetodoHelper.Buscar_metodo();;
         if (datos.Rows.Count >= 0)
         {
             DataRow fila = datos.Rows[0];
             nombre_metodo = fila["Nombre"].ToString();
         }
     }
     catch (Exception)
     {
         ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true);
     }
 }
Exemple #2
0
 protected void Btn_redirije_Click(object sender, EventArgs e)
 {
     try
     {
         this.metodo                    = new Metodo_pagos();
         this.metodo.Opc                = 1;
         this.metodo.Nombre_metodo      = this.txt_nombre_metodo.Text;
         this.metodo.Descripcion_metodo = this.txt_descripcion.Text;
         this.metodo.Num_referencia     = this.txt_creferencia.Text;
         this.metodo.Estado             = "Activo";
         this.metodoHelper              = new Metodo_pago_Helper(metodo);
         this.metodoHelper.Agregar_metodo_pago();
         this.txt_nombre_metodo.Text = null;
         this.txt_descripcion.Text   = null;
         this.txt_creferencia.Text   = null;
         ScriptManager.RegisterStartupScript(this, typeof(Page), "mmensajeDeconfirmacion", "mensajeDeconfirmacion('" + "" + "');", true);
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true);
     }
 }