Beispiel #1
0
        private void BtRegistrarCompra_Click(object sender, EventArgs e)
        {
            FormRegistrarCompra RComp = new FormRegistrarCompra();

            RComp.Show();
            this.Close();
        }
 private void consulta_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex < 0)
     {
     }
     else
     {
         if (ban == 1)
         {
             index           = e.RowIndex;
             codigo_consulta = consulta.Rows[e.RowIndex].Cells[0].Value.ToString();
             FormRegistrarCompra compra = Application.OpenForms.OfType <FormRegistrarCompra>().SingleOrDefault();
             compra.txtmercancia.Text = codigo_consulta;
             this.Close();
         }
         if (ban == 2)
         {
             index           = e.RowIndex;
             codigo_consulta = consulta.Rows[e.RowIndex].Cells[0].Value.ToString();
             Form2 id = Application.OpenForms.OfType <Form2>().SingleOrDefault();
             id.ID_Producto.Text = codigo_consulta;
             this.Close();
         }
     }
 }