private void dgvSalida_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { DataGridViewRow dRow = dgvSalida.Rows[e.RowIndex]; _drow = dRow.Index.ToString(); ESalida_Detalle _obj = new ESalida_Detalle(); _obj.CodBar = (dRow.Cells["CodBar"].Value == null) ? "" : dRow.Cells["CodBar"].Value.ToString(); _obj.Nu_tf = (dRow.Cells["nu_tf"].Value == null) ? "" : dRow.Cells["nu_tf"].Value.ToString(); _obj.Nu_op = (dRow.Cells["nu_op"].Value == null) ? "" : dRow.Cells["nu_op"].Value.ToString(); _obj.Nu_item = (dRow.Cells["nu_item"].Value == null) ? "" : dRow.Cells["nu_item"].Value.ToString(); _obj.Id_mercado = (dRow.Cells["id_mercado"].Value == null) ? "" : dRow.Cells["id_mercado"].Value.ToString(); _obj.Id_tipo = (dRow.Cells["id_tipo"].Value == null) ? "" : dRow.Cells["id_tipo"].Value.ToString(); _obj.Id_tiptela = (dRow.Cells["tipo_tela"].Value == null) ? "" : dRow.Cells["tipo_tela"].Value.ToString(); _obj.Id_producto = (dRow.Cells["id_producto"].Value == null) ? "" : dRow.Cells["id_producto"].Value.ToString(); _obj.Ds_producto = (dRow.Cells["ds_producto"].Value == null) ? "" : dRow.Cells["ds_producto"].Value.ToString(); _obj.Id_color = (dRow.Cells["id_color"].Value == null) ? "" : dRow.Cells["id_color"].Value.ToString(); _obj.Ds_color = (dRow.Cells["ds_color"].Value == null) ? "" : dRow.Cells["ds_color"].Value.ToString(); _obj.Qt_rollo = (dRow.Cells["_nu_rollo"].Value == null) ? 0 : Convert.ToInt16(dRow.Cells["_nu_rollo"].Value.ToString()); _obj.Qt_peso_Actual = (dRow.Cells["peso_actual"].Value == null) ? 0 : Convert.ToDecimal(dRow.Cells["peso_actual"].Value.ToString()); _obj.Qt_peso = (dRow.Cells["qt_peso"].Value == null) ? 0 : Convert.ToDecimal(dRow.Cells["qt_peso"].Value.ToString()); _obj.Mt_precio = (dRow.Cells["mt_precio"].Value == null) ? 0 : Convert.ToDecimal(dRow.Cells["mt_precio"].Value.ToString()); _obj.Mt_igv = (dRow.Cells["mt_igv"].Value == null) ? 0 : Convert.ToDecimal(dRow.Cells["mt_igv"].Value.ToString()); _obj._id_cliente = (dRow.Cells["id_cliente"].Value == null) ? "" : (dRow.Cells["id_cliente"].Value.ToString()); _obj.Qt_peso_Disp = (dRow.Cells["Peso_disponible"].Value == null) ? 0 : Convert.ToDecimal(dRow.Cells["Peso_disponible"].Value.ToString()); //_obj. = (dRow.Cells["id_cliente"].Value == null) ? "" : (dRow.Cells["id_cliente"].Value.ToString()); FrmSalidaProducto_ModifPopup frm = new FrmSalidaProducto_ModifPopup(); if (editar == "0") { frm.FormParent = this; frm.EstadoDet = 1; frm._index = _drow; frm.LLenarCampos(_obj); } else { frm.FormParent = this; frm.EstadoDet = 1; frm._index = _drow; frm.LLenarCampos(_obj); } ESalida_Detalle obj = new ESalida_Detalle(); for (int i = 0; dgvSalida.Rows.Count > i; i++) { var nu_item = dgvSalida.Rows[i].Cells["nu_item"].Value.ToString(); var CodBar = dgvSalida.Rows[i].Cells["CodBar"].Value.ToString(); var nu_tf = dgvSalida.Rows[i].Cells["nu_tf"].Value.ToString(); var nu_op = dgvSalida.Rows[i].Cells["nu_op"].Value.ToString(); var id_mercado = dgvSalida.Rows[i].Cells["id_mercado"].Value.ToString(); var id_tipo = dgvSalida.Rows[i].Cells["id_tipo"].Value.ToString(); var tipo_tela = dgvSalida.Rows[i].Cells["tipo_tela"].Value.ToString(); var _id_producto = dgvSalida.Rows[i].Cells["id_producto"].Value.ToString(); var _ds_producto = dgvSalida.Rows[i].Cells["ds_producto"].Value.ToString(); var id_color = dgvSalida.Rows[i].Cells["id_color"].Value.ToString(); var ds_color = dgvSalida.Rows[i].Cells["ds_color"].Value.ToString(); var _nu_rollo = dgvSalida.Rows[i].Cells["_nu_rollo"].Value.ToString(); var qt_peso_actual = dgvSalida.Rows[i].Cells["peso_actual"].Value.ToString(); var qt_peso = dgvSalida.Rows[i].Cells["qt_peso"].Value.ToString(); var mt_precio = dgvSalida.Rows[i].Cells["mt_precio"].Value.ToString(); var mt_igv = dgvSalida.Rows[i].Cells["mt_igv"].Value.ToString(); var mt_total = dgvSalida.Rows[i].Cells["mt_total"].Value.ToString(); var id_cliente = dgvSalida.Rows[i].Cells["id_cliente"].Value.ToString(); obj.Nu_item = nu_item.ToString(); obj.CodBar = CodBar.ToString(); obj.Nu_tf = nu_tf.ToString(); obj.Nu_op = nu_op.ToString(); obj.Id_mercado = id_mercado.ToString(); obj.Id_tipo = id_tipo.ToString(); obj.Id_tiptela = tipo_tela.ToString(); obj.Id_producto = _id_producto.ToString(); obj.Ds_producto = _ds_producto.ToString(); obj.Id_color = id_color.ToString(); obj.Ds_color = ds_color.ToString(); obj.Qt_rollo = Convert.ToInt16(_nu_rollo); obj.Qt_peso_Actual = Convert.ToDecimal(qt_peso_actual); obj.Qt_peso = Convert.ToDecimal(qt_peso); obj.Mt_precio = Convert.ToDecimal(mt_precio); obj.Mt_igv = Convert.ToDecimal(mt_igv); obj.Mt_total = Convert.ToDecimal(mt_total); obj._id_cliente = id_cliente; frm.LlenarGrilla(obj, this); // frm._lblIdIngreso = (idIngreso); } frm.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void CargarGrid() { ESalida_Detalle obj = new ESalida_Detalle(); FrmSalidaProducto_ModifPopup frm = new FrmSalidaProducto_ModifPopup(); for (int i = 0; dgvSalida.Rows.Count > i; i++) { var nu_item = dgvSalida.Rows[i].Cells["nu_item"].Value.ToString(); var CodBar = dgvSalida.Rows[i].Cells["CodBar"].Value.ToString(); var nu_tf = dgvSalida.Rows[i].Cells["nu_tf"].Value.ToString(); var nu_op = dgvSalida.Rows[i].Cells["nu_op"].Value.ToString(); var id_mercado = dgvSalida.Rows[i].Cells["id_mercado"].Value.ToString(); var id_tipo = dgvSalida.Rows[i].Cells["id_tipo"].Value.ToString(); var tipo_tela = dgvSalida.Rows[i].Cells["tipo_tela"].Value.ToString(); var _id_producto = dgvSalida.Rows[i].Cells["id_producto"].Value.ToString(); var _ds_producto = dgvSalida.Rows[i].Cells["ds_producto"].Value.ToString(); var id_color = dgvSalida.Rows[i].Cells["id_color"].Value.ToString(); var ds_color = dgvSalida.Rows[i].Cells["ds_color"].Value.ToString(); var _nu_rollo = dgvSalida.Rows[i].Cells["_nu_rollo"].Value.ToString(); var qt_peso = dgvSalida.Rows[i].Cells["qt_peso"].Value.ToString(); var mt_precio = dgvSalida.Rows[i].Cells["mt_precio"].Value.ToString(); var mt_igv = dgvSalida.Rows[i].Cells["mt_igv"].Value.ToString(); var mt_total = dgvSalida.Rows[i].Cells["mt_total"].Value.ToString(); var id_cliente = dgvSalida.Rows[i].Cells["id_cliente"].Value.ToString(); obj.Nu_item = nu_item.ToString(); obj.CodBar = CodBar.ToString(); obj.Nu_tf = nu_tf.ToString(); obj.Nu_op = nu_op.ToString(); obj.Id_mercado = id_mercado.ToString(); obj.Id_tipo = id_tipo.ToString(); obj.Id_tiptela = tipo_tela.ToString(); obj.Id_producto = _id_producto.ToString(); obj.Ds_producto = _ds_producto.ToString(); obj.Id_color = id_color.ToString(); obj.Ds_color = ds_color.ToString(); obj.Qt_rollo = Convert.ToInt16(_nu_rollo); obj.Qt_peso = Convert.ToDecimal(qt_peso); obj.Mt_precio = Convert.ToDecimal(mt_precio); obj.Mt_igv = Convert.ToDecimal(mt_igv); obj.Mt_total = Convert.ToDecimal(mt_total); obj._id_cliente = id_cliente; frm.LlenarGrilla(obj, this); // frm._lblIdIngreso = (idIngreso); } //frm.pasard += new FrmProductoDetallePopup.pasar(ejecutarConsulta); //frm.EstadoDet = 1; frm.ShowDialog(); }