private void btnSave_Click(object sender, EventArgs e) { try { if (screen.Equals(1)) { foreach (GridViewRowInfo rowinfo in dgvData.Rows.Where(o => Convert.ToBoolean(o.Cells["S"].Value))) { RetDT.Add(rowinfo); } this.Close(); } else { //if (dgvData.Rows.Count > 0) //{ // Shipping_FG_Sell a = new Shipping_FG_Sell(Convert.ToString(dgvData.CurrentRow.Cells["SHNo"].Value) // //Convert.ToString(dgvData.CurrentRow.Cells["CodeNo"].Value) // ); // a.ShowDialog(); // // this.Close(); //} //else { Shipping_FG_Sell a = new Shipping_FG_Sell(); a.ShowDialog(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnSave_Click(object sender, EventArgs e) { try { if (screen.Equals(1)) { if (dgvData.Rows.Count > 0) { DocNo_tt.Text = Convert.ToString(dgvData.CurrentRow.Cells["DocNo"].Value); this.Close(); } } else { Shipping_FG_Sell a = new Shipping_FG_Sell(); a.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }