Exemple #1
0
 private void DictEdit_Load(object sender, EventArgs e)
 {
     cmd             = new Xr.Common.Controls.OpaqueCommand(this);
     dcDict.DataType = typeof(DictEntity);
     if (dict != null)
     {
         dcDict.SetValue(dict);
     }
     else
     {
         dict = new DictEntity();
     }
 }
Exemple #2
0
        private void ModifyNumberSourceEdit_Load(object sender, EventArgs e)
        {
            cmd = new Xr.Common.Controls.OpaqueCommand(this);
            String sdName = "";

            if (scheduled.period.Equals("0"))
            {
                sdName = "上午";
            }
            if (scheduled.period.Equals("1"))
            {
                sdName = "下午";
            }
            if (scheduled.period.Equals("2"))
            {
                sdName = "晚上";
            }
            if (scheduled.period.Equals("3"))
            {
                sdName = "全天";
            }
            label1.Text = "科室:" + scheduled.deptName + "        医生:" + scheduled.doctorName + "        日期:" + scheduled.workDate + sdName;
            String param = "hospitalId=" + AppContext.Session.hospitalId + "&deptId=" + scheduled.deptId
                           + "&doctorId=" + scheduled.doctorId + "&workDate=" + scheduled.workDate
                           + "&period=" + scheduled.period;
            String url = AppContext.AppConfig.serverUrl + "sch/doctorScheduPlan/findScheduList?" + param;

            cmd.ShowOpaqueLayer(0f);
            this.DoWorkAsync(0, (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)
                {
                    List <SourceDataEntity> sourceDataList = objT["result"].ToObject <List <SourceDataEntity> >();
                    gcSourceData.DataSource = sourceDataList;
                    originalSourceDataList  = Xr.Common.Utils.Utils.Clone <List <SourceDataEntity> >(sourceDataList);
                    cmd.HideOpaqueLayer();
                }
                else
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                    return;
                }
            });
        }
Exemple #3
0
 public HolidaySettingForm()
 {
     InitializeComponent();
     MainForm = (Form)this.Parent;
     pageControl1.MainForm = MainForm;
     pageControl1.PageSize = Convert.ToInt32(AppContext.AppConfig.pagesize);
     cmd = new Xr.Common.Controls.OpaqueCommand(AppContext.Session.waitControl);
     cmd.ShowOpaqueLayer(225, false);
     HolidaySettingList(1, pageControl1.PageSize);
     #region
     //string StartYear = (DateTime.Now.Year-2).ToString();//获取当前年份
     //string SeparatedYear = (DateTime.Now.Year -(Convert.ToInt32(StartYear)-5)).ToString();
     //cmbYear.DataSource = Enumerable.Range(Convert.ToInt32(StartYear), Convert.ToInt32(SeparatedYear)).ToList();
     //cmbYear.SelectedIndex = cmbYear.Items.IndexOf(DateTime.Now.Year);
     #endregion
 }
Exemple #4
0
        private void OfficeEdit_Load(object sender, EventArgs e)
        {
            cmd = new Xr.Common.Controls.OpaqueCommand(this);
            //获取科室下拉框数据
            treeStopDeptId.Properties.DataSource               = AppContext.Session.deptList;
            treeStopDeptId.Properties.TreeList.KeyFieldName    = "id";
            treeStopDeptId.Properties.TreeList.ParentFieldName = "parentId";
            treeStopDeptId.Properties.DisplayMember            = "name";
            treeStopDeptId.Properties.ValueMember              = "id";

            //获取科室下拉框数据
            treeIntoDeptId.Properties.DataSource               = AppContext.Session.deptList;
            treeIntoDeptId.Properties.TreeList.KeyFieldName    = "id";
            treeIntoDeptId.Properties.TreeList.ParentFieldName = "parentId";
            treeIntoDeptId.Properties.DisplayMember            = "name";
            treeIntoDeptId.Properties.ValueMember              = "id";
            //默认选择选择第一个
            treeStopDeptId.EditValue = AppContext.Session.deptList[0].id;
        }
