private void materialRaisedButton1_Click(object sender, EventArgs e)
        {
            nuevo_paciente np = new nuevo_paciente();

            np.Show();
            this.Close();
        }
Beispiel #2
0
        private void materialFlatButton2_Click(object sender, EventArgs e)
        {
            nuevo_paciente np = new nuevo_paciente();

            np.Show();
            this.Hide();
        }
        public void dataGridView1_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            DataGridViewRow dr = dataGridView1.SelectedRows[0];

            num = dr.Cells[2].Value.ToString();
            string          myC    = "datasource=remotemysql.com ;port=3306;username=MtcqKvJRNU;password=8cjzPjeLPp";
            MySqlConnection myConn = new MySqlConnection(myC);

            MySqlCommand    sc = new MySqlCommand("select * from MtcqKvJRNU.paciente where curp='" + num + "';", myConn);
            MySqlDataReader myR;

            myConn.Open();
            myR = sc.ExecuteReader(CommandBehavior.CloseConnection);
            dataGridView1.Rows.Clear();
            while (myR.Read() == true)
            {
                np.t0.Text       = myR[0].ToString();
                np.t1.Text       = myR[1].ToString();
                np.t2.Text       = myR[2].ToString();
                np.t3.Text       = myR[3].ToString();
                np.t4.Text       = myR[4].ToString();
                np.t5.Text       = myR[5].ToString();
                np.t6.Text       = myR[6].ToString();
                np.t7.Text       = myR[7].ToString();
                np.t8.Text       = myR[8].ToString();
                np.t9.Text       = myR[9].ToString();
                np.t10.Text      = myR[10].ToString();
                np.t11.Text      = myR[11].ToString();
                np.t12.Text      = myR[12].ToString();
                np.t13.Text      = myR[13].ToString();
                np.t_comen.Text  = myR[14].ToString();
                np.t_contra.Text = myR[16].ToString();
            }
            myConn.Close();
            np.Show();
            this.Close();
        }