Exemplo n.º 1
0
        private void btnJump_Click(object sender, EventArgs e)
        {
            int count = 0;

            if (teJumpPage.Text.Trim().Length == 0)
            {
                return;
            }
            else
            {
                count = int.Parse(teJumpPage.Text.Trim());
            }
            if (count <= 0)
            {
                return;
            }
            if (count > PageNum)
            {
                MessageBoxUtils.Hint("跳转页码大于总页数", HintMessageBoxIcon.Error, MainForm);
                return;
            }

            CurrentPage = count;
            ExecuteQuery(currentPage);
        }
Exemplo n.º 2
0
        private void gcDict_Click(object sender, EventArgs e)
        {
            var selectedRow = gridView1.GetFocusedRow() as ClientVersionEntity;

            if (selectedRow == null)
            {
                return;
            }
            var edit = new ClientVersionEdit();

            edit.clientVersion = selectedRow;
            edit.Text          = "版本修改";
            if (edit.ShowDialog() == DialogResult.OK)
            {
                MessageBoxUtils.Hint("修改成功!", MainForm);
                DoWorkAsync(500, (o) =>
                {
                    Thread.Sleep(2700);
                    return(null);
                }, null, (r) =>
                {
                    cmd.ShowOpaqueLayer(255, true);
                    SearchData(true, pageControl1.CurrentPage, pageControl1.PageSize);
                });
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// 保存医生坐诊设置
 /// </summary>
 /// <param name="hospitalId">医院主键</param>
 /// <param name="deptId">科室主键</param>
 /// <param name="doctorId">医生ID</param>
 /// <param name="sittingArray">日期+时段+坐诊诊室的json数组</param>
 public void SaveDoctorSetting(string hospitalId, string deptId, string doctorId, dynamic sittingArray)
 {
     try
     {
         String  url   = AppContext.AppConfig.serverUrl + "sch/doctorSitting/saveSitting?";
         String  param = "hospitalId=" + hospitalId + "&deptId=" + deptId + "&doctorId=" + doctorId + "&sittingArray=" + sittingArray;
         String  data  = HttpClass.httpPost(url, param);
         JObject objT  = JObject.Parse(data);
         if (string.Compare(objT["state"].ToString(), "true", true) == 0)
         {
             MessageBoxUtils.Hint(objT["message"].ToString(), MainForm);
             DoctorSittingSelect(1, pageControl1.PageSize, DateTime.Now.ToString("yyy-MM-dd"), DateTime.Now.ToString("yyyy-MM-dd"));
             this.gcScheduled.DataSource = null;
             //dateEdit4.Text = "";
             //dateEdit3.Text = "";
             //lookUpEdit1.EditValue = "";
             //treeListLookUpEdit2.EditValue = "";
         }
         else
         {
             MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
         }
     }
     catch (Exception ex)
     {
         MessageBoxUtils.Show(ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
         Log4net.LogHelper.Error("保存医生坐诊设置错误信息:" + ex.Message);
     }
 }
Exemplo n.º 4
0
 private void bw_RunWorkerGetPatientListCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     try
     {
         String  data = e.Result as String;
         JObject objT = JObject.Parse(data);
         if (string.Compare(objT["state"].ToString(), "true", true) == 0)
         {
             List <BlackListPatientEntity> list = objT["result"]["list"].ToObject <List <BlackListPatientEntity> >();
             this.gc_PatientList.DataSource = list;
         }
         else
         {
             MessageBoxUtils.Hint(objT["message"].ToString(), HintMessageBoxIcon.Error, MainForm);
             //MessageBox.Show(objT["message"].ToString());
         }
     }
     catch (Exception ex)
     {
         //MessageBox.Show(ex.Message);
         throw new Exception(ex.InnerException.Message);
     }
     finally
     {
         try
         {
             // 关闭加载提示框
             //DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm();
             cmd.HideOpaqueLayer();
         }
         catch
         { }
     }
 }
Exemplo n.º 5
0
        private void repositoryItemButtonEdit2_Click(object sender, EventArgs e)
        {
            var selectedRow = gvRole.GetFocusedRow() as RoleEntity;

            if (selectedRow == null)
            {
                return;
            }

            if (MessageBoxUtils.Show("确定要删除吗?", MessageBoxButtons.OKCancel,
                                     MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MainForm) == DialogResult.OK)
            {
                cmd.ShowOpaqueLayer();
                String url = AppContext.AppConfig.serverUrl + "sys/sysRole/delete?id=" + selectedRow.id;
                this.DoWorkAsync(500, (o) => //耗时逻辑处理(此处不能操作UI控件,因为是在异步中)
                {
                    String data = HttpClass.httpPost(url);
                    return(data);
                }, null, (data) => //显示结果(此处用于对上面结果的处理,比如显示到界面上)
                {
                    JObject objT = JObject.Parse(data.ToString());
                    if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                    {
                        SearchData();
                        MessageBoxUtils.Hint("删除成功!", MainForm);
                    }
                    else
                    {
                        cmd.HideOpaqueLayer();
                        MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                             MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                    }
                });
            }
        }
Exemplo n.º 6
0
        private void button5_Click(object sender, EventArgs e)
        {
            int count = 0;

            if (textBox1.Text.Trim().Length == 0)
            {
                return;
            }
            else
            {
                count = int.Parse(textBox1.Text.Trim());
            }
            if (count <= 0)
            {
                return;
            }
            if (count > PageNum)
            {
                MessageBoxUtils.Hint("跳转页码大于总页数", HintMessageBoxIcon.Error);
                return;
            }

            CurrentPage = count;
            buttonEvent();
        }
 /// <summary>
 /// 强制叫号
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void 叫号ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToBoolean(AppContext.AppConfig.IsStart))
         {
             if (Form1.pCurrentWin.RecordHandle == IntPtr.Zero)
             {
                 Form1.pCurrentWin.FindDoctorValue();
             }
             if (Form1.pCurrentWin.RecordHandle != IntPtr.Zero)
             {
                 if (!Form1.pCurrentWin.IsTrueOrFalseVoice())
                 {
                     MessageBoxUtils.Hint("请先完成当前患者就诊或清空号码,才能呼叫下一病人!", null);
                     return;
                 }
             }
         }
         var selectedRow = this.gv_Pateion.GetFocusedRow() as Patient;
         if (selectedRow == null)
         {
             return;
         }
         CallNewPatient(selectedRow.triageId, HelperClass.clinicId);
     }
     catch (Exception ex)
     {
         Log4net.LogHelper.Error("右键叫号时错误信息:" + ex.Message);
     }
 }
        private void btnDel_Click(object sender, EventArgs e)
        {
            var selectedRow = gridView1.GetFocusedRow() as HospitalInfoEntity;

            if (selectedRow == null)
            {
                return;
            }

            if (MessageBoxUtils.Show("确定要删除吗?", MessageBoxButtons.OKCancel,
                                     MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MainForm) == DialogResult.OK)
            {
                String param = "?id=" + selectedRow.id;
                String url   = AppContext.AppConfig.serverUrl + "cms/hospital/delete" + param;
                cmd.ShowOpaqueLayer(225, true);
                this.DoWorkAsync(500, (o) => //耗时逻辑处理(此处不能操作UI控件,因为是在异步中)
                {
                    String data = HttpClass.httpPost(url);
                    return(data);
                }, null, (r) => //显示结果(此处用于对上面结果的处理,比如显示到界面上)
                {
                    JObject objT = JObject.Parse(r.ToString());
                    if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                    {
                        SearchData(pageControl1.CurrentPage, pageControl1.PageSize);
                        MessageBoxUtils.Hint("删除成功!", MainForm);
                    }
                    else
                    {
                        MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                    }
                });
            }
        }
