Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _UserRut = HttpContext.Current.Session["_UserRut"].ToString();

            DataTable      dt    = new DataTable();
            MySqlConnector mysql = new MySqlConnector();

            mysql.ConnectionString = HttpContext.Current.Session["cnString"].ToString();

            mysql.AddProcedure("GetEmpresaByRut");
            mysql
            .AddParameter("_UserRut", _UserRut);
            // string x = mysql.ExecQuery().ToJson();
            dt = mysql.ExecQuery().ToDataTable();


            DropEmpresa.DataTextField  = "RAZON_SOCIAL";
            DropEmpresa.DataValueField = "ID_EMP";

            DropEmpresa.DataSource = dt;
            DropEmpresa.DataBind();

/*
 *          DropAmbiente.Items.Insert(0,new ListItem("Certificacion", "CERT"));
 *          DropAmbiente.Items.Insert(1, new ListItem("Produccion", "PROD"));*/
        }
Beispiel #2
0
 protected void btnCancelar_Click(object sender, EventArgs e)
 {
     txtNombre.Text    = "";
     txtApellidos.Text = "";
     txtCedula.Text    = "";
     txtEmail.Text     = "";
     DropEmpresa.ClearSelection();
     txtTelefono.Text   = "";
     txtUsuario.Text    = "";
     txtContrasena.Text = "";
 }