コード例 #1
0
    protected void btn_guardar_Click(object sender, EventArgs e)
    {
        BecariosModelo becarios = new BecariosModelo();

        string nombre    = this.txtNuevoNombreUsuerio.Text.Trim();
        string apellido  = this.txtNuevoApellidoUsuario.Text.Trim();
        string telefono  = this.txtNuevoTelefonoUsuario.Text.Trim();
        string direccion = this.txtDireccion.Text.Trim();
        string correo    = this.txtNuevoCorreoElectronico.Text.Trim();
        string fecha     = this.txtNuevaFecha.Text.Trim();
        string clave     = this.txtNuevaClaveAleatoria.Text.Trim();
        string dui       = this.txtNuevoDui.Text.Trim();
        string programa  = this.ddl_programas.SelectedValue;

        this.txtNuevoNombreUsuerio.Text     = "";
        this.txtNuevoApellidoUsuario.Text   = "";
        this.txtNuevoTelefonoUsuario.Text   = "";
        this.txtDireccion.Text              = "";
        this.txtNuevoCorreoElectronico.Text = "";
        this.txtNuevaFecha.Text             = "";
        this.txtNuevaClaveAleatoria.Text    = "";
        this.txtNuevoDui.Text            = "";
        this.ddl_programas.SelectedIndex = 0;

        becarios.GuardarBecario(nombre, apellido, telefono, direccion, correo, fecha, clave, programa, dui);

        this.up_content.DataBind();
    }