Exemple #5
0
 public DoctorsOfficeSettingFrm(DoctorSrtting doctorSetting, bool OneFirst)
 {
     InitializeComponent();
     #region  序初始设置
     MainForm   = (Form)this.Parent;
     ds         = doctorSetting;
     OneFirster = OneFirst;
     cmd        = new Xr.Common.Controls.OpaqueCommand(AppContext.Session.waitControl);
     cmd.ShowOpaqueLayer(225, false);
     this.txtDepartment.Text            = doctorSetting.deptName;
     this.txtDoctor.Text                = doctorSetting.doctorName;
     this.txtDate.Text                  = doctorSetting.workDate;
     this.txtTimeSlot.Text              = doctorSetting.periodTxt;
     treeList2.OptionsBehavior.Editable = false;
     treeList2.KeyFieldName             = "id";//设置ID
     treeList2.DataSource               = DoctorSittingSettingForm.clinicInfo;
     cmd.HideOpaqueLayer();
     #endregion
 }
        private void LogForm_Load(object sender, EventArgs e)
        {
            MainForm = (Form)this.Parent;
            pageControl1.MainForm = MainForm;
            cmd = new Xr.Common.Controls.OpaqueCommand(AppContext.Session.waitControl);
            cmd.ShowOpaqueLayer(0f);
            pageControl1.PageSize = Convert.ToInt32(AppContext.AppConfig.pagesize);
            String url = AppContext.AppConfig.serverUrl + "sys/sysOffice/findAll";

            this.DoWorkAsync(0, (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)
                {
                    List <OfficeEntity> officeList                  = objT["result"].ToObject <List <OfficeEntity> >();
                    treeCompany.Properties.DataSource               = officeList; //绑定数据           
                    treeCompany.Properties.TreeList.KeyFieldName    = "id";       //设置ID  
                    treeCompany.Properties.TreeList.ParentFieldName = "parentId"; //设置PreID  
                    treeCompany.Properties.DisplayMember            = "name";     //要在树里展示的
                    treeCompany.Properties.ValueMember              = "id";       //对应的value

                    treeOffice.Properties.DataSource               = officeList;  //绑定数据           
                    treeOffice.Properties.TreeList.KeyFieldName    = "id";        //设置ID  
                    treeOffice.Properties.TreeList.ParentFieldName = "parentId";  //设置PreID  
                    treeOffice.Properties.DisplayMember            = "name";      //要在树里展示的
                    treeOffice.Properties.ValueMember              = "id";        //对应的value

                    SearchData(true, 1, pageControl1.PageSize);
                }
                else
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                         MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                }
            });
        }
        private void LogForm_Load(object sender, EventArgs e)
        {
            MainForm = (Form)this.Parent;
            pageControl1.MainForm = MainForm;
            pageControl1.PageSize = Convert.ToInt32(AppContext.AppConfig.pagesize);
            cmd = new Xr.Common.Controls.OpaqueCommand(AppContext.Session.waitControl);
            deBegin.EditValue = DateTime.Now.ToString("yyyy-MM-dd");
            deEnd.EditValue   = DateTime.Now.ToString("yyyy-MM-dd");
            //获取可操作科室
            String url = AppContext.AppConfig.serverUrl + "cms/dept/qureyOperateDept";

            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)
                {
                    List <DeptEntity> deptList = objT["result"]["deptList"].ToObject <List <DeptEntity> >();
                    //DeptEntity dept = new DeptEntity();
                    //dept.id = "`";
                    //dept.name = "全部";
                    //deptList.Insert(0, dept);
                    treeDept.Properties.DataSource               = deptList;
                    treeDept.Properties.TreeList.KeyFieldName    = "id";
                    treeDept.Properties.TreeList.ParentFieldName = "parentId";
                    treeDept.Properties.DisplayMember            = "name";
                    treeDept.Properties.ValueMember              = "id";
                    treeDept.EditValue = deptList[0].id;

                    SearchData(true, 1, pageControl1.PageSize);
                }
                else
                {
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                    return;
                }
            });
        }
Exemple #8
0
        /// <summary>
        /// 窗口加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ScheduledListForm_Load(object sender, EventArgs e)
        {
            MainForm          = (Form)this.Parent;
            deBegin.EditValue = DateTime.Now.ToString("yyyy-MM-dd");
            deEnd.EditValue   = DateTime.Now.ToString("yyyy-MM-dd");
            cmd = new Xr.Common.Controls.OpaqueCommand(AppContext.Session.waitControl);

            List <DeptEntity> deptList = Clone <List <DeptEntity> >(AppContext.Session.deptList);
            DeptEntity        dept     = new DeptEntity();

            dept.id   = "`";
            dept.name = "全部";
            deptList.Insert(0, dept);
            treeDept.Properties.DataSource               = deptList;
            treeDept.Properties.TreeList.KeyFieldName    = "id";
            treeDept.Properties.TreeList.ParentFieldName = "parentId";
            treeDept.Properties.DisplayMember            = "name";
            treeDept.Properties.ValueMember              = "id";
            treeDept.EditValue = dept.id;

            //合并值相同的单元格
            gridView1.OptionsView.AllowCellMerge = true;
            //设置表格中状态下拉框的数据
            List <DictEntity> dictList = new List <DictEntity>();
            DictEntity        dict     = new DictEntity();

            dict.value = "0";
            dict.label = "正常";
            dictList.Add(dict);
            dict       = new DictEntity();
            dict.value = "1";
            dict.label = "停诊";
            dictList.Add(dict);
            repositoryItemLookUpEdit1.DataSource    = dictList;
            repositoryItemLookUpEdit1.DisplayMember = "label";
            repositoryItemLookUpEdit1.ValueMember   = "value";
            repositoryItemLookUpEdit1.ShowHeader    = false;
            repositoryItemLookUpEdit1.ShowFooter    = false;
            SearchData();
        }
