예제 #1
0
        private void QueryInfo()
        {
            // 弹出加载提示框
            //DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(typeof(WaitingForm));
            cmd.ShowOpaqueLayer(225, true);

            // 开始异步
            BackgroundWorkerUtil.start_run(bw_DoWork, bw_RunWorkerCompleted, null, false);
        }
예제 #2
0
파일: UserForm.cs 프로젝트: radtek/YY
 private void UserForm_Load(object sender, EventArgs e)
 {
     MainForm = (Form)this.Parent;
     pageControl1.MainForm = MainForm;
     //this.BackColor = Color.FromArgb(243, 243, 243);
     cmd = new OpaqueCommand(AppContext.Session.waitControl);
     pageControl1.PageSize = Convert.ToInt32(AppContext.AppConfig.pagesize);
     cmd.ShowOpaqueLayer(0f);
     // 开始异步
     BackgroundWorkerUtil.start_run(bw_DoWork, bw_RunWorkerCompleted, null, false);
 }
예제 #3
0
        private void gv_deptInfo_RowCellClick(object sender, RowCellClickEventArgs e)
        {
            GridView gv = sender as GridView;

            CurrentrowItem = gv_BlackList.GetRow(e.RowHandle) as BlackListEntity;

            // 弹出加载提示框
            //DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(typeof(WaitingForm));
            cmd.ShowOpaqueLayer(225, true);
            // 开始异步
            BackgroundWorkerUtil.start_run(bw_DoWorkGetPatientList, bw_RunWorkerGetPatientListCompleted, null, false);
        }
예제 #4
0
 private void QueryInfo(int pageNo, int pageSize)
 {
     currPageNo = pageNo;
     // 弹出加载提示框
     //DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(typeof(WaitingForm));
     cmd.ShowOpaqueLayer(225, true);
     // 开始异步
     BackgroundWorkerUtil.start_run(bw_DoWork, bw_RunWorkerCompleted, null, false);
     if (!cb_AutoRefresh.Checked)
     {
         this.gc_PatientList.DataSource = null;
     }
 }
예제 #5
0
        private void gv_deptNCDInfo_RowCellClick(object sender, RowCellClickEventArgs e)
        {
            GridView gv = sender as GridView;

            //gv.SetRowCellValue(0, gv.Columns["check"], "1");
            //当前行 置为 选中状态
            if (gv_deptNCDInfoCheckRowHandle != e.RowHandle)
            {
                //将当前点击的选中
                gv.SetRowCellValue(e.RowHandle, gv.Columns["check"], "1");
                //将前面选中的取消 0表示 未选中
                gv.SetRowCellValue(gv_deptNCDInfoCheckRowHandle, gv.Columns["check"], "0");

                gv_deptNCDInfoCheckRowHandle = e.RowHandle;
                // 弹出加载提示框
                //DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(typeof(WaitingForm));
                cmd.ShowOpaqueLayer(225, true);
                // 开始异步
                BackgroundWorkerUtil.start_run(bw_DoWorkGetNCDDocList, bw_RunWorkerGetNCDDocListCompleted, null, false);
            }
        }
예제 #6
0
 private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     try
     {
         List <String> datas = e.Result as List <String>;
         if (datas.Count == 0)
         {
             return;
         }
         JObject objT = new JObject();
         if (TabpageName == "汇总信息")
         {
             #region 预约途径总数统计[0]
             objT = JObject.Parse(datas[0]);
             if (string.Compare(objT["state"].ToString(), "true", true) == 0)
             {
                 List <RegisterWayEntity> list = objT["result"].ToObject <List <RegisterWayEntity> >();
                 for (int i = 0; i < list.Count; i++)
                 {
                     if (i < 7)
                     {
                         Label labName = tPanel_registerWay.GetControlFromPosition(i, 0) as Label;
                         labName.Text = list[i].registerWay;
                         Label labNum = tPanel_registerWay.GetControlFromPosition(i, 1) as Label;
                         labNum.Text = list[i].bespeakCount;
                     }
                 }
             }
             else
             {
                 MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                 return;
             }
             #endregion
             #region 日期预约总数统计(折线图)[1]
             objT = JObject.Parse(datas[1]);
             if (string.Compare(objT["state"].ToString(), "true", true) != 0)
             {
                 MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                 return;
             }
             else
             {
                 List <ChartInfoEntity> chartList = objT["result"].ToObject <List <ChartInfoEntity> >();
                 chartControl1.CreateSeries("统计折线图", ViewType.Line, chartList, "registerTime", "bespeakCount");
                 chartControl1.Series[0].LabelsVisibility         = DevExpress.Utils.DefaultBoolean.True;
                 chartControl1.Series[0].CrosshairLabelVisibility = DevExpress.Utils.DefaultBoolean.True;
             }
             #endregion
             #region 科室开放数量预约总数概率统计[2]
             objT = JObject.Parse(datas[2]);
             if (string.Compare(objT["state"].ToString(), "true", true) == 0)
             {
                 List <StatisticsInfoEntity> list = objT["result"].ToObject <List <StatisticsInfoEntity> >();
                 this.gc_statistics.DataSource = list;
             }
             else
             {
                 MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                 return;
             }
             #endregion
             PageInfo.Add(0, TabpageName);
         }
         else if (TabpageName == "详细信息")
         {
             #region 详细信息
             objT = JObject.Parse(datas[0]);
             if (string.Compare(objT["state"].ToString(), "true", true) == 0)
             {
                 List <DeptInfoEntity> list = objT["result"].ToObject <List <DeptInfoEntity> >();
                 list[0].check               = "1";
                 gv_deptInfoCheckRowHandle   = 0;
                 this.gc_deptInfo.DataSource = list;
                 // 开始异步
                 BackgroundWorkerUtil.start_run(bw_DoWorkGetDocList, bw_RunWorkerGetDocListCompleted, null, false);
                 PageInfo.Add(1, TabpageName);
             }
             else
             {
                 MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                 return;
             }
             #endregion
         }
         else
         {
             #region 慢病统计
             objT = JObject.Parse(datas[0]);
             if (string.Compare(objT["state"].ToString(), "true", true) == 0)
             {
                 List <DeptInfoEntity> list = objT["result"].ToObject <List <DeptInfoEntity> >();
                 list[0].check = "1";
                 gv_deptNCDInfoCheckRowHandle   = 0;
                 this.gc_deptInfoNCD.DataSource = list;
                 // 开始异步
                 BackgroundWorkerUtil.start_run(bw_DoWorkGetNCDDocList, bw_RunWorkerGetNCDDocListCompleted, null, false);
                 PageInfo.Add(2, TabpageName);
             }
             else
             {
                 MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                 return;
             }
             #endregion
         }
     }
     catch (Exception ex)
     {
         MessageBoxUtils.Show(ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
     }
     finally
     {
         // 关闭加载提示框
         //DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm();
         cmd.HideOpaqueLayer();
     }
 }
예제 #7
0
파일: UserForm.cs 프로젝트: radtek/YY
 public void SearchData(int pageNo, int pageSize)
 {
     currPageNo    = pageNo;
     this.pageSize = Convert.ToInt32(AppContext.AppConfig.pagesize);
     BackgroundWorkerUtil.start_run(grid_bw_DoWork, grid_bw_RunWorkerCompleted, null, false);
 }