private void Rpot_ReceivedStock_Load(object sender, EventArgs e) { dtpFrom = dateTimePicker_From; dtpTo = dateTimePicker_to; cb_supp = cbxAddItemSupplier; DataSet log = new DataSet(); String sql = "SELECT*FROM tbl_AddS_Supplier"; SqlDataAdapter get = new SqlDataAdapter(sql, ConnectionDB.Connection()); DataTable ns = new DataTable(); get.Fill(ns); for (int i = 0; i < ns.Rows.Count; i++) { cbxAddItemSupplier.Items.Add(ns.Rows[i]["Business_Name"]); } pnl_Rpot_ReceiveS.Controls.Clear(); Rpot_ReceiveStock1 rrecevi = new Rpot_ReceiveStock1(); rrecevi.TopLevel = false; rrecevi.Visible = true; pnl_Rpot_ReceiveS.Controls.Add(rrecevi); }
private void btn_view_Click(object sender, EventArgs e) { pnl_Rpot_ReceiveS.Controls.Clear(); Rpot_ReceiveStock1 rrecevi = new Rpot_ReceiveStock1(); rrecevi.TopLevel = false; rrecevi.Visible = true; pnl_Rpot_ReceiveS.Controls.Add(rrecevi); }