public addTable(string id, string ip, showTable t) { InitializeComponent(); this.id = id; this.ip = ip; frm1 = t; WebClient wc = new WebClient(); string xjson = wc.DownloadString("http://" + ip + "/menu.php"); var mm = JsonConvert.DeserializeObject(xjson); var jArray = JArray.Parse(mm.ToString()); fnames = new string[jArray.Count]; fids = new string[jArray.Count]; // Index the Array and select your CompanyID for (int i = 0; i < jArray.Count; i++) { fname = jArray[i]["foodName"].Value <string>(); fid = jArray[i]["foodId"].Value <string>(); fnames[i] = fname; fids[i] = fid; cmbFoods.Items.Add(fname); } // dataGridView1.DataSource = mm; }
public transfer(string url, string[] foodIds, string[] amounts, string[] foodName, showTable table) { InitializeComponent(); ip = url; this.foodIds = foodIds; this.amounts = amounts; this.foodName = foodName; this.table = table; this.table2 = table; showPeople(); }
public deleteFood(int[] ids, string url, showTable table) { InitializeComponent(); id = new int[ids.Length]; id = ids; ip = url; this.table = table; for (int i = 0; i < id.Length; i++) { //id[i] = ids[i]; comboBox1.Items.Add(id[i]); } }
public void sT(string ip, string tid) { showTable st = new showTable(ip, tid); st.Show(); }