Exemple #9
0
        private void MenuEdit_Load(object sender, EventArgs e)
        {
            cmd = new Xr.Common.Controls.OpaqueCommand(this);
            cmd.ShowOpaqueLayer(0f);
            dcMenu.DataType = typeof(MenuEntity);
            String extId = "";

            if (menu != null && menu.id != null)
            {
                extId = menu.id;
            }
            //获取下拉框数据
            String param = "?extId=" + extId;
            String url   = AppContext.AppConfig.serverUrl + "sys/sysMenu/treeData" + param;

            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)
                {
                    treeParent.Properties.DataSource               = objT["result"].ToObject <List <MenuEntity> >();
                    treeParent.Properties.TreeList.KeyFieldName    = "id";       //设置ID  
                    treeParent.Properties.TreeList.ParentFieldName = "parentId"; //设置PreID  
                    treeParent.Properties.DisplayMember            = "name";     //要在树里展示的
                    treeParent.Properties.ValueMember              = "id";       //对应的value
                    treeParent.EditValue = "1";

                    if (menu != null)
                    {
                        if (menu.id != null)
                        {
                            this.DoWorkAsync(500, (o) => //耗时逻辑处理(此处不能操作UI控件,因为是在异步中)
                            {
                                data = HttpClass.httpPost(AppContext.AppConfig.serverUrl + "sys/sysMenu/getMenu?menuId=" + menu.id);
                                return(data);
                            }, null, (data2) => //显示结果(此处用于对上面结果的处理,比如显示到界面上)
                            {
                                objT = JObject.Parse(data2.ToString());
                                if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                                {
                                    menu = objT["result"].ToObject <MenuEntity>();
                                    dcMenu.SetValue(menu);
                                    cmd.HideOpaqueLayer();
                                }
                                else
                                {
                                    cmd.HideOpaqueLayer();
                                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                                         MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                                }
                            });
                        }
                        else
                        {
                            menu.isShow = "1";
                            dcMenu.SetValue(menu);
                            cmd.HideOpaqueLayer();
                        }
                    }
                    else
                    {
                        menu = new MenuEntity();
                        cmd.HideOpaqueLayer();
                    }
                }
                else
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                         MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                }
            });
        }
Exemple #10
0
        private void ClientVersionEdit_Load(object sender, EventArgs e)
        {
            cmd = new Xr.Common.Controls.OpaqueCommand(this);
            cmd.ShowOpaqueLayer(225, false);
            dcClientVersion.DataType = typeof(ClientVersionEntity);
            String url = AppContext.AppConfig.serverUrl + "sys/sysDict/findByType?type=client_version_type";

            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)
                {
                    lueType.Properties.DataSource    = objT["result"].ToObject <List <DictEntity> >();
                    lueType.Properties.DisplayMember = "label";
                    lueType.Properties.ValueMember   = "value";
                    lueType.ItemIndex = 0;

                    if (clientVersion != null)
                    {
                        this.DoWorkAsync(500, (o) => //耗时逻辑处理(此处不能操作UI控件,因为是在异步中)
                        {
                            String data = HttpClass.httpPost(AppContext.AppConfig.serverUrl + "sys/clientVersion/get?id=" + clientVersion.id);
                            return(data);
                        }, null, (data2) => //显示结果(此处用于对上面结果的处理,比如显示到界面上)
                        {
                            objT = JObject.Parse(data2.ToString());
                            if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                            {
                                clientVersion   = objT["result"].ToObject <ClientVersionEntity>();
                                serviceFilePath = clientVersion.updateFilePath;
                                String[] strArr = clientVersion.updateFilePath.Split(new char[] { '/' });
                                dcClientVersion.SetValue(clientVersion);
                                teFileName.Text = strArr[strArr.Length - 1];
                                cmd.HideOpaqueLayer();
                            }
                            else
                            {
                                cmd.HideOpaqueLayer();
                                MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                                     MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                                return;
                            }
                        });
                    }
                    else
                    {
                        cmd.HideOpaqueLayer();
                        clientVersion = new ClientVersionEntity();
                    }
                }
                else
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                         MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                    return;
                }
            });
        }
Exemple #11
0
        private void RoleEdit_Load(object sender, EventArgs e)
        {
            cmd = new Xr.Common.Controls.OpaqueCommand(this);
            cmd.ShowOpaqueLayer(0f);

            dcRole.DataType = typeof(RoleEntity);

            //获取下拉框数据
            String url = AppContext.AppConfig.serverUrl + "sys/sysRole/getDropDownData";

            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)
                {
                    treeParent.Properties.DataSource               = objT["result"]["officeList"].ToObject <List <OfficeEntity> >();
                    treeParent.Properties.TreeList.KeyFieldName    = "id";       //设置ID  
                    treeParent.Properties.TreeList.ParentFieldName = "parentId"; //设置PreID  
                    treeParent.Properties.DisplayMember            = "name";     //要在树里展示的
                    treeParent.Properties.ValueMember              = "id";       //对应的value
                    treeParent.EditValue = "2";

                    lueDataScope.Properties.DataSource    = objT["result"]["dataScopeDictList"].ToObject <List <OfficeEntity> >();
                    lueDataScope.Properties.DisplayMember = "name";
                    lueDataScope.Properties.ValueMember   = "code";
                    if (objT["result"]["dataScopeDictList"].Count() > 0)
                    {
                        lueDataScope.EditValue = objT["result"]["dataScopeDictList"][0]["code"].ToString();
                    }

                    treeList1.DataSource                 = objT["result"]["menuList"].ToObject <List <MenuEntity> >();
                    treeList1.KeyFieldName               = "id";                 //设置ID  
                    treeList1.ParentFieldName            = "parentId";           //设置PreID  
                    treeList1.OptionsView.ShowCheckBoxes = true;                 //显示多选框
                    treeList1.OptionsBehavior.AllowRecursiveNodeChecking = true; //选中父节点,子节点也会全部选中
                    treeList1.OptionsBehavior.Editable = false;                  //数据不可编辑
                    treeList1.ExpandAll();                                       //展开所有节点

                    if (role != null)
                    {
                        url = AppContext.AppConfig.serverUrl + "sys/sysRole/getRole?roleId=" + role.id;
                        this.DoWorkAsync(500, (o) => //耗时逻辑处理(此处不能操作UI控件,因为是在异步中)
                        {
                            data = HttpClass.httpPost(url);
                            return(data);
                        }, null, (data2) => //显示结果(此处用于对上面结果的处理,比如显示到界面上)
                        {
                            objT = JObject.Parse(data2.ToString());
                            if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                            {
                                role = objT["result"].ToObject <RoleEntity>();
                                dcRole.SetValue(role);
                                String[] roleArray = role.menuIds.Split(',');
                                for (int i = 0; i < roleArray.Count(); i++)
                                {
                                    SetNodeChecked(roleArray[i], treeList1.Nodes);
                                }
                                oldName = role.name;
                                cmd.HideOpaqueLayer();
                            }
                            else
                            {
                                cmd.HideOpaqueLayer();
                                MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                                     MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                            }
                        });
                    }
                    else
                    {
                        role = new RoleEntity();
                        cmd.HideOpaqueLayer();
                    }
                }
                else
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                         MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                }
            });
        }