Exemplo n.º 9
0
        private void repositoryItemButtonEdit2_Click(object sender, EventArgs e)
        {
            var selectedRow = gridView1.GetFocusedRow() as UserEntity;

            if (selectedRow == null)
            {
                return;
            }

            if (MessageBoxUtils.Show("确定要删除吗?", MessageBoxButtons.OKCancel,
                                     MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MainForm) == DialogResult.OK)
            {
                String  url  = AppContext.AppConfig.serverUrl + "sys/sysUser/delete?id=" + selectedRow.id;
                String  data = HttpClass.httpPost(url);
                JObject objT = JObject.Parse(data);
                if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                {
                    SearchData(1, pageControl1.PageSize);
                    MessageBoxUtils.Hint("删除用户成功!", MainForm);
                }
                else
                {
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                         MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                }
            }
        }
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDel_Click(object sender, EventArgs e)
 {
     try
     {
         //MessageBoxButtons messButton = MessageBoxButtons.OKCancel;
         DialogResult dr = MessageBoxUtils.Show("确定要删除吗?", MessageBoxButtons.OKCancel,
                                                MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MainForm);
         if (dr == DialogResult.OK)
         {
             String  param = "?" + "id=" + CickInfo.id;
             String  url   = AppContext.AppConfig.serverUrl + "cms/articleCategory/delete" + param;
             String  data  = HttpClass.httpPost(url);
             JObject objT  = JObject.Parse(data);
             if (string.Compare(objT["state"].ToString(), "true", true) == 0)
             {
                 MessageBoxUtils.Hint("删除成功!", MainForm);
                 ArticleCategoryCollection();
             }
             else
             {
                 MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                      MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBoxUtils.Show(ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error,
                              MessageBoxDefaultButton.Button1, MainForm);
         Log4net.LogHelper.Error("删除文章错误信息:" + ex.Message);
     }
 }
Exemplo n.º 11
0
        /// <summary>
        /// 保存按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void butContronl_Click(object sender, EventArgs e)
        {
            try
            {
                if (!dcHodily.Validate())
                {
                    return;
                }
                dcHodily.GetValue(holidayInfoEntity);
                String param = "?" + PackReflectionEntity <HolidayInfoEntity> .GetEntityToRequestParameters(holidayInfoEntity, true);

                String  url  = AppContext.AppConfig.serverUrl + "cms/holiday/save" + param;
                String  data = HttpClass.httpPost(url);
                JObject objT = JObject.Parse(data);
                if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                {
                    MessageBoxUtils.Hint("保存成功!", MainForm);
                    dcHodily.ClearValue();
                    groupBox1.Enabled = false;
                    HolidaySettingList(1, pageControl1.PageSize);
                }
                else
                {
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                }
            }
            catch (Exception ex)
            {
                MessageBoxUtils.Show(ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                Log4net.LogHelper.Error("节假日保存错误信息:" + ex.Message);
            }
        }
        private void btnUp_Click(object sender, EventArgs e)
        {
            var selectedRow = gridView1.GetFocusedRow() as ScheduledEntity;

            if (selectedRow == null)
            {
                return;
            }
            var edit = new ModifyNumberSourceEdit();

            edit.scheduled = selectedRow;
            if (edit.ShowDialog() == DialogResult.OK)
            {
                MessageBoxUtils.Hint("修改成功!", MainForm);
                //this.DoWorkAsync(500, (o) => //耗时逻辑处理(此处不能操作UI控件,因为是在异步中)
                //{
                //    Thread.Sleep(2700);
                //    return null;

                //}, null, (r) => //显示结果(此处用于对上面结果的处理,比如显示到界面上)
                //{
                //    cmd.ShowOpaqueLayer(255, true);
                //    SearchData(true, pageControl1.CurrentPage, pageControl1.PageSize);
                //});
            }
        }
Exemplo n.º 13
0
 private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
 {
     if (e.Column.Caption == "操作")
     {
         var selectedRow = gridView1.GetFocusedRow() as ClientVersionEntity;
         if (selectedRow == null)
         {
             return;
         }
         if (MessageBoxUtils.Show("确定要删除吗?", MessageBoxButtons.OKCancel,
                                  MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MainForm) == DialogResult.OK)
         {
             cmd.ShowOpaqueLayer(225, true);
             var param = "?id=" + selectedRow.id;
             var url   = AppContext.AppConfig.serverUrl + "sys/clientVersion/delete" + param;
             DoWorkAsync(500, (o) =>
             {
                 var data = HttpClass.httpPost(url);
                 return(data);
             }, null, (r) =>
             {
                 var objT = JObject.Parse(r.ToString());
                 if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                 {
                     SearchData(false, pageControl1.CurrentPage, pageControl1.PageSize);
                     MessageBoxUtils.Hint("删除成功!", MainForm);
                 }
                 else
                 {
                     MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                          MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                 }
             });
         }
     }
     else
     {
         var selectedRow = gridView1.GetFocusedRow() as ClientVersionEntity;
         if (selectedRow == null)
         {
             return;
         }
         var edit = new ClientVersionEdit();
         edit.clientVersion = selectedRow;
         edit.Text          = "版本修改";
         if (edit.ShowDialog() == DialogResult.OK)
         {
             MessageBoxUtils.Hint("修改成功!", MainForm);
             DoWorkAsync(500, (o) =>
             {
                 Thread.Sleep(2700);
                 return(null);
             }, null, (r) =>
             {
                 cmd.ShowOpaqueLayer(255, true);
                 SearchData(true, pageControl1.CurrentPage, pageControl1.PageSize);
             });
         }
     }
 }
Exemplo n.º 14
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            var selectedRow = gridView1.GetFocusedRow() as ClientVersionEntity;

            if (selectedRow == null)
            {
                return;
            }
            if (MessageBoxUtils.Show("确定要删除吗?", MessageBoxButtons.OKCancel,
                                     MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MainForm) == DialogResult.OK)
            {
                cmd.ShowOpaqueLayer(225, true);
                var param = "?id=" + selectedRow.id;
                var url   = AppContext.AppConfig.serverUrl + "sys/clientVersion/delete" + param;
                DoWorkAsync(500, (o) =>
                {
                    var data = HttpClass.httpPost(url);
                    return(data);
                }, null, (r) =>
                {
                    var objT = JObject.Parse(r.ToString());
                    if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                    {
                        SearchData(false, pageControl1.CurrentPage, pageControl1.PageSize);
                        MessageBoxUtils.Hint("删除成功!", MainForm);
                    }
                    else
                    {
                        MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                             MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                    }
                });
            }
        }
Exemplo n.º 15
0
 //异步下载
 void DownLoadFile(object Args)
 {
     // 远程获取目标页面源码
     try
     {
         string    strTargetHtml = string.Empty;
         String[]  args          = Args as String[];
         WebClient wc            = new WebClient();
         wc.DownloadFile(args[0], args[1]);
         wc.Dispose();
     }
     catch (Exception e)
     {
         String Msg = e.Message;
         if (e.InnerException != null)
         {
             Msg = e.InnerException.Message;
         }
         Action action = () =>
         {
             MessageBoxUtils.Hint(Msg, HintMessageBoxIcon.Error, this);
         };
         Invoke(action);
     }
     finally
     {
         Action action = () =>
         {
             cmd.HideOpaqueLayer();
         };
         Invoke(action);
     }
 }
Exemplo n.º 16
0
 private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e)
 {
     if (treeList1.FocusedColumn == null)
     {
         return;
     }
     if (treeList1.FocusedColumn.Caption != "操作")
     {
         String id          = Convert.ToString(treeList1.FocusedNode.GetValue("id"));
         var    selectedRow = new MenuEntity();
         if (id == null)
         {
             return;
         }
         selectedRow.id = id;
         var form = new MenuEdit();
         form.menu = selectedRow;
         form.Text = "菜单修改";
         if (form.ShowDialog() == DialogResult.OK)
         {
             Thread.Sleep(300);
             cmd.ShowOpaqueLayer();
             SearchData();
             MessageBoxUtils.Hint("修改菜单成功!", MainForm);
         }
     }
 }
        private void btnSave_Click(object sender, EventArgs e)
        {
            //检验并取值
            if (!dcDeptInfo.Validate())
            {
                return;
            }
            dcDeptInfo.GetValue(deptInfo);

            if (logoServiceFilePath != null && logoServiceFilePath.Length != 0)
            {
                deptInfo.logoUrl = logoServiceFilePath;
            }

            if (pictureServiceFilePath != null && pictureServiceFilePath.Length != 0)
            {
                deptInfo.pictureUrl = pictureServiceFilePath;
            }
            //文本编辑框的内容要转编码,不然后台获取的时候会不对
            deptInfo.synopsis = HttpUtility.UrlEncode(deptInfo.synopsis, Encoding.UTF8);
            //请求接口
            String param = PackReflectionEntity <DeptInfoEntity> .GetEntityToRequestParameters(deptInfo, true);

            String url = AppContext.AppConfig.serverUrl + "cms/dept/save?";

            cmd.ShowOpaqueLayer();
            this.DoWorkAsync(0, (o) => //耗时逻辑处理(此处不能操作UI控件,因为是在异步中)
            {
                String data = HttpClass.httpPost(url, param);
                return(data);
            }, null, (data) => //显示结果(此处用于对上面结果的处理,比如显示到界面上)
            {
                cmd.HideOpaqueLayer();
                JObject objT = JObject.Parse(data.ToString());
                if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                {
                    pageControl1_Query(pageControl1.CurrentPage, pageControl1.PageSize);
                    groupBox1.Enabled = false;
                    //清除值
                    dcDeptInfo.ClearValue();
                    pbLogo.Image = null;
                    pbLogo.Refresh();
                    logoServiceFilePath = null;
                    pbPicture.Image     = null;
                    pbPicture.Refresh();
                    pictureServiceFilePath = null;
                    logoFilePath           = "";
                    pictureFilePath        = "";
                    MessageBoxUtils.Hint("保存成功!", MainForm);
                }
                else
                {
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                         MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                }
            });
        }
Exemplo n.º 18
0
        private void skinButton2_Click(object sender, EventArgs e)
        {
            ModifyPasswordForm form = new ModifyPasswordForm();

            if (form.ShowDialog() == DialogResult.OK)
            {
                MessageBoxUtils.Hint("修改密码成功!", this);
            }
        }
Exemplo n.º 19
0
        private void skinButton2_Click(object sender, EventArgs e)
        {
            var edit = new ClientVersionEdit();

            if (edit.ShowDialog() == DialogResult.OK)
            {
                MessageBoxUtils.Hint("保存成功!");
                SearchData(true, 1);
            }
        }
Exemplo n.º 20
0
        private void buttonControl3_Click(object sender, EventArgs e)
        {
            var Frm = new BlackListAddFrm();

            if (Frm.ShowDialog() == DialogResult.OK)
            {
                MessageBoxUtils.Hint("保存成功!", MainForm);
                QueryInfo(1, pageControl1.PageSize);
            }
        }
Exemplo n.º 21
0
        private void buttonControl1_Click(object sender, EventArgs e)
        {
            if (treeDeptStop.EditValue == null || treeDeptStop.EditValue.ToString().Length == 0)
            {
                MessageBoxUtils.Show("请选择停诊科室", MessageBoxButtons.OK, this);
                return;
            }
            if (treeDoctorStop.EditValue == null || treeDoctorStop.EditValue.ToString().Length == 0)
            {
                MessageBoxUtils.Show("请选择停诊医生", MessageBoxButtons.OK, this);
                return;
            }
            if (treeDeptTop.EditValue == null || treeDeptTop.EditValue.ToString().Length == 0)
            {
                MessageBoxUtils.Show("请选择顶班科室", MessageBoxButtons.OK, this);
                return;
            }
            if (treeDoctorTop.EditValue == null || treeDoctorTop.EditValue.ToString().Length == 0)
            {
                MessageBoxUtils.Show("请选择顶班医生", MessageBoxButtons.OK, this);
                return;
            }
            if (treePeriod.EditValue == null || treePeriod.EditValue.ToString().Length == 0)
            {
                MessageBoxUtils.Show("请选择午别", MessageBoxButtons.OK, this);
                return;
            }

            String url = AppContext.AppConfig.serverUrl + "sch/doctorStopRurn/stopDiagInstead?hospitalId=" + AppContext.Session.hospitalId
                         + "&outDeptId=" + treeDeptStop.EditValue + "&outDoctorId=" + treeDoctorStop.EditValue
                         + "&inDeptId=" + treeDeptTop.EditValue + "&inDoctorId=" + treeDoctorTop.EditValue
                         + "&period=" + treePeriod.EditValue;

            cmd.ShowOpaqueLayer();
            this.DoWorkAsync(500, (o) =>
            {
                String data = HttpClass.httpPost(url);
                return(data);
            }, null, (data) =>
            {
                JObject objT = JObject.Parse(data.ToString());
                if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Hint(objT["message"].ToString(), this);
                    this.Close();
                }
                else
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                    return;
                }
            });
        }
