private void editSelectedData() { try { if (clsClose_Other_Forms.IMS_IsFormOpen("frmAddBatchTime") == false) { frmAddBatchTime AddBatchTime = new frmAddBatchTime(MainScreen); AddBatchTime.Edit_AddDatatoCombo(dgvCart.Rows[dgvCart.CurrentRow.Index].Cells[0].Value.ToString(), dgvCart.Rows[dgvCart.CurrentRow.Index].Cells[10].Value.ToString(), dgvCart.Rows[dgvCart.CurrentRow.Index].Cells[9].Value.ToString(), clsDayConvert.getWeeDay_Number(dgvCart.Rows[dgvCart.CurrentRow.Index].Cells[3].Value.ToString()), dgvCart.Rows[dgvCart.CurrentRow.Index].Cells[4].Value.ToString(), dgvCart.Rows[dgvCart.CurrentRow.Index].Cells[5].Value.ToString(), dgvCart.Rows[dgvCart.CurrentRow.Index].Cells[7].Value.ToString(), dgvCart.Rows[dgvCart.CurrentRow.Index].Cells[8].Value.ToString()); AddBatchTime.ShowDialog(); AddBatchTime.BringToFront(); Add_Batches_to_Combobox("select BatchId, BatchName from tblBatch where BatchSatus='True'"); Add_Details_to_Datagridview(DgvQuery); } } catch { } }
private void button3_Click(object sender, EventArgs e) { if (clsClose_Other_Forms.IMS_IsFormOpen("frmAddBatchTime") == false) { frmAddBatchTime AddBatchTime = new frmAddBatchTime(MainScreen); AddBatchTime.ShowDialog(); AddBatchTime.BringToFront(); Add_Batches_to_Combobox("select BatchId, BatchName from tblBatch where BatchSatus='True'"); Add_Details_to_Datagridview(DgvQuery); } }