private void btTerminar_Click(object sender, EventArgs e) { try { DataGridViewColumn cl = null; ListSortDirection ld = ListSortDirection.Ascending; if (grOFL.SortedColumn != null) { cl = grOFL.SortedColumn; if (grOFL.SortOrder == System.Windows.Forms.SortOrder.Ascending) { ld = ListSortDirection.Ascending; } else { ld = ListSortDirection.Descending; } } frmAnexoOFL frm = new frmAnexoOFL(); frm.dr = sbrCargarOF(txOF.Text); frm.ShowDialog(); if (frm.Terminar) { fncTerminarOFL(frm.Lote, frm.UbiPie, frm.LotePie); } //grOFL.Sort(cl, ld); } catch { } }
private void terminarOFToolStripMenuItem_Click(object sender, EventArgs e) { string vEstado = cbEstado.Text; if (vEstado != "Acabada") { MessageBox.Show("la O.F.L. tiene que estar Acabada para poderla Terminar"); return; } try { frmAnexoOFL frm = new frmAnexoOFL(); frm.dr = sbrCargarOF(txOF.Text); frm.ShowDialog(); if (frm.Terminar) { fncTerminarOFL(txOF.Text); } } catch { } sbrCargaOF(); }
private void grOFL_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { DataGridViewColumn cl = null; ListSortDirection ld = ListSortDirection.Ascending; if (grOFL.SortedColumn != null) { cl = grOFL.SortedColumn; if (grOFL.SortOrder == System.Windows.Forms.SortOrder.Ascending) { ld = ListSortDirection.Ascending; } else { ld = ListSortDirection.Descending; } } string vOF = grOFL.Rows[e.RowIndex].Cells["IdOF"].Value.ToString(); string vCol = grOFL.Columns[e.ColumnIndex].Name; frmAnexoOFL frm = new frmAnexoOFL(); frm.dr = sbrCargarOF(vOF); frm.ShowDialog(); if (frm.Terminar) { fncTerminarOFL(frm.Lote, frm.UbiPie, frm.LotePie); } sbrCargar(); //grOFL.Sort(cl, ld); } catch { } }