private void button2_Click(object sender, EventArgs e) { if (dgv_Result.CurrentRow != null) { DEStockIn stockIn = new DEStockIn(); stockIn.StockInId = new Guid(dgv_Result.CurrentRow.Cells[1].Value.ToString()); stockIn.StockInDate = Convert.ToDateTime(dgv_Result.CurrentRow.Cells[2].Value.ToString()); stockIn.Product_Id = Convert.ToInt32(dgv_Result.CurrentRow.Cells[3].Value.ToString()); stockIn.Product_Code = Convert.ToString(dgv_Result.CurrentRow.Cells[4].Value.ToString()); stockIn.Product_Description = Convert.ToString(dgv_Result.CurrentRow.Cells[5].Value.ToString()); stockIn.NoOfCartons = Convert.ToInt32(dgv_Result.CurrentRow.Cells[6].Value.ToString()); stockIn.NoOfUnits = Convert.ToInt32(dgv_Result.CurrentRow.Cells[7].Value.ToString()); FrmProductArrival frm_ProductArrival = new FrmProductArrival(stockIn, this); frm_ProductArrival.ShowDialog(); // frm_ProductArrival.DisplayData(stockIn); } else { MessageBox.Show("Please Select Row"); } }
private void button1_Click(object sender, EventArgs e) { FrmProductArrival frm_ProductArrival = new FrmProductArrival(this); frm_ProductArrival.ShowDialog(); }