Exemplo n.º 22
0
 private void lueIntoDoctor_EditValueChanged(object sender, EventArgs e)
 {
     if (lueIntoDoctor.EditValue != null)
     {
         if (lueStopDoctor.EditValue == lueIntoDoctor.EditValue)
         {
             lueIntoDoctor.EditValue = null;
             MessageBoxUtils.Hint("转入医生不能与停诊医生相同", HintMessageBoxIcon.Error, this);
         }
     }
 }
 /// <summary>
 /// 当时间还没到时医生想呼叫下一位调用接口
 /// </summary>
 public void CallNewPatient(string triageId, string clinicId)
 {
     try
     {
         Dictionary <string, string> prament = new Dictionary <string, string>();
         prament.Add("triageId", triageId);
         prament.Add("clinicId", clinicId);
         RestSharpHelper.ReturnResult <List <string> >(InterfaceAddress.ForcedCall, prament, Method.POST, result =>
         {
             if (result.ResponseStatus == ResponseStatus.Completed)
             {
                 if (result.StatusCode == System.Net.HttpStatusCode.OK)
                 {
                     Log4net.LogHelper.Info("请求结果:" + string.Join(",", result.Data.ToArray()));
                     JObject objT = JObject.Parse(string.Join(",", result.Data.ToArray()));
                     if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                     {
                         _context.Send((s) => HelperClass.triageId          = objT["result"][0]["triageId"].ToString(), null);
                         _context.Send((s) => Form1.pCurrentWin.label2.Text = objT["result"][0]["smallCellShow"].ToString() + objT["result"][0]["nextCellShow"].ToString(), null);
                         if (Convert.ToBoolean(AppContext.AppConfig.WhetherToAssign))
                         {
                             string patientId            = objT["result"][0]["patientId"].ToString();
                             Form1.pCurrentWin.PatientId = patientId;
                             if (Convert.ToBoolean(AppContext.AppConfig.IsStart))
                             {
                                 _context.Send((s) => Form1.pCurrentWin.InputStr(patientId), null);
                             }
                             else
                             {
                                 _context.Send((s) => Form1.pCurrentWin.Assignment(patientId), null);
                             }
                         }
                         _context.Send((s) => PatientList(), null);
                     }
                     else
                     {
                         if (this.Size.Height == 28)
                         {
                             _context.Send((s) => MessageBoxUtils.Hint(objT["message"].ToString(), null), null);
                         }
                         else
                         {
                             _context.Send((s) => MessageBoxUtils.Hint(objT["message"].ToString(), Form1.pCurrentWin), null);
                         }
                     }
                 }
             }
         });
     }
     catch (Exception ex)
     {
         Log4net.LogHelper.Error("呼叫当前患者错误信息:" + ex.Message);
     }
 }
