Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
 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]);
     }
 }
Ejemplo n.º 4
0
        public void sT(string ip, string tid)
        {
            showTable st = new showTable(ip, tid);

            st.Show();
        }