private void btOFL_Click(object sender, EventArgs e) { string vOF = ""; try { vOF = grOFL.Rows[grOFL.CurrentCell.RowIndex].Cells["IdOF"].Value.ToString(); } catch { } if (vOF != "") { frmOF frm = new frmOF(); frm.vOFExt = vOF; frm.ShowDialog(); } }
private void grMat_CellContentClick(object sender, DataGridViewCellEventArgs e) { int vCol = e.ColumnIndex; int vFil = e.RowIndex; string vCampo = grMat.Columns[vCol].Name; string vProd = grMat.CurrentRow.Cells["Producto"].Value.ToString(); if (vCampo == "CanEnOF") { string vSql = cConstantes.SQL_OFL_Lista_CanPen; vSql = vSql.Replace("[?vbCr]", cConstantes.vbCtr.ToString()); vSql = vSql.Replace("[?vbLf]", cConstantes.vbLF.ToString()); vSql = vSql.Replace("[?Emp]", cParamXml.Emp.ToString()); vSql = vSql.Replace("[?Prod]", vProd); string vTabla = "GC_OrdenProd"; string vWhere = " where Empresa = [?Emp] and (Estado = 'Lanzada' or Estado = 'Producción') "; vWhere = ""; string vRes = cUtil.fncLista(vTabla, cParamXml.strConecProduc_Prueb, "IdOF", "", vWhere, vSql, "", false, "", "", "", "SQL"); if (vRes != "") { frmOF frm = new frmOF(); frm.vOFExt = vRes; frm.ShowDialog(); } } if (vCampo == "NeceTot") { string vSql = cConstantes.SQL_Prep_Nece; vSql = vSql.Replace("[?vbCr]", cConstantes.vbCtr.ToString()); vSql = vSql.Replace("[?vbLf]", cConstantes.vbLF.ToString()); vSql = vSql.Replace("[?Emp]", cParamXml.Emp.ToString()); vSql = vSql.Replace("[?Prod]", vProd); string vTabla = "GC_CabPrepEntregas"; string vWhere = ""; string vRes = cUtil.fncLista(vTabla, cParamXml.strConecProduc_Prueb, "IdOF", "", vWhere, vSql, "", false, "", "", "", "SQL"); if (vRes != "") { frmOF frm = new frmOF(); frm.vOFExt = vRes; frm.ShowDialog(); } } }
private void btOFL_Click(object sender, EventArgs e) { string vProd = ""; try { vProd = grMat.CurrentRow.Cells["Producto"].Value.ToString(); } catch { return; } if (vProd == "") { return; } string vMen = "Se creara una OFL para el producto: '" + vProd + "' .Esta seguro?"; string vTit = "Preparaciones"; if (MessageBox.Show(vMen, vTit, MessageBoxButtons.YesNo) == DialogResult.No) { return; } string vWhere = " Empresa = " + cParamXml.Emp + " and Producto = N'" + vProd + "'"; string vDes = cUtil.fncTraeCampo("Descripción", "GC_ProductoAnexos", vWhere, "", cParamXml.strConecProduc_Prueb, "SQL", true); if (vDes == "***Inex***") { vDes = ""; } if (vProd != "") { frmOF frm = new frmOF(); frm.vProdNuevo = vProd; frm.vDesProdNuevo = vDes; frm.vOFNueva = true; frm.ShowDialog(); } }