Exemplo n.º 24
0
        private void repositoryItemLookUpEdit1_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e)
        {
            int selectRow = gridView1.GetSelectedRows()[0];

            //if (e.OldValue.Equals("1"))
            //{
            //    this.gridView1.SetRowCellValue(selectRow, gridView1.Columns["status"], e.OldValue);
            //    MessageBoxUtils.Hint("不能修改停诊状态的排班", MainForm);
            //    return;
            //}

            if (MessageBoxUtils.Show("确定要修改状态吗?", MessageBoxButtons.OKCancel,
                                     MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MainForm) == DialogResult.OK)
            {
                var    selectedRow = gridView1.GetFocusedRow() as ScheduledEntity;
                String period      = "";
                if (selectedRow.am != null && selectedRow.am.Equals("√"))
                {
                    period = "0";
                }
                else if (selectedRow.pm != null && selectedRow.pm.Equals("√"))
                {
                    period = "1";
                }
                else if (selectedRow.night != null && selectedRow.night.Equals("√"))
                {
                    period = "2";
                }
                else if (selectedRow.allday != null && selectedRow.allday.Equals("√"))
                {
                    period = "3";
                }
                String param = "deptId=" + selectedRow.deptId + "&doctorId=" + selectedRow.doctorId
                               + "&period=" + period + "&workDate=" + selectedRow.workDate
                               + "&status=" + e.NewValue + "&hospitalId=" + AppContext.Session.hospitalId;
                String  url  = AppContext.AppConfig.serverUrl + "sch/doctorScheduPlan/updatestatus?" + param;
                String  data = HttpClass.httpPost(url);
                JObject objT = JObject.Parse(data);
                if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                {
                    MessageBoxUtils.Hint("修改成功!", MainForm);
                }
                else
                {
                    this.gridView1.SetRowCellValue(selectRow, gridView1.Columns["status"], e.OldValue);
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                }
            }
            else
            {
                this.gridView1.SetRowCellValue(selectRow, gridView1.Columns["status"], e.OldValue);
            }
        }