Exemple #12
0
        private void ModifyNumberSourceEdit_Load(object sender, EventArgs e)
        {
            cmd = new Xr.Common.Controls.OpaqueCommand(this);
            if (scheduled.mzType.Equals("2"))
            {
                cbTx.CheckState = CheckState.Checked;
            }
            String sdName = "";

            if (scheduled.period.Equals("0"))
            {
                sdName = "上午";
            }
            if (scheduled.period.Equals("1"))
            {
                sdName = "下午";
            }
            if (scheduled.period.Equals("2"))
            {
                sdName = "晚上";
            }
            if (scheduled.period.Equals("3"))
            {
                sdName = "全天";
            }
            label1.Text = "科室:" + scheduled.deptName + "        医生:" + scheduled.doctorName + "        日期:" + scheduled.workDate + sdName;
            String param = "hospitalId=" + AppContext.Session.hospitalId + "&deptId=" + scheduled.deptId
                           + "&doctorId=" + scheduled.doctorId + "&workDate=" + scheduled.workDate
                           + "&period=" + scheduled.period + "&isOpen=1";
            String url = AppContext.AppConfig.serverUrl + "sch/doctorScheduPlan/findScheduList?" + param;

            cmd.ShowOpaqueLayer(0f);
            this.DoWorkAsync(0, (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)
                {
                    List <SourceDataEntity> sourceDataList = objT["result"].ToObject <List <SourceDataEntity> >();
                    gcSourceData.DataSource = sourceDataList;

                    //获取默认出诊时间字典配置
                    url = AppContext.AppConfig.serverUrl + "cms/doctor/findDoctorVisitingDict";
                    this.DoWorkAsync(0, (o) => //耗时逻辑处理(此处不能操作UI控件,因为是在异步中)
                    {
                        String data2 = HttpClass.httpPost(url);
                        return(data2);
                    }, null, (data3) => //显示结果(此处用于对上面结果的处理,比如显示到界面上)
                    {
                        objT = JObject.Parse(data3.ToString());
                        if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                        {
                            defaultVisitTemplate             = objT["result"].ToObject <DefaultVisitEntity>();
                            defaultVisit                     = new DefaultVisitEntity();
                            String[] hyArr                   = defaultVisitTemplate.defaultSourceNumber.Split(new char[] { '-' });
                            defaultVisitTemplate.mStart      = defaultVisitTemplate.defaultVisitTimeAm.Substring(0, 5);
                            defaultVisitTemplate.mEnd        = defaultVisitTemplate.defaultVisitTimeAm.Substring(6, 5);
                            defaultVisitTemplate.mSubsection = defaultVisitTemplate.segmentalDuration;
                            defaultVisitTemplate.mScene      = hyArr[0];
                            defaultVisitTemplate.mOpen       = hyArr[1];
                            defaultVisitTemplate.mRoom       = hyArr[2];
                            defaultVisitTemplate.mEmergency  = hyArr[3];

                            defaultVisitTemplate.aStart      = defaultVisitTemplate.defaultVisitTimePm.Substring(0, 5);
                            defaultVisitTemplate.aEnd        = defaultVisitTemplate.defaultVisitTimePm.Substring(6, 5);
                            defaultVisitTemplate.aSubsection = defaultVisitTemplate.segmentalDuration;
                            defaultVisitTemplate.aScene      = hyArr[0];
                            defaultVisitTemplate.aOpen       = hyArr[1];
                            defaultVisitTemplate.aRoom       = hyArr[2];
                            defaultVisitTemplate.aEmergency  = hyArr[3];

                            defaultVisitTemplate.nStart      = defaultVisitTemplate.defaultVisitTimeNight.Substring(0, 5);
                            defaultVisitTemplate.nEnd        = defaultVisitTemplate.defaultVisitTimeNight.Substring(6, 5);
                            defaultVisitTemplate.nSubsection = defaultVisitTemplate.segmentalDuration;
                            defaultVisitTemplate.nScene      = hyArr[0];
                            defaultVisitTemplate.nOpen       = hyArr[1];
                            defaultVisitTemplate.nRoom       = hyArr[2];
                            defaultVisitTemplate.nEmergency  = hyArr[3];

                            defaultVisitTemplate.allStart      = defaultVisitTemplate.defaultVisitTimeAllDay.Substring(0, 5);
                            defaultVisitTemplate.allEnd        = defaultVisitTemplate.defaultVisitTimeAllDay.Substring(6, 5);
                            defaultVisitTemplate.allSubsection = defaultVisitTemplate.segmentalDuration;
                            defaultVisitTemplate.allScene      = hyArr[0];
                            defaultVisitTemplate.allOpen       = hyArr[1];
                            defaultVisitTemplate.allRoom       = hyArr[2];
                            defaultVisitTemplate.allEmergency  = hyArr[3];

                            defaultVisit.mStart      = defaultVisitTemplate.defaultVisitTimeAm.Substring(0, 5);
                            defaultVisit.mEnd        = defaultVisitTemplate.defaultVisitTimeAm.Substring(6, 5);
                            defaultVisit.mSubsection = defaultVisitTemplate.segmentalDuration;
                            defaultVisit.mScene      = hyArr[0];
                            defaultVisit.mOpen       = hyArr[1];
                            defaultVisit.mRoom       = hyArr[2];
                            defaultVisit.mEmergency  = hyArr[3];

                            defaultVisit.aStart      = defaultVisitTemplate.defaultVisitTimePm.Substring(0, 5);
                            defaultVisit.aEnd        = defaultVisitTemplate.defaultVisitTimePm.Substring(6, 5);
                            defaultVisit.aSubsection = defaultVisitTemplate.segmentalDuration;
                            defaultVisit.aScene      = hyArr[0];
                            defaultVisit.aOpen       = hyArr[1];
                            defaultVisit.aRoom       = hyArr[2];
                            defaultVisit.aEmergency  = hyArr[3];

                            defaultVisit.nStart      = defaultVisitTemplate.defaultVisitTimeNight.Substring(0, 5);
                            defaultVisit.nEnd        = defaultVisitTemplate.defaultVisitTimeNight.Substring(6, 5);
                            defaultVisit.nSubsection = defaultVisitTemplate.segmentalDuration;
                            defaultVisit.nScene      = hyArr[0];
                            defaultVisit.nOpen       = hyArr[1];
                            defaultVisit.nRoom       = hyArr[2];
                            defaultVisit.nEmergency  = hyArr[3];

                            defaultVisit.allStart      = defaultVisitTemplate.defaultVisitTimeAllDay.Substring(0, 5);
                            defaultVisit.allEnd        = defaultVisitTemplate.defaultVisitTimeAllDay.Substring(6, 5);
                            defaultVisit.allSubsection = defaultVisitTemplate.segmentalDuration;
                            defaultVisit.allScene      = hyArr[0];
                            defaultVisit.allOpen       = hyArr[1];
                            defaultVisit.allRoom       = hyArr[2];
                            defaultVisit.allEmergency  = hyArr[3];
                            String startTop            = "";
                            String endTop        = "";
                            String subsectionTop = "";
                            String sceneTop      = "";
                            String openTop       = "";
                            String roomTop       = "";

                            param = "deptId=" + scheduled.deptId + "&doctorId=" + scheduled.doctorId
                                    + "&hospitalId=" + AppContext.Session.hospitalId + "&period=" + scheduled.period;
                            url = AppContext.AppConfig.serverUrl + "cms/doctor/findVisitingTime?" + param;
                            this.DoWorkAsync(0, (o) => //耗时逻辑处理(此处不能操作UI控件,因为是在异步中)
                            {
                                data = HttpClass.httpPost(url);
                                return(data);
                            }, null, (data2) => //显示结果(此处用于对上面结果的处理,比如显示到界面上)
                            {
                                objT = JObject.Parse(data.ToString());
                                if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                                {
                                    List <WorkingDayEntity> workingDayList = objT["result"].ToObject <List <WorkingDayEntity> >();
                                    if (workingDayList.Count > 0)
                                    {
                                        startTop      = workingDayList[0].beginTime;
                                        endTop        = workingDayList[0].endTime;
                                        subsectionTop = workingDayList[0].segmentalDuration;
                                        sceneTop      = workingDayList[0].numSite;
                                        openTop       = workingDayList[0].numOpen;
                                        roomTop       = workingDayList[0].numClinic;
                                    }
                                    else
                                    {
                                        if (scheduled.period.Equals("0"))
                                        {
                                            startTop      = defaultVisit.mStart;
                                            endTop        = defaultVisit.mEnd;
                                            subsectionTop = defaultVisit.mSubsection;
                                            sceneTop      = defaultVisit.mScene;
                                            openTop       = defaultVisit.mOpen;
                                            roomTop       = defaultVisit.mRoom;
                                        }
                                        else if (scheduled.period.Equals("1"))
                                        {
                                            startTop      = defaultVisit.aStart;
                                            endTop        = defaultVisit.aEnd;
                                            subsectionTop = defaultVisit.aSubsection;
                                            sceneTop      = defaultVisit.aScene;
                                            openTop       = defaultVisit.aOpen;
                                            roomTop       = defaultVisit.aRoom;
                                        }
                                        else if (scheduled.period.Equals("2"))
                                        {
                                            startTop      = defaultVisit.nStart;
                                            endTop        = defaultVisit.nEnd;
                                            subsectionTop = defaultVisit.nSubsection;
                                            sceneTop      = defaultVisit.nScene;
                                            openTop       = defaultVisit.nOpen;
                                            roomTop       = defaultVisit.nRoom;
                                        }
                                        else if (scheduled.period.Equals("3"))
                                        {
                                            startTop      = defaultVisit.allStart;
                                            endTop        = defaultVisit.allEnd;
                                            subsectionTop = defaultVisit.allSubsection;
                                            sceneTop      = defaultVisit.allScene;
                                            openTop       = defaultVisit.allOpen;
                                            roomTop       = defaultVisit.allRoom;
                                        }
                                    }
                                    teStart.EditValue      = startTop;
                                    teEnd.EditValue        = endTop;
                                    teSubsection.EditValue = subsectionTop;
                                    teScene.EditValue      = sceneTop;
                                    teOpen.EditValue       = openTop;
                                    teRoom.EditValue       = roomTop;

                                    cmd.HideOpaqueLayer();
                                }
                            });
                        }
                        else
                        {
                            cmd.HideOpaqueLayer();
                            MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                            return;
                        }
                    });
                }
                else
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                    return;
                }
            });
        }
