private void entrarGuiaremision() { if (dgvCompras.Rows.Count == 0) { MessageBox.Show("No hay un registro seleccionado", "nota salida", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } loadState(true); try { int index = dgvCompras.CurrentRow.Index; // Identificando la fila actual del datagridview int idCompra = Convert.ToInt32(dgvCompras.Rows[index].Cells[0].Value); // obteniedo el idRegistro del datagridview currentCompraNEntrada = listCompraNEntrada.Find(x => x.idCompra == idCompra); this.Close(); } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Cargar Compra", MessageBoxButtons.OK, MessageBoxIcon.Warning); } finally { loadState(false); } }
private async void cargarDatosNotaEntrada() { try { //datos if (currentNotaEntrada.idCompra != "0") { txtNroDocumento.Text = currentNotaEntrada.numeroDocumento; txtNombreProveedor.Text = currentNotaEntrada.nombreProveedor; txtDocumentoProveedor.Text = currentNotaEntrada.rucDni; currentCompraNEntrada = new CompraNEntrada(); currentCompraNEntrada.idCompra = Convert.ToInt32(currentNotaEntrada.idCompra); } // serie txtSerie.Text = currentNotaEntrada.serie; txtCorrelativo.Text = currentNotaEntrada.correlativo; cbxAlmacen.SelectedValue = currentNotaEntrada.idAlmacen; dtpFechaEntrega.Value = currentNotaEntrada.fechaEntrada.date; txtObservaciones.Text = currentNotaEntrada.observacion; chbxEntrega.Checked = currentNotaEntrada.estadoEntrega == 1 ? true : false; // cargar detalles de la nota listcargaCompraSinNota = await entradaModel.cargarDetallesNota(currentNotaEntrada.idNotaEntrada); cargaCompraSinNotaBindingSource.DataSource = listcargaCompraSinNota; btnImportarCompra.Enabled = false; } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Caragar Datos Nota Entrada", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void entrarGuiaremision() { if (dgvCompras.Rows.Count == 0) { MessageBox.Show("No hay un registro seleccionado", "nota salida", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } int index = dgvCompras.CurrentRow.Index; // Identificando la fila actual del datagridview int idCompra = Convert.ToInt32(dgvCompras.Rows[index].Cells[0].Value); // obteniedo el idRegistro del datagridview currentCompraNEntrada = listCompraNEntrada.Find(x => x.idCompra == idCompra); this.Close(); }