Exemplo n.º 25
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            var edit = new RoleEdit();

            if (edit.ShowDialog() == DialogResult.OK)
            {
                Thread.Sleep(300);
                cmd.ShowOpaqueLayer();
                SearchData();
                MessageBoxUtils.Hint("保存成功!", MainForm);
            }
        }
Exemplo n.º 26
0
        private void skinButton2_Click(object sender, EventArgs e)
        {
            var edit = new ClientVersionEdit();

            if (edit.ShowDialog() == DialogResult.OK)
            {
                Thread.Sleep(300);
                cmd.ShowOpaqueLayer(255, true);
                SearchData(true, 1, pageControl1.PageSize);
                MessageBoxUtils.Hint("保存成功!", MainForm);
            }
        }
        private void buttonControl1_Click(object sender, EventArgs e)
        {
            try
            {
                if (treePeriod.EditValue == null || treePeriod.EditValue.ToString().Length == 0)
                {
                    MessageBoxUtils.Show("请选择午别", MessageBoxButtons.OK, this);
                    return;
                }
                if (teSubsection.Text.Length == 0)
                {
                    MessageBoxUtils.Show("分段时间不能为空", MessageBoxButtons.OK, this);
                    return;
                }
                if (teNumSite.Text.Length == 0)
                {
                    MessageBoxUtils.Show("现场号数不能为空", MessageBoxButtons.OK, this);
                    return;
                }

                String url = AppContext.AppConfig.serverUrl + "sch/doctorScheduPlan/temporaryScene?hospitalId=" + AppContext.Session.hospitalId
                             + "&deptId=" + treeKeshi.EditValue + "&doctorId=" + treeDoctor.EditValue
                             + "&clinicId=" + treeClinc.EditValue + "&period=" + treePeriod.EditValue
                             + "&beginTime=" + teStart.Text + "&endTime=" + teEnd.Text
                             + "&segmentalDuration=" + teSubsection.Text + "&numSite=" + teNumSite.Text;
                cmd.ShowOpaqueLayer();
                this.DoWorkAsync(500, (o) =>
                {
                    String data = HttpClass.httpPost(url);
                    return(data);
                }, null, (data) =>
                {
                    JObject objT = JObject.Parse(data.ToString());
                    if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                    {
                        cmd.HideOpaqueLayer();
                        MessageBoxUtils.Hint(objT["message"].ToString(), this);
                        this.Close();
                    }
                    else
                    {
                        cmd.HideOpaqueLayer();
                        MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                        return;
                    }
                });
            }
            catch (Exception ex)
            {
                Log4net.LogHelper.Error("临时坐诊保存错误信息:" + ex.Message);
            }
        }