Exemple #13
0
        private void AddRowNumberEdit_Load(object sender, EventArgs e)
        {
            cmd = new Xr.Common.Controls.OpaqueCommand(this);
            String sdName = "";

            if (scheduled.period.Equals("0"))
            {
                sdName = "上午";
            }
            if (scheduled.period.Equals("1"))
            {
                sdName = "下午";
            }
            if (scheduled.period.Equals("2"))
            {
                sdName = "晚上";
            }
            if (scheduled.period.Equals("3"))
            {
                sdName = "全天";
            }
            label1.Text = "科室:" + scheduled.deptName + "        医生:" + scheduled.doctorName + "        日期:" + scheduled.workDate + sdName;
            String param = "hospitalId=" + AppContext.Session.hospitalId + "&deptId=" + scheduled.deptId
                           + "&doctorId=" + scheduled.doctorId + "&workDate=" + scheduled.workDate
                           + "&period=" + scheduled.period;
            String url = AppContext.AppConfig.serverUrl + "sch/doctorScheduPlan/getLaveTime?" + param;

            cmd.ShowOpaqueLayer(0f);
            this.DoWorkAsync(0, (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)
                {
                    JArray dyList = JArray.Parse(objT["result"].ToString());
                    List <SourceDataEntity> sdList = new List <SourceDataEntity>();
                    for (int i = 0; i < dyList.Count; i++)
                    {
                        JArray arr          = JArray.Parse(dyList[i].ToString());
                        SourceDataEntity sd = new SourceDataEntity();
                        sd.workDate         = arr[0].ToString();
                        sd.beginTime        = arr[1].ToString();
                        sd.endTime          = arr[2].ToString();
                        sd.mzType           = "1";
                        sd.numSite          = "0";
                        sd.numOpen          = "0";
                        sd.numClinic        = "0";
                        sd.numYj            = "0";
                        sdList.Add(sd);
                    }
                    gcSourceData.DataSource = sdList;
                    cmd.HideOpaqueLayer();
                }
                else
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                    if (objT["message"].ToString().Equals("只能对当前时段进行增加排班号源"))
                    {
                        DialogResult = DialogResult.Cancel;
                    }
                    return;
                }
            });
        }
