Ejemplo n.º 1
0
        private void ECLlenarComboidReview()
        {
            EC_Class EcCOMBO = new EC_Class();
            string   Query   = "select Id from ECtbl_veterinaria";

            DataSet   ECset   = EcCOMBO.LLenaComboGrid(Query);
            DataTable ECtable = ECset.Tables[0];

            foreach (DataRow row in ECtable.Rows)
            {
                ECcmbID.Items.Add(row[0].ToString());
            }
        }
Ejemplo n.º 2
0
        private void EliminarComboid()
        {
            EC_Class ECbase = new EC_Class();
            string   Query  = "select id from ECtbl_veterinaria";

            DataSet   ECdateset = ECbase.LLenaComboGrid(Query);
            DataTable ECtable   = ECdateset.Tables[0];

            foreach (DataRow row in ECtable.Rows)
            {
                EC_comboxID.Items.Add(row[0].ToString());
            }
        }
Ejemplo n.º 3
0
        private void ECcmbID_SelectedIndexChanged(object sender, EventArgs e)
        {
            EC_Class  DatebaseEC  = new EC_Class();
            string    Query2      = "select * from ECtbl_veterinaria  where id = " + ECcmbID.Text;
            DataSet   ECdataset   = DatebaseEC.LLenaComboGrid(Query2);
            DataTable ECdatatable = ECdataset.Tables[0];

            for (int f = 1; f < ECdataset.Tables.Count; f++)
            {
                ECdatatable = ECdataset.Tables[f];
            }
            dataGridView1.AutoGenerateColumns = true;
            dataGridView1.DataSource          = ECdatatable;
        }
Ejemplo n.º 4
0
        private void EC_btn_Click(object sender, EventArgs e)
        {
            EC_Class DatebaseEC = new EC_Class();
            string   Query      = " Select *from ECtbl_veterinaria";

            DataSet   ECdataset   = DatebaseEC.LLenaComboGrid(Query);
            DataTable ECdatatable = ECdataset.Tables[0];

            for (int f = 1; f < ECdataset.Tables.Count; f++)
            {
                ECdatatable = ECdataset.Tables[f];
            }
            dataGridView1.AutoGenerateColumns = true;
            dataGridView1.DataSource          = ECdatatable;
        }
Ejemplo n.º 5
0
        private void ECmontarDATOS(string id)
        {
            EC_Class datebaseEC = new EC_Class();
            string   Query      = "select* from ECtbl_veterinaria where id=" + comboxID_EC.Text;

            DataSet   DataSetEC   = datebaseEC.LLenaComboGrid(Query);
            DataTable datatableEC = DataSetEC.Tables[0];

            foreach (DataRow row in datatableEC.Rows)
            {
                comboxTipo_EC.Text       = row[1].ToString();
                EC_txtNombremascota.Text = row[2].ToString();
                EC_txtNombreDueño.Text   = row[3].ToString();
                EC_txtApellido.Text      = row[4].ToString();
                EC_txtRut.Text           = row[5].ToString();
                EC_txtingreso.Text       = row[6].ToString();
                EC_txtSalida.Text        = row[7].ToString();
                EC_txtEstadia.Text       = row[8].ToString();
                EC_txtPeso.Text          = row[9].ToString();
                EC_txtTamaño.Text        = row[10].ToString();
            }
        }