Exemplo n.º 28
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            var edit = new RoleDistributionEdit();

            edit.roleId = this.id;
            if (edit.ShowDialog() == DialogResult.OK)
            {
                Thread.Sleep(300);
                cmd.ShowOpaqueLayer();
                SearchData();
                MessageBoxUtils.Hint(edit.msg, true, MainForm);
            }
        }
Exemplo n.º 29
0
        private bool VerifyInfo()
        {
            //deStart.Text,
            //deEnd.Text
            if (treeDeptId.EditValue == null)
            {
                MessageBoxUtils.Hint("请选择科室", HintMessageBoxIcon.Error, MainForm);
                return(false);
            }
            if (deStart.EditValue == null)
            {
                MessageBoxUtils.Hint("请选择开始日期", HintMessageBoxIcon.Error, MainForm);
                return(false);
            }
            if (deEnd.EditValue == null)
            {
                MessageBoxUtils.Hint("请选择结束日期", HintMessageBoxIcon.Error, MainForm);
                return(false);
            }

            DateTime dtStart = new DateTime();
            DateTime dtEnd   = new DateTime();

            if (QueryDateType != "day")
            {
                dtStart = DateTime.ParseExact(deStart.Text + "-01", "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture);
                dtEnd   = DateTime.ParseExact(deEnd.Text + "-01", "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture);
            }
            else
            {
                dtStart = DateTime.ParseExact(deStart.Text, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture);
                dtEnd   = DateTime.ParseExact(deEnd.Text, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture);
            }
            if (dtEnd < dtStart)
            {
                MessageBoxUtils.Hint("结束日期需大于开始日期", HintMessageBoxIcon.Error, MainForm);
                return(false);
            }

            CurrentParam.hospitalId = AppContext.Session.hospitalId;
            CurrentParam.deptId     = treeDeptId.EditValue.ToString();
            CurrentParam.deptName   = treeDeptId.Text.ToString();
            CurrentParam.reportType = QueryDateType;
            CurrentParam.startDate  = deStart.Text;
            CurrentParam.endDate    = deEnd.Text;

            return(true);
        }
        /// <summary>
        /// 放号审核
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFhsh_Click(object sender, EventArgs e)
        {
            var edit = new NotOpenListEdit();

            edit.deptId     = treeDept.EditValue.ToString();
            edit.doctorId   = lueDoctor.EditValue.ToString();
            edit.beginDate  = deBegin.Text;
            edit.endDate    = deEnd.Text;
            edit.doctorList = lueDoctor.Properties.DataSource as List <DoctorInfoEntity>;
            if (edit.ShowDialog() == DialogResult.OK)
            {
                Thread.Sleep(300);
                SearchData();
                MessageBoxUtils.Hint("修改成功!", MainForm);
            }
        }