Ejemplo n.º 1
0
        private void RefreshData()
        {
            string no    = this.textBox1.Text;
            string phone = this.textBox2.Text;

            List <Domitory> list   = new List <Domitory>();
            var             result = APIHelper.Post <ApiResult <List <Domitory> > >(WebSetting.GetUrl("Domitory/List"),
                                                                                    new Dictionary <string, object>()
            {
                { "Id", no },
                { "Phone", phone },
            });

            if (result.Code == 0)
            {
                list = result.Data;
            }
            else
            {
                MessageBox.Show(result.Msg);
            }

            this.dataGridView1.DataSource = list;
        }