Exemple #14
0
 private void WorkNumVerificationEdit_Load(object sender, EventArgs e)
 {
     cmd = new Xr.Common.Controls.OpaqueCommand(this);
 }
        private void TemporaryStopFrm_Load(object sender, EventArgs e)
        {
            cmd = new Xr.Common.Controls.OpaqueCommand(this);

            //午别下拉框数据
            List <DictEntity> dictList = new List <DictEntity>();
            DictEntity        dict     = new DictEntity();

            dict.value = "0";
            dict.label = "上午";
            dictList.Add(dict);
            dict       = new DictEntity();
            dict.value = "1";
            dict.label = "下午";
            dictList.Add(dict);
            dict       = new DictEntity();
            dict.value = "2";
            dict.label = "晚上";
            dictList.Add(dict);
            dict       = new DictEntity();
            dict.value = "3";
            dict.label = "全天";
            dictList.Add(dict);
            treePeriod.Properties.DataSource    = dictList;
            treePeriod.Properties.DisplayMember = "label";
            treePeriod.Properties.ValueMember   = "value";

            cmd.ShowOpaqueLayer();
            //获取默认出诊时间字典配置
            String url = AppContext.AppConfig.serverUrl + "cms/doctor/findDoctorVisitingDict";

            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)
                {
                    defaultVisitTemplate = objT["result"].ToObject <DefaultVisitEntity>();

                    String[] hyArr = defaultVisitTemplate.defaultSourceNumber.Split(new char[] { '-' });
                    defaultVisitTemplate.mStart      = defaultVisitTemplate.defaultVisitTimeAm.Substring(0, 5);
                    defaultVisitTemplate.mEnd        = defaultVisitTemplate.defaultVisitTimeAm.Substring(6, 5);
                    defaultVisitTemplate.mSubsection = defaultVisitTemplate.segmentalDuration;
                    defaultVisitTemplate.mScene      = hyArr[0];
                    defaultVisitTemplate.mOpen       = hyArr[1];
                    defaultVisitTemplate.mRoom       = hyArr[2];
                    defaultVisitTemplate.mEmergency  = hyArr[3];

                    defaultVisitTemplate.aStart      = defaultVisitTemplate.defaultVisitTimePm.Substring(0, 5);
                    defaultVisitTemplate.aEnd        = defaultVisitTemplate.defaultVisitTimePm.Substring(6, 5);
                    defaultVisitTemplate.aSubsection = defaultVisitTemplate.segmentalDuration;
                    defaultVisitTemplate.aScene      = hyArr[0];
                    defaultVisitTemplate.aOpen       = hyArr[1];
                    defaultVisitTemplate.aRoom       = hyArr[2];
                    defaultVisitTemplate.aEmergency  = hyArr[3];

                    defaultVisitTemplate.nStart      = defaultVisitTemplate.defaultVisitTimeNight.Substring(0, 5);
                    defaultVisitTemplate.nEnd        = defaultVisitTemplate.defaultVisitTimeNight.Substring(6, 5);
                    defaultVisitTemplate.nSubsection = defaultVisitTemplate.segmentalDuration;
                    defaultVisitTemplate.nScene      = hyArr[0];
                    defaultVisitTemplate.nOpen       = hyArr[1];
                    defaultVisitTemplate.nRoom       = hyArr[2];
                    defaultVisitTemplate.nEmergency  = hyArr[3];

                    defaultVisitTemplate.allStart      = defaultVisitTemplate.defaultVisitTimeAllDay.Substring(0, 5);
                    defaultVisitTemplate.allEnd        = defaultVisitTemplate.defaultVisitTimeAllDay.Substring(6, 5);
                    defaultVisitTemplate.allSubsection = defaultVisitTemplate.segmentalDuration;
                    defaultVisitTemplate.allScene      = hyArr[0];
                    defaultVisitTemplate.allOpen       = hyArr[1];
                    defaultVisitTemplate.allRoom       = hyArr[2];
                    defaultVisitTemplate.allEmergency  = hyArr[3];
                    cmd.HideOpaqueLayer();
                }
                else
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                    return;
                }
            });
        }
        /// <summary>
        /// 窗口加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ScheduledListForm_Load(object sender, EventArgs e)
        {
            MainForm          = (Form)this.Parent;
            deBegin.EditValue = DateTime.Now.ToString("yyyy-MM-dd");
            deEnd.EditValue   = DateTime.Now.AddDays(11).ToString("yyyy-MM-dd");//修改为当前日期+11之后的日期。
            cmd = new Xr.Common.Controls.OpaqueCommand(AppContext.Session.waitControl);

            bool hzFlag = false;

            foreach (FunctionEntity function in AppContext.Session.functionList)
            {
                if (function.name.Equals("已排班列表门诊特需互转"))
                {
                    hzFlag = true;
                    break;
                }
            }
            if (hzFlag)
            {
                buttonControl2.Visible = hzFlag;
            }
            else
            {
                buttonControl4.Location = new Point(25, 47);
            }

            bool fhFlag = false;

            foreach (FunctionEntity function in AppContext.Session.functionList)
            {
                if (function.name.Equals("已排班列表放号审核"))
                {
                    fhFlag = true;
                    break;
                }
            }
            if (hzFlag && fhFlag)
            {
                buttonControl3.Visible = fhFlag;
            }
            else if (!hzFlag && fhFlag)
            {
                buttonControl3.Visible  = fhFlag;
                buttonControl3.Location = new Point(131, 47);
            }


            bool addFlag = false;

            foreach (FunctionEntity function in AppContext.Session.functionList)
            {
                if (function.name.Equals("已排班列表增加排班"))
                {
                    addFlag = true;
                    break;
                }
            }

            buttonControl1.Visible = addFlag;
            if (hzFlag && !fhFlag)
            {
                buttonControl1.Location = new Point(239, 47);
            }
            if (!hzFlag && fhFlag)
            {
                buttonControl1.Location = new Point(217, 47);
            }
            else if (!hzFlag && !fhFlag)
            {
                buttonControl1.Location = new Point(131, 47);
            }
            //合并值相同的单元格
            gridView1.OptionsView.AllowCellMerge = true;
            //设置表格中状态下拉框的数据
            List <DictEntity> dictList = new List <DictEntity>();
            DictEntity        dict     = new DictEntity();

            dict.value = "0";
            dict.label = "正常";
            dictList.Add(dict);
            dict       = new DictEntity();
            dict.value = "1";
            dict.label = "停诊";
            dictList.Add(dict);
            repositoryItemLookUpEdit1.DataSource    = dictList;
            repositoryItemLookUpEdit1.DisplayMember = "label";
            repositoryItemLookUpEdit1.ValueMember   = "value";
            repositoryItemLookUpEdit1.ShowHeader    = false;
            repositoryItemLookUpEdit1.ShowFooter    = false;

            lookUpEdit1.Properties.DataSource    = dictList;
            lookUpEdit1.Properties.DisplayMember = "label";
            lookUpEdit1.Properties.ValueMember   = "value";
            lookUpEdit1.ItemIndex = 0;

            List <DictEntity> dictList2 = new List <DictEntity>();

            dict       = new DictEntity();
            dict.value = "`";
            dict.label = "全部";
            dictList2.Add(dict);
            dict       = new DictEntity();
            dict.value = "0";
            dict.label = "放号";
            dictList2.Add(dict);
            dict       = new DictEntity();
            dict.value = "1";
            dict.label = "未放号";
            dictList2.Add(dict);

            lookUpEdit2.Properties.DataSource    = dictList2;
            lookUpEdit2.Properties.DisplayMember = "label";
            lookUpEdit2.Properties.ValueMember   = "value";
            lookUpEdit2.ItemIndex = 0;

            cmd.ShowOpaqueLayer(0f);
            //获取可操作科室
            String url = AppContext.AppConfig.serverUrl + "cms/dept/qureyOperateDept";

            this.DoWorkAsync(0, (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)
                {
                    List <DeptEntity> deptList = objT["result"]["deptList"].ToObject <List <DeptEntity> >();
                    DeptEntity dept            = new DeptEntity();
                    dept.id   = "`";
                    dept.name = "全部";
                    //deptList.Insert(0, dept);
                    treeDept.Properties.DataSource               = deptList;
                    treeDept.Properties.TreeList.KeyFieldName    = "id";
                    treeDept.Properties.TreeList.ParentFieldName = "parentId";
                    treeDept.Properties.DisplayMember            = "name";
                    treeDept.Properties.ValueMember              = "id";
                    treeDept.EditValue = AppContext.Session.deptList[0].id;

                    SearchData();
                }
                else
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MainForm);
                    return;
                }
            });
        }
        private void OfficeEdit_Load(object sender, EventArgs e)
        {
            cmd = new Xr.Common.Controls.OpaqueCommand(this);
            cmd.ShowOpaqueLayer(0f);
            dcOffice.DataType = typeof(OfficeEntity);

            //获取下拉框数据
            String url = AppContext.AppConfig.serverUrl + "sys/sysOffice/getDropDownData";

            this.DoWorkAsync(250, (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)
                {
                    treeParent.Properties.DataSource               = objT["result"]["officeList"].ToObject <List <OfficeEntity> >();
                    treeParent.Properties.TreeList.KeyFieldName    = "id";       //设置ID  
                    treeParent.Properties.TreeList.ParentFieldName = "parentId"; //设置PreID  
                    treeParent.Properties.DisplayMember            = "name";     //要在树里展示的
                    treeParent.Properties.ValueMember              = "id";       //对应的value
                    treeParent.EditValue = "2";

                    treeArea.Properties.DataSource               = objT["result"]["areaList"].ToObject <List <OfficeEntity> >();
                    treeArea.Properties.TreeList.KeyFieldName    = "id";       //设置ID  
                    treeArea.Properties.TreeList.ParentFieldName = "parentId"; //设置PreID  
                    treeArea.Properties.DisplayMember            = "name";     //要在树里展示的
                    treeArea.Properties.ValueMember              = "id";       //对应的value
                    treeArea.EditValue = "2";

                    lueType.Properties.DataSource    = objT["result"]["typeDictList"].ToObject <List <OfficeEntity> >();
                    lueType.Properties.DisplayMember = "name";
                    lueType.Properties.ValueMember   = "code";
                    if (objT["result"]["typeDictList"].Count() > 0)
                    {
                        lueType.EditValue = objT["result"]["typeDictList"][0]["code"].ToString();
                    }

                    lueGrade.Properties.DataSource    = objT["result"]["gradeDictList"].ToObject <List <OfficeEntity> >();
                    lueGrade.Properties.DisplayMember = "name";
                    lueGrade.Properties.ValueMember   = "code";
                    if (objT["result"]["gradeDictList"].Count() > 0)
                    {
                        lueGrade.EditValue = objT["result"]["gradeDictList"][0]["code"].ToString();
                    }

                    if (office != null)
                    {
                        if (office.id != null)
                        {
                            url = AppContext.AppConfig.serverUrl + "sys/sysOffice/getOffice?officeId=" + office.id;
                            this.DoWorkAsync(250, (o) => //耗时逻辑处理(此处不能操作UI控件,因为是在异步中)
                            {
                                data = HttpClass.httpPost(url);
                                return(data);
                            }, null, (data2) => //显示结果(此处用于对上面结果的处理,比如显示到界面上)
                            {
                                objT = JObject.Parse(data2.ToString());
                                if (string.Compare(objT["state"].ToString(), "true", true) == 0)
                                {
                                    office = objT["result"].ToObject <OfficeEntity>();
                                    dcOffice.SetValue(office);
                                    teName.Focus();
                                    cmd.HideOpaqueLayer();
                                }
                                else
                                {
                                    cmd.HideOpaqueLayer();
                                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                                         MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                                }
                            });
                        }
                        else
                        {
                            dcOffice.SetValue(office);
                            teName.Focus();
                            cmd.HideOpaqueLayer();
                        }
                    }
                    else
                    {
                        office = new OfficeEntity();
                        cmd.HideOpaqueLayer();
                    }
                }
                else
                {
                    cmd.HideOpaqueLayer();
                    MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK,
                                         MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, this);
                }
            });
        }
 private void ModifyPasswordForm_Load(object sender, EventArgs e)
 {
     cmd         = new Xr.Common.Controls.OpaqueCommand(this);
     dc.DataType = typeof(ModifyPasswordEntity);
 }