private void btnFacturacion_Click(object sender, EventArgs e) { Facturacion f = new Facturacion(); f.CedulaEmpleado = CedulaEmpleado; f.ShowDialog(); }
private void dgvClientes_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (frmFacturacion == true) { var rowIdCliente = dgvClientes.CurrentRow; Facturacion f = new Facturacion(rowIdCliente.Cells[3].Value.ToString()); this.Close(); } }
private void dgvSolares_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (formCotizacion) { Cotizacion C = new Cotizacion(this.dgvSolares.CurrentRow.Cells[0].Value.ToString(), this.dgvSolares.CurrentRow.Cells[1].Value.ToString(), this.dgvSolares.CurrentRow.Cells[2].Value.ToString(), this.dgvSolares.CurrentRow.Cells[3].Value.ToString(), this.dgvSolares.CurrentRow.Cells[4].Value.ToString(), this.dgvSolares.CurrentRow.Cells[5].Value.ToString(), this.dgvSolares.CurrentRow.Cells[6].Value.ToString(), this.dgvSolares.CurrentRow.Cells[7].Value.ToString(), this.dgvSolares.CurrentRow.Cells[8].Value.ToString(), this.dgvSolares.CurrentRow.Cells[9].Value.ToString(), this.dgvSolares.CurrentRow.Cells[10].Value.ToString(), this.dgvSolares.CurrentRow.Cells[11].Value.ToString(), this.dgvSolares.CurrentRow.Cells[12].Value.ToString()); formCotizacionClosed = false; this.Close(); } if (formFacturacion) { Facturacion F = new Facturacion(this.dgvSolares.CurrentRow.Cells[0].Value.ToString(), this.dgvSolares.CurrentRow.Cells[1].Value.ToString(), this.dgvSolares.CurrentRow.Cells[3].Value.ToString(), this.dgvSolares.CurrentRow.Cells[4].Value.ToString(), this.dgvSolares.CurrentRow.Cells[10].Value.ToString()); formCotizacionClosed = false; this.Close(); } if (formMantenimientoS) { MantenimientoSolares M = new MantenimientoSolares(this.dgvSolares.CurrentRow.Cells[0].Value.ToString(), this.dgvSolares.CurrentRow.Cells[1].Value.ToString(), this.dgvSolares.CurrentRow.Cells[2].Value.ToString(), this.dgvSolares.CurrentRow.Cells[3].Value.ToString(), this.dgvSolares.CurrentRow.Cells[4].Value.ToString(), this.dgvSolares.CurrentRow.Cells[5].Value.ToString(), this.dgvSolares.CurrentRow.Cells[6].Value.ToString(), this.dgvSolares.CurrentRow.Cells[7].Value.ToString(), this.dgvSolares.CurrentRow.Cells[8].Value.ToString(), (byte[])this.dgvSolares.CurrentRow.Cells[9].Value, this.dgvSolares.CurrentRow.Cells[10].Value.ToString(), this.dgvSolares.CurrentRow.Cells[11].Value.ToString(), this.dgvSolares.CurrentRow.Cells[12].Value.ToString()); var row = dgvSolares.CurrentRow; byte[] image = (byte[])(row.Cells[9].Value); MemoryStream ms = new MemoryStream(image); picTitulo.Image = Image.FromStream(ms); formCotizacionClosed = false; this.Close(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }