Esempio n. 1
0
 private void pictureBox1_Click(object sender, EventArgs e)
 {
     Label6.Hide();
     Panel1.Size = new Size(45, 727);
     pictureBox1.Hide();
     Button1.Hide();
     Button2.Hide();
     Button3.Hide();
     Button4.Hide();
     PictureBox2.Show();
     DataGridView1.Hide();
 }
Esempio n. 2
0
 private void Frm_usuario_Load(object sender, EventArgs e)
 {
     // oculta elementos de la interfaz  como los botones de guardar actualizar y eliminar
     Button1.Hide();
     Button2.Hide();
     Button3.Hide();
     Button4.Hide();
     pictureBox1.Hide();
     PictureBox3.SetBounds(this.Width - 80, 25, PictureBox3.Width, PictureBox3.Height);
     Label6.Hide();
     DataGridView1.Hide();
     ComboBox1.SelectedIndex = 0;
 }
Esempio n. 3
0
 private void Frm_usuario_Load(object sender, EventArgs e)
 {
     Button1.Hide();
     Button2.Hide();
     Button3.Hide();
     Button4.Hide();
     pictureBox1.Hide();
     PictureBox3.SetBounds(this.Width - 80, 25, PictureBox3.Width, PictureBox3.Height);
     Label6.Hide();
     DataGridView1.Hide();
     ComboBox1.SelectedIndex = 0;
     conexion.llenarComboBox("SELECT * from tbl_departamentos", cb_departamento, "id_departamento", "nombre");
     if (cb_departamento.SelectedIndex > 0 & cb_nombramiento.SelectedIndex > 0)
     {
         cb_departamento.SelectedIndex = 0;
     }
     cb_nombramiento.SelectedIndex = 0;
 }
 private void btnView_Click(object sender, EventArgs e)
 {
     DataGridView1.Hide();
     pnInscription.Show();
     try
     {
         connection.Open();
         SqlCommand command = new SqlCommand();
         command.CommandText = "select Category,PName AS Product_Name,Inscription from tblProducts";
         command.Connection  = connection;
         SqlDataAdapter da = new SqlDataAdapter(command);
         table = new DataTable();
         da.Fill(table);
         dpt.DataSource = table;
         connection.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         connection.Close();
     }
 }