private void btnNuevo_Click(object sender, EventArgs e) { Form_compras.folio = "0"; Form_compras new_compra = new Form_compras(); new_compra.Owner = this; new_compra.ShowDialog(); carga(); }
private void dtCompras_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { int selectedrowindex = dtCompras.SelectedCells[0].RowIndex; DataGridViewRow selectedRow = dtCompras.Rows[selectedrowindex]; string codigo = Convert.ToString(selectedRow.Cells["documento"].Value); Form_compras.folio = codigo; Form_compras new_compra = new Form_compras(); new_compra.Owner = this; new_compra.Show(); }
private void button1_Click(object sender, EventArgs e) { Form_compras form_interface = this.Owner as Form_compras; foreach (DataGridViewRow row in dataGridView1.Rows) { if (Convert.ToBoolean(row.Cells["chk"].Value) == true) { form_interface.dtDocumentos.Rows.Add(row.Cells["id"].Value.ToString()); } } this.Close(); }