예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            string workersite  = "http://127.0.0.1:8000/sqltable/workertable";
            var    workertable = JsonConvert.DeserializeObject <List <WorkerTable> >(ClassRequest.Get(workersite));
            string texttest;

            foreach (var WorkerTable in workertable)
            {
                Console.WriteLine(WorkerTable.Pk + "|" + WorkerTable.Fields.Firstname + " " + WorkerTable.Fields.Lastname + " " + WorkerTable.Fields.Patronymic);
                texttest = WorkerTable.Pk + "|" + WorkerTable.Fields.Firstname + " " + WorkerTable.Fields.Lastname + " " + WorkerTable.Fields.Patronymic;
                listBox1.Items.Add(texttest);
            }
        }
예제 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            string workersite          = "http://127.0.0.1:8000/sqltable/workerfullinfotable";
            var    workerfullinfotable = JsonConvert.DeserializeObject <WorkerFullinfo[]>(ClassRequest.Get(workersite));
            string texttest;


            foreach (var WorkerFullinfo in workerfullinfotable)
            {
                texttest = WorkerFullinfo.Pk + "|" + WorkerFullinfo.Fields.Address + " " + WorkerFullinfo.Fields.Phonenumber;
                listBox1.Items.Add(texttest);
            }



            //string objecttest = workerfullinfotable[2].Pk + "|";
            //listBox1.Items.Add(objecttest);
        }