private List <Stocks> GetKioskStockByType(int kioskid, int type) { base.com.CommandText = "spGetKioskStockByType"; base.com.Parameters.Clear(); base.com.Parameters.AddWithValue("_KioskID", kioskid); base.com.Parameters.AddWithValue("_Type", type); // MySqlDataAdapter da = new MySqlDataAdapter(base.com); DataTable dt = new DataTable(); da.Fill(dt); var coll = new List <Stocks>(); foreach (DataRow row in dt.Rows) { var ins = new Stocks(); ins.Bind2(row); coll.Add(ins); } return(coll); }