Beispiel #1
0
 private void btnImport_Click(object sender, EventArgs e)
 {
     //this.dataGridView1.DataSource = null;
     //byte[] buffer = GlobalVal.gloWebSerices.GetAllBiochemistryData();
     //if (buffer != null)
     //{
     //    DataSet ds = DataSetZip.Decompress(buffer);
     //    this.dataGridView1.DataSource = ds.Tables[0];
     //}
       webService.Service ws = new webService.Service();
       webService.Service sw=new webService.Service();
       byte[] buffer = sw.GetAllBiochemistryData();
       bool resoult = ws.InportBiochemistryData(buffer);
       if (resoult)
       {
     MessageBox.Show("导入成功");
       }
       else
       {
     MessageBox.Show("导入失败");
       }
 }
Beispiel #2
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            //this.dataGridView1.DataSource = null;
            //GlobalVal.gloWebSerices.GetAllBiochemistryDataCompleted += new webService.GetAllBiochemistryDataCompletedEventHandler(gloWebSerices_GetAllBiochemistryDataCompleted);
            //GlobalVal.gloWebSerices.GetAllBiochemistryDataAsync();
            //btnSearch.Enabled = false;
              webService.Service sw = new webService.Service();
              byte[] buffer = sw.GetAllBiochemistryData();
              if (buffer != null)
              {
            DataSet ds = DataSetZip.Decompress(buffer);
            this.dataGridView1.DataSource = ds.Tables[0];
            this.label1.Text = ds.Tables[0].Rows.Count.ToString();
              }

              BindGridData();
        }