コード例 #1
0
        /// <summary>
        /// 绑定院区
        /// </summary>
        private void BindHSP()
        {
            //不是有clear()方法清空下拉框,点刷新会提示:设置 DataSource 属性后无法修改项集合错误。
            cbxHspCode.DataSource = null;

            //获取对应字典内容
            JDictionary hspAreaDict = _dmm.GetDictionary("院区");

            if (hspAreaDict == null)
            {
                return;
            }

            List <ItemBind> listBind = new List <ItemBind>();

            foreach (JDictionaryItem dictInfo in hspAreaDict.项目内容)
            {
                ItemBind lb = new ItemBind(dictInfo.项目编码 + "-" + dictInfo.项目名称, dictInfo.项目编码);
                listBind.Add(lb);
            }

            cbxHspCode.DisplayMember = "Name";
            cbxHspCode.ValueMember   = "Value";

            cbxHspCode.DataSource = listBind;
        }
コード例 #2
0
        private void cbxReports_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                ItemBind ib = cbxReports.SelectedItem as ItemBind;

                ReportContextData reportData = null;

                if (ib.Data == null)
                {
                    return;
                }

                reportData = ib.Data as ReportContextData;

                LoadReport(reportData);


                ResetReportState(reportData);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #3
0
        private void tsbNew_Click(object sender, EventArgs e)
        {
            try
            {
                if (lbMethodName.FindString(tbName.Text) >= 0)
                {
                    MessageBox.Show("名称重复,不允许新增。", "提示");
                    return;
                }

                DataOperItem doi = new DataOperItem();
                doi.ItemName       = tbName.Text;
                doi.DBAlias        = cbxDBAlias.Text;
                doi.ProcessContext = rtbContext.Text;
                doi.ReturnName     = txtReturnName.Text;

                ItemBind ib = new ItemBind(doi.ItemName, doi.ItemName);
                ib.Tag = doi;

                lbMethodName.Items.Add(ib);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #4
0
        private ReportContextData SelectReport()
        {
            if (cbxReports.SelectedItem == null)
            {
                MessageBox.Show("请选择对应的报告项目。", "提示");
                return(null);
            }

            ItemBind ibReport = cbxReports.SelectedItem as ItemBind;

            if (ibReport == null)
            {
                MessageBox.Show("无效的报告项目数据。", "提示");
                return(null);
            }

            if (ibReport.Data == null)
            {
                MessageBox.Show("报告尚未生成,不能进行此操作。", "提示");
                return(null);
            }

            ReportContextData reportData = ibReport.Data as ReportContextData;

            if (reportData == null)
            {
                MessageBox.Show("当前报告信息对象无效,不能进行此操作。", "提示");
                return(null);
            }

            return(reportData);
        }
コード例 #5
0
        private void butOrderCall_Click(object sender, EventArgs e)
        {
            try
            {
                if (cbxQueueNames.SelectedItem == null)
                {
                    return;
                }

                if (DoActions(QueueQuickEventDefine.OrderCallBefore, sender) == false)
                {
                    return;
                }

                ItemBind ib = cbxQueueNames.SelectedItem as ItemBind;

                QueueData queData = ib.Tag as QueueData;

                LineUpData lineupOrder = QueueModel.GetOrderCallLineup(queData.队列ID);
                if (lineupOrder != null)
                {
                    DoLineupCall(lineupOrder, queData);
                }

                BindQueueCall();

                SetCurInfo(lineupOrder);

                DoActions(QueueQuickEventDefine.OrderCallAfter, sender);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #6
0
        private void Save()
        {
            if (lbMethodName.SelectedItem != null)
            {
                if (Valide(false) == false)
                {
                    return;
                }

                ItemBind ib = lbMethodName.SelectedItem as ItemBind;
                ib.Name  = tbName.Text;
                ib.Value = rtbContext.Text;

                BehindCodeItem bci = ib.Tag as BehindCodeItem;

                bci.FuncName     = tbName.Text;
                bci.FuncContext  = rtbContext.Text;
                bci.ThridDBAlias = cbxDBAlias.Text;
                bci.VerNo        = bci.VerNo + 1;
                bci.IsBGCompile  = chkBGCompile.Checked;

                txtVer.Text = Convert.ToString(bci.VerNo);
            }

            _codeDesign.BehindCodes.Clear();

            foreach (ItemBind ib in lbMethodName.Items)
            {
                BehindCodeItem bci = (ib.Tag as BehindCodeItem).Clone();

                _codeDesign.BehindCodes.Add(bci);
            }

            _isOk = true;
        }
コード例 #7
0
        private void lbMethodName_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                rtbContext.Text = "";
                if (lbMethodName.SelectedItem == null)
                {
                    return;
                }

                ItemBind ib = lbMethodName.SelectedItem as ItemBind;

                BehindCodeItem bci = ib.Tag as BehindCodeItem;

                tbName.Text          = bci.FuncName;
                rtbContext.Text      = bci.FuncContext;
                cbxDBAlias.Text      = bci.ThridDBAlias;
                txtVer.Text          = Convert.ToString(bci.VerNo);
                chkBGCompile.Checked = bci.IsBGCompile;
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex);
            }
        }
コード例 #8
0
        private void tsbNew_Click(object sender, EventArgs e)
        {
            try
            {
                if (Valide(true) == false)
                {
                    return;
                }

                ItemBind ib = new ItemBind();
                ib.Name  = tbName.Text;
                ib.Value = rtbContext.Text;

                BehindCodeItem bci = new BehindCodeItem();

                bci.FuncName     = tbName.Text;
                bci.FuncContext  = rtbContext.Text;
                bci.ThridDBAlias = cbxDBAlias.Text;
                bci.VerNo        = 1;
                bci.IsBGCompile  = chkBGCompile.Checked;

                ib.Tag = bci;

                int newindex = lbMethodName.Items.Add(ib);

                lbMethodName.SelectedIndex = newindex;
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #9
0
        private void frmDataOperModuleDesign_Load(object sender, EventArgs e)
        {
            try
            {
                LoadDataSource();

                LoadPars();

                lbMethodName.DisplayMember = "Name";
                lbMethodName.ValueMember   = "Name";

                foreach (DataOperItem doi in _dataOperDesign.DataOperItems)
                {
                    ItemBind ib = new ItemBind();

                    ib.Name = doi.ItemName;
                    ib.Tag  = doi;

                    lbMethodName.Items.Add(ib);
                }
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #10
0
        private void lbMethodName_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                tbName.Text        = "";
                cbxDBAlias.Text    = "";
                rtbContext.Text    = "";
                txtReturnName.Text = "";

                if (lbMethodName.SelectedItem == null)
                {
                    return;
                }

                ItemBind ib = lbMethodName.SelectedItem as ItemBind;

                DataOperItem doi = ib.Tag as DataOperItem;

                tbName.Text        = doi.ItemName;
                cbxDBAlias.Text    = doi.DBAlias;
                rtbContext.Text    = doi.ProcessContext;
                txtReturnName.Text = doi.ReturnName;
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #11
0
        private void tsbUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                if (lbMethodName.SelectedItem == null)
                {
                    MessageBox.Show("尚未选择需要更新的方法。", "提示");
                    return;
                }
                if (Valide(false) == false)
                {
                    return;
                }

                ItemBind ib = lbMethodName.SelectedItem as ItemBind;
                ib.Name  = tbName.Text;
                ib.Value = rtbContext.Text;


                BehindCodeItem bci = ib.Tag as BehindCodeItem;

                bci.FuncName     = tbName.Text;
                bci.FuncContext  = rtbContext.Text;
                bci.ThridDBAlias = cbxDBAlias.Text;
                bci.VerNo        = bci.VerNo + 1;
                bci.IsBGCompile  = chkBGCompile.Checked;

                txtVer.Text = Convert.ToString(bci.VerNo);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #12
0
        private void tsbUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                if (lbMethodName.SelectedItem == null)
                {
                    return;
                }

                int fIndex = lbMethodName.FindString(tbName.Text);

                if (fIndex < 0 || fIndex == lbMethodName.Items.IndexOf(lbMethodName.SelectedItem))
                {
                    ItemBind ib = lbMethodName.SelectedItem as ItemBind;

                    ib.Name  = tbName.Text;
                    ib.Value = tbName.Text;

                    DataOperItem doi = ib.Tag as DataOperItem;

                    doi.ItemName       = tbName.Text;
                    doi.DBAlias        = cbxDBAlias.Text;
                    doi.ProcessContext = rtbContext.Text;
                    doi.ReturnName     = txtReturnName.Text;
                }
                else
                {
                    MessageBox.Show("名称存在重复,不能进行更新。", "提示");
                }
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #13
0
        /// <summary>
        /// 初始化申请报告
        /// </summary>
        /// <param name="applyId"></param>
        private void InitApplyReport(string applyId)
        {
            cbxReports.Items.Clear();

            cbxReports.ComboBox.DisplayMember = "DisplayName";
            cbxReports.ComboBox.ValueMember   = "Value";

            DataTable dtReports = ReportContextModel.GetApplyReport(applyId);

            ItemBind ib = null;

            if (dtReports == null || dtReports.Rows.Count <= 0)
            {
                return;
            }

            foreach (DataRow dr in dtReports.Rows)
            {
                ReportContextData reportData = new ReportContextData();
                reportData.BindRowData(dr);

                ib = new ItemBind(reportData.报告名称, reportData.报告ID);

                ib.DisplayName = "(" + (dtReports.Rows.IndexOf(dr) + 1) + "/" + dtReports.Rows.Count + ")" + reportData.报告名称;
                ib.Tag         = reportData.部位名称;
                ib.Data        = reportData;

                cbxReports.Items.Add(ib);
            }


            cbxReports.SelectedIndex = 0;
        }
コード例 #14
0
        private void frmReleationRooms_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable dtRooms = _qm.GetDeptRooms(_queueData.科室ID);

                checkedListBox1.DisplayMember = "Name";
                checkedListBox1.ValueMember   = "Value";

                foreach (DataRow dr in dtRooms.Rows)
                {
                    ItemBind ib = new ItemBind();

                    ib.Name  = dr["房间名称"].ToString();
                    ib.Value = dr["房间ID"].ToString();

                    if (_queueData.包含房间.房间明细.FindIndex(T => T.房间ID == dr["房间ID"].ToString()) >= 0)
                    {
                        checkedListBox1.Items.Add(ib, true);
                    }
                    else
                    {
                        checkedListBox1.Items.Add(ib);
                    }
                }
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #15
0
        private void LoadDataSource()
        {
            tsCbxDataSource.ComboBox.DisplayMember = "Name";

            ItemBind ib = new ItemBind("", "");

            tsCbxDataSource.Items.Add(ib);

            if (_dbSourceModel == null)
            {
                _dbSourceModel = new ThridDBSourceModel(_dbHelper);
            }

            DataTable dtDBSource = _dbSourceModel.GetAllThridDBSource();


            foreach (DataRow dr in dtDBSource.Rows)
            {
                ThridDBSourceData dbSource = new ThridDBSourceData();
                dbSource.BindRowData(dr);

                ItemBind ibSource = new ItemBind(dbSource.数据源别名, "");
                ibSource.Tag = dbSource;

                tsCbxDataSource.Items.Add(ibSource);
            }
        }
コード例 #16
0
        private void butSure_Click(object sender, EventArgs e)
        {
            try
            {
                _queueData.包含房间.房间明细.Clear();

                for (int i = 0; i <= checkedListBox1.Items.Count - 1; i++)
                {
                    if (checkedListBox1.GetItemChecked(i) == false)
                    {
                        continue;
                    }

                    JQueueRoomItem roomItem = new JQueueRoomItem();

                    ItemBind ib = checkedListBox1.Items[i] as ItemBind;
                    roomItem.房间ID = ib.Value;
                    roomItem.房间名称 = ib.Name;

                    _queueData.包含房间.房间明细.Add(roomItem);
                }

                _qm.UpdateQueueRooms(_queueData);

                _isOk = true;

                this.Close();
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #17
0
        private void LoadDataSource()
        {
            cbxDBAlias.DisplayMember = "Name";

            ItemBind ib = new ItemBind("", "");

            cbxDBAlias.Items.Add(ib);


            ThridDBSourceModel dbSourceModel = new ThridDBSourceModel(_dbHelper);

            DataTable dtDBSource = dbSourceModel.GetAllThridDBSource();


            foreach (DataRow dr in dtDBSource.Rows)
            {
                ThridDBSourceData dbSource = new ThridDBSourceData();
                dbSource.BindRowData(dr);

                ItemBind ibSource = new ItemBind(dbSource.数据源别名, "");
                ibSource.Tag = dbSource;

                cbxDBAlias.Items.Add(ibSource);
            }
        }
コード例 #18
0
        private void tscbxReports_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (_isBinding)
                {
                    return;
                }

                if (_preview == null)
                {
                    _preview          = new FormPart.PreviewControl();
                    _preview.ReadOnly = true;
                    _preview.Hide();

                    this.Controls.Add(_preview);
                }

                _preview.ImportByXml("");

                ItemBind ib = tscbxReports.ComboBox.SelectedItem as ItemBind;

                ReportContextData reportData = null;

                if (ib.Data == null)
                {
                    return;
                }

                reportData = ib.Data as ReportContextData;

                _preview.ImportByXml(reportData.报告信息.报告内容);

                //读取对应报告模板信息
                string context = "";
                ReportTemplateItemData reportTemplate = ReportContextModel.GetReportTemplateData(reportData.报告信息.模板ID);
                foreach (JReportSectionItem si in reportTemplate.关联段落.段落关联信息)
                {
                    if (string.IsNullOrEmpty(si.模板元素名))
                    {
                        continue;
                    }

                    object eleContext = _preview.GetItemValue(si.模板元素名);

                    if (eleContext != null && string.IsNullOrEmpty(eleContext.ToString()) == false)
                    {
                        context = context + "■■" + ((string.IsNullOrEmpty(si.段落显示名)) ? si.报告段落名 : si.段落显示名) + ":" + System.Environment.NewLine + eleContext.ToString() + System.Environment.NewLine;
                        context = context + System.Environment.NewLine;
                    }
                }

                richTextBox1.Text = context;
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #19
0
        private void butSure_Click(object sender, EventArgs e)
        {
            try
            {
                _queueShowDesign.BackgroundImage = txtImgName.Text;

                _queueShowDesign.BackColor = ceBackColor.Color;
                _queueShowDesign.ForeColor = ceForeColor.Color;

                _queueShowDesign.HeadFontName = feHeadFont.Value.Name;
                _queueShowDesign.HeadFontSize = feHeadFont.Value.Size;
                _queueShowDesign.HeadBold     = feHeadFont.Value.Bold;
                _queueShowDesign.HeadItalic   = feHeadFont.Value.Italic;


                _queueShowDesign.FontName = feQueueFont.Value.Name;
                _queueShowDesign.FontSize = feQueueFont.Value.Size;
                _queueShowDesign.IsBold   = feQueueFont.Value.Bold;
                _queueShowDesign.IsItalic = feQueueFont.Value.Italic;

                _queueShowDesign.WaitCount = Convert.ToInt32(txtWaitCount.Text);

                _queueShowDesign.Column1Width = Convert.ToInt32(txtC1Width.Text);
                _queueShowDesign.Column2Width = Convert.ToInt32(txtC2Width.Text);
                _queueShowDesign.Column3Width = Convert.ToInt32(txtC3Width.Text);

                _queueShowDesign.IsShowMemo      = chkShowMemo.Checked;
                _queueShowDesign.IsShowLastCall  = chkShowLastCall.Checked;
                _queueShowDesign.IsShowCallIcon  = chkCallIcon.Checked;
                _queueShowDesign.IsShowQueueIcon = chkQueueIcon.Checked;


                _queueShowDesign.ReleationQueueItems.Clear();
                for (int i = 0; i < cbxReleationQueue.Items.Count - 1; i++)
                {
                    if (cbxReleationQueue.GetItemChecked(i))
                    {
                        ItemBind ib = cbxReleationQueue.Items[i] as ItemBind;

                        QueueItem qi = new QueueItem();

                        qi.QueueId   = ib.Value;
                        qi.QueueName = ib.Name;

                        _queueShowDesign.ReleationQueueItems.Add(qi);
                    }
                }

                _queueShowDesign.UseRoomQueueReleation = chkUseRoomReleation.Checked;

                _isOk = true;

                this.Close();
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #20
0
        private void butSure_Click(object sender, EventArgs e)
        {
            try
            {
                _queueCallDesign.BackgroundImage = txtImgName.Text;
                _queueCallDesign.ShowHeader      = chkShowTitle.Checked;
                _queueCallDesign.HeadText        = txtTitle.Text;
                _queueCallDesign.HeadDockWay     = (HeadDockWay)cbxHeadDockWay.SelectedIndex;

                _queueCallDesign.HeadBColor  = ceHeadBkColor.Color;
                _queueCallDesign.HeadBColor2 = ceHeadBkColor2.Color;
                _queueCallDesign.HeadFColor  = ceHeadForeColor.Color;

                _queueCallDesign.HeadFontName   = feHeadFont.Value.Name;
                _queueCallDesign.HeadFontSize   = feHeadFont.Value.Size;
                _queueCallDesign.HeadFontBold   = feHeadFont.Value.Bold;
                _queueCallDesign.HeadFontItalic = feHeadFont.Value.Italic;

                _queueCallDesign.TxtBColor  = ceTxtBkColor.Color;
                _queueCallDesign.TxtBColor2 = ceTxtBkColor2.Color;
                _queueCallDesign.TxtFColor  = ceTxtForeColor.Color;

                _queueCallDesign.TxtFontName   = feTxtFont.Value.Name;
                _queueCallDesign.TxtFontSize   = feTxtFont.Value.Size;
                _queueCallDesign.TxtFontBold   = feTxtFont.Value.Bold;
                _queueCallDesign.TxtFontItalic = feTxtFont.Value.Italic;

                _queueCallDesign.QueueItems.Clear();
                for (int i = 0; i < cbxReleationQueue.Items.Count - 1; i++)
                {
                    if (cbxReleationQueue.GetItemChecked(i))
                    {
                        ItemBind ib = cbxReleationQueue.Items[i] as ItemBind;

                        QueueItem qi = new QueueItem();

                        qi.QueueId   = ib.Value;
                        qi.QueueName = ib.Name;

                        _queueCallDesign.QueueItems.Add(qi);
                    }
                }

                _queueCallDesign.UserRoomReleationQueue = chkUseRoomReleation.Checked;

                _isOk = true;

                this.Close();
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #21
0
        private void butRestartCall_Click(object sender, EventArgs e)
        {
            try
            {
                if (cbxQueueNames.SelectedItem == null)
                {
                    return;
                }


                if (labWaitCall.Tag == null)
                {
                    MessageBox.Show("尚无进行呼叫的队列信息。", "提示");
                    return;
                }

                LineUpData lineupWait = labWaitCall.Tag as LineUpData;

                LineUpData lineupNew = QueueModel.GetLineupInfo(lineupWait.排队ID);

                if (lineupNew.附加信息.最后更新日期 != lineupWait.附加信息.最后更新日期)
                {
                    MessageBox.Show("排队信息已发生变更。", "提示");
                    BindQueueCall();

                    return;
                }

                if (DoActions(QueueQuickEventDefine.DirectCallBefore, sender) == false)
                {
                    return;
                }


                ItemBind ib = cbxQueueNames.SelectedItem as ItemBind;

                QueueData queData = ib.Tag as QueueData;

                DoLineupCall(lineupNew, queData);

                SetCurInfo(lineupNew);

                DoActions(QueueQuickEventDefine.DirectCallAfter, sender);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #22
0
        private void InitApplyReport(string applyId)
        {
            _isBinding = true;
            try
            {
                tscbxReports.Items.Clear();

                tscbxReports.ComboBox.DisplayMember = "DisplayName";
                tscbxReports.ComboBox.ValueMember   = "Value";

                tscbxReports.ComboBox.DataSource = null;

                DataTable dtReports = ReportContextModel.GetApplyReport(applyId);



                if (dtReports == null || dtReports.Rows.Count <= 0)
                {
                    return;
                }

                ItemBind ib = null;
                foreach (DataRow dr in dtReports.Rows)
                {
                    ReportContextData reportData = new ReportContextData();
                    reportData.BindRowData(dr);

                    ib = new ItemBind(reportData.报告名称, reportData.报告ID);

                    ib.DisplayName = "(" + (dtReports.Rows.IndexOf(dr) + 1) + "/" + dtReports.Rows.Count + ")" + reportData.报告名称;
                    ib.Tag         = reportData.部位名称;
                    ib.Data        = reportData;

                    tscbxReports.ComboBox.Items.Add(ib);
                }
            }
            finally
            {
                _isBinding = false;

                if (tscbxReports.ComboBox.Items.Count > 0)
                {
                    tscbxReports.ComboBox.SelectedIndex = 0;
                }
            }
        }
コード例 #23
0
        private void frmBehindCodeModuleDesign_Load(object sender, EventArgs e)
        {
            try
            {
                LoadDataSource();

                rtbContext.Text = Properties.Resources.Code;

                int index = rtbContext.Text.IndexOf("public bool Run(");
                rtbContext.SelectionStart = index;

                lbMethodName.Items.Clear();

                if (_codeDesign == null || _codeDesign.BehindCodes.Count <= 0)
                {
                    return;
                }

                lbMethodName.DisplayMember = "Name";
                lbMethodName.ValueMember   = "Value";

                foreach (BehindCodeItem bci in _codeDesign.BehindCodes)
                {
                    ItemBind ib = new ItemBind();
                    ib.Name  = bci.FuncName;
                    ib.Value = bci.FuncContext;

                    ib.Tag = bci;

                    lbMethodName.Items.Add(ib);
                }

                if (lbMethodName.Items.Count > 0)
                {
                    lbMethodName.SelectedIndex = 0;
                }
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex);
            }
        }
コード例 #24
0
        private void tsbDel_Click(object sender, EventArgs e)
        {
            try
            {
                if (lbMethodName.SelectedItem == null)
                {
                    MessageBox.Show("尚未选择需要删除的方法。", "提示");
                    return;
                }

                if (MessageBox.Show("确认删除当前所选方法吗?", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
                {
                    return;
                }

                ItemBind ib = lbMethodName.SelectedItem as ItemBind;
                lbMethodName.Items.Remove(lbMethodName.SelectedItem);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #25
0
        private void LoadDesign()
        {
            labWaitCall.BackColor = Color.Transparent;
            labWaitCall.ForeColor = _queueQuickDesign.CallColor;

            labNext.BackColor = Color.Transparent;
            labNext.ForeColor = _queueQuickDesign.ForeColor;


            this.BackColor = _queueQuickDesign.BackColor;
            this.ForeColor = _queueQuickDesign.ForeColor;

            cbxQueueNames.ForeColor = _queueQuickDesign.ForeColor;
            labQueueCount.ForeColor = _queueQuickDesign.ForeColor;

            butMiss.ForeColor        = _queueQuickDesign.ForeColor;
            butOrderCall.ForeColor   = _queueQuickDesign.ForeColor;
            butRestartCall.ForeColor = _queueQuickDesign.ForeColor;
            butDiagnose.ForeColor    = _queueQuickDesign.ForeColor;



            float     fontSize = 0;
            FontStyle fs       = FontStyle.Regular;

            try
            {
                fontSize = _queueQuickDesign.ModuleFontSize;
            }
            catch { }
            if (fontSize <= 0)
            {
                fontSize = this.Font.Size;
            }


            if (_queueQuickDesign.ModuleFontBold)
            {
                fs = fs | FontStyle.Bold;
            }
            if (_queueQuickDesign.ModuleFontItalic)
            {
                fs = fs | FontStyle.Italic;
            }

            Font moduleFont = new Font(_queueQuickDesign.ModuleFontName, fontSize, fs);

            labNext.Font       = moduleFont;
            cbxQueueNames.Font = moduleFont;
            labQueueCount.Font = moduleFont;
            butMiss.Font       = moduleFont;

            butOrderCall.Font   = moduleFont;
            butRestartCall.Font = moduleFont;
            butDiagnose.Font    = moduleFont;


            _queueItems.Clear();

            //查询科室包含的队列
            DataTable dtQueueData = QueueModel.GetQueueInfoByDeptId(_stationInfo.DepartmentId);

            foreach (DataRow drQueue in dtQueueData.Rows)
            {
                QueueData queData = new QueueData();
                queData.BindRowData(drQueue);

                if (string.IsNullOrEmpty(_stationInfo.RoomId) == false)
                {
                    if (queData.包含房间.房间明细.FindIndex(T => T.房间ID == _stationInfo.RoomId) < 0)
                    {
                        continue;
                    }
                }

                QueueItem qi = new QueueItem();

                qi.QueueName = drQueue["队列名称"].ToString();
                qi.QueueId   = drQueue["队列ID"].ToString();

                _queueItems.Add(qi);
            }

            cbxQueueNames.Items.Clear();

            cbxQueueNames.DisplayMember = "Name";
            cbxQueueNames.ValueMember   = "Value";

            DataTable queueDatas = QueueModel.GetQueueInfoByDeptId(_stationInfo.DepartmentId);

            foreach (QueueItem qi in _queueItems)
            {
                DataRow[] drQueues = queueDatas.Select("队列ID='" + qi.QueueId + "'");

                if (drQueues.Length > 0)
                {
                    QueueData queData = new QueueData();
                    queData.BindRowData(drQueues[0]);

                    ItemBind ib = new ItemBind();

                    ib.Name  = queData.队列名称;
                    ib.Value = queData.队列ID;
                    ib.Tag   = queData;

                    cbxQueueNames.Items.Add(ib);
                }
            }

            if (cbxQueueNames.Items.Count > 0)
            {
                cbxQueueNames.SelectedIndex = 0;
            }
        }
コード例 #26
0
        private void frmQueueCallDesign_Load(object sender, EventArgs e)
        {
            try
            {
                txtImgName.Text              = _queueCallDesign.BackgroundImage;
                chkShowTitle.Checked         = _queueCallDesign.ShowHeader;
                txtTitle.Text                = _queueCallDesign.HeadText;
                cbxHeadDockWay.SelectedIndex = (int)_queueCallDesign.HeadDockWay;
                ceHeadBkColor.Color          = _queueCallDesign.HeadBColor;
                ceHeadBkColor2.Color         = _queueCallDesign.HeadBColor2;
                ceHeadForeColor.Color        = _queueCallDesign.HeadFColor;

                ceTxtBkColor.Color   = _queueCallDesign.TxtBColor;
                ceTxtBkColor2.Color  = _queueCallDesign.TxtBColor2;
                ceTxtForeColor.Color = _queueCallDesign.TxtFColor;

                chkUseRoomReleation.Checked = _queueCallDesign.UserRoomReleationQueue;

                float     fontSize = 0;
                FontStyle fs       = FontStyle.Regular;

                try
                {
                    fontSize = _queueCallDesign.HeadFontSize;
                }
                catch { }
                if (fontSize <= 0)
                {
                    fontSize = this.Font.Size;
                }

                if (_queueCallDesign.HeadFontBold)
                {
                    fs = fs | FontStyle.Bold;
                }
                if (_queueCallDesign.HeadFontItalic)
                {
                    fs = fs | FontStyle.Italic;
                }

                Font hfont = new Font(_queueCallDesign.HeadFontName, fontSize, fs);
                feHeadFont.Value = hfont;



                fontSize = 0;
                fs       = FontStyle.Regular;

                try
                {
                    fontSize = _queueCallDesign.TxtFontSize;
                }
                catch { }
                if (fontSize <= 0)
                {
                    fontSize = this.Font.Size;
                }

                if (_queueCallDesign.TxtFontBold)
                {
                    fs = fs | FontStyle.Bold;
                }
                if (_queueCallDesign.TxtFontItalic)
                {
                    fs = fs | FontStyle.Italic;
                }

                Font txtfont = new Font(_queueCallDesign.TxtFontName, fontSize, fs);
                feTxtFont.Value = txtfont;



                cbxReleationQueue.Items.Clear();

                cbxReleationQueue.DisplayMember = "Name";
                cbxReleationQueue.ValueMember   = "Value";

                DataTable dtQueueData = _qm.GetQueueInfoByDeptId(_departmentId);

                foreach (DataRow drQueue in dtQueueData.Rows)
                {
                    ItemBind ib = new ItemBind();

                    ib.Name  = drQueue["队列名称"].ToString();
                    ib.Value = drQueue["队列ID"].ToString();

                    int itemIndex = cbxReleationQueue.Items.Add(ib);

                    if (_queueCallDesign.QueueItems.Count > 0)
                    {
                        int selIndex = _queueCallDesign.QueueItems.FindIndex(T => T.QueueId == ib.Value);
                        if (selIndex >= 0)
                        {
                            cbxReleationQueue.SetItemChecked(itemIndex, true);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #27
0
        private void frmQueueShowDesign_Load(object sender, EventArgs e)
        {
            try
            {
                txtImgName.Text   = _queueShowDesign.BackgroundImage;
                ceBackColor.Color = _queueShowDesign.BackColor;
                ceForeColor.Color = _queueShowDesign.ForeColor;

                chkShowMemo.Checked     = _queueShowDesign.IsShowMemo;
                chkShowLastCall.Checked = _queueShowDesign.IsShowLastCall;
                chkCallIcon.Checked     = _queueShowDesign.IsShowCallIcon;
                chkQueueIcon.Checked    = _queueShowDesign.IsShowQueueIcon;

                txtWaitCount.Text = _queueShowDesign.WaitCount.ToString();


                float     fontSize = 0;
                FontStyle fs       = FontStyle.Regular;

                try
                {
                    fontSize = _queueShowDesign.HeadFontSize;
                }
                catch { }
                if (fontSize <= 0)
                {
                    fontSize = this.Font.Size;
                }

                if (_queueShowDesign.HeadBold)
                {
                    fs = fs | FontStyle.Bold;
                }
                if (_queueShowDesign.HeadItalic)
                {
                    fs = fs | FontStyle.Italic;
                }

                Font hfont = new Font(_queueShowDesign.HeadFontName, fontSize, fs);
                feHeadFont.Value = hfont;



                fontSize = 0;
                fs       = FontStyle.Regular;

                try
                {
                    fontSize = _queueShowDesign.FontSize;
                }
                catch { }
                if (fontSize <= 0)
                {
                    fontSize = this.Font.Size;
                }

                if (_queueShowDesign.IsBold)
                {
                    fs = fs | FontStyle.Bold;
                }
                if (_queueShowDesign.IsItalic)
                {
                    fs = fs | FontStyle.Italic;
                }

                Font qfont = new Font(_queueShowDesign.FontName, fontSize, fs);
                feQueueFont.Value = qfont;

                txtC1Width.Text = _queueShowDesign.Column1Width.ToString();
                txtC2Width.Text = _queueShowDesign.Column2Width.ToString();
                txtC3Width.Text = _queueShowDesign.Column3Width.ToString();


                cbxReleationQueue.Items.Clear();

                cbxReleationQueue.DisplayMember = "Name";
                cbxReleationQueue.ValueMember   = "Value";

                DataTable dtQueueData = _qm.GetQueueInfoByDeptId(_departmentId);

                foreach (DataRow drQueue in dtQueueData.Rows)
                {
                    ItemBind ib = new ItemBind();

                    ib.Name  = drQueue["队列名称"].ToString();
                    ib.Value = drQueue["队列ID"].ToString();

                    int itemIndex = cbxReleationQueue.Items.Add(ib);

                    if (_queueShowDesign.ReleationQueueItems.Count > 0)
                    {
                        int selIndex = _queueShowDesign.ReleationQueueItems.FindIndex(T => T.QueueId == ib.Value);
                        if (selIndex >= 0)
                        {
                            cbxReleationQueue.SetItemChecked(itemIndex, true);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #28
0
        private void BindQueueCall()
        {
            try
            {
                labWaitCall.Text = "";
                labWaitCall.Tag  = null;

                labNext.Text = "";
                labNext.Tag  = null;

                labQueueCount.Text = "余:000人";

                if (cbxQueueNames.SelectedItem == null)
                {
                    return;
                }
                ItemBind ib = cbxQueueNames.SelectedItem as ItemBind;

                string queueId = ib.Value;

                int queueCount = QueueModel.GetLineupCount(queueId, QueueModel.GetServerDate());
                labQueueCount.Text = "余:" + queueCount.ToString().PadLeft(3, '0') + "人";

                //查询已呼叫的排队
                DataTable dtLastCall = QueueModel.GetLastCallInfoByQueueId(queueId, true);
                if (dtLastCall != null && dtLastCall.Rows.Count > 0)
                {
                    LineUpData lineupCall = null;
                    DateTime   lastTime   = default(DateTime);

                    foreach (DataRow drCall in dtLastCall.Rows)
                    {
                        LineUpData curLineup = new LineUpData();
                        curLineup.BindRowData(drCall);

                        if (curLineup.附加信息.末次呼叫时间 >= lastTime && curLineup.附加信息.检查房间 == _stationInfo.RoomName)
                        {
                            lineupCall = curLineup;
                            lastTime   = curLineup.附加信息.末次呼叫时间;
                        }
                    }

                    if (lineupCall != null)
                    {
                        string waitCall = "(" + lineupCall.号码前缀 + lineupCall.排队号码 + ") "
                                          + lineupCall.患者姓名 + " " + lineupCall.附加信息.性别 + " " + lineupCall.附加信息.年龄
                                          + "\r" + lineupCall.附加信息.检查项目;

                        labWaitCall.Tag  = lineupCall;
                        labWaitCall.Text = waitCall;
                    }
                }

                //查询待呼叫的排队
                LineUpData lineupNext = QueueModel.GetOrderCallLineup(queueId);
                if (lineupNext != null)
                {
                    string nextCall = "(" + lineupNext.号码前缀 + lineupNext.排队号码 + ") "
                                      + lineupNext.患者姓名 + " " + lineupNext.附加信息.性别 + " " + lineupNext.附加信息.年龄
                                      + " " + lineupNext.附加信息.检查项目;

                    labNext.Tag  = lineupNext;
                    labNext.Text = nextCall;
                }
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #29
0
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems resultDatas = null;
            BizDataItem  dataItem    = null;

            string dataName = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            switch (dataName)
            {
            case HistoryDataDefine.SelTextContext:    //当前文本内容
                resultDatas = new BizDataItems();
                dataItem    = new BizDataItem();

                dataItem.Add(DataHelper.StdPar_ApplyId, _applyId);
                dataItem.Add(DataHelper.StdPar_Text, richTextBox1.SelectedText);

                resultDatas.Add(dataItem);

                return(resultDatas);

            case HistoryDataDefine.SelHistoryStudy:    //当前选择的历史检查信息

                if (listView1.SelectedItems.Count <= 0)
                {
                    return(null);
                }

                resultDatas = new BizDataItems();
                dataItem    = new BizDataItem();

                dataItem.Add(DataHelper.StdPar_ApplyId, _applyId);

                ListViewItem lvi       = listView1.SelectedItems[0];
                ApplyData    applyData = lvi.Tag as ApplyData;

                dataItem.Add(DataHelper.StdPar_StudyNo, applyData.检查号);
                dataItem.Add("historyapplyid", applyData.申请ID);
                dataItem.Add("historyapplydate", applyData.申请日期);
                dataItem.Add("historyapplyidentify", applyData.申请识别码);
                dataItem.Add("historypatientid", applyData.患者ID);

                resultDatas.Add(dataItem);

                return(resultDatas);

            case HistoryDataDefine.SelHistoryReport:    //当前选择的历史报告
                if (listView1.SelectedItems.Count <= 0)
                {
                    return(null);
                }

                if (tscbxReports.Items.Count <= 0)
                {
                    return(null);
                }

                resultDatas = new BizDataItems();
                dataItem    = new BizDataItem();

                dataItem.Add(DataHelper.StdPar_ApplyId, _applyId);

                //读取历史信息
                ListViewItem lviSel          = listView1.SelectedItems[0];
                ApplyData    reportApplyData = lviSel.Tag as ApplyData;

                dataItem.Add(DataHelper.StdPar_StudyNo, reportApplyData.检查号);
                dataItem.Add("historyapplyid", reportApplyData.申请ID);
                dataItem.Add("historyapplydate", reportApplyData.申请日期);
                dataItem.Add("historyapplyidentify", reportApplyData.申请识别码);
                dataItem.Add("historypatientid", reportApplyData.患者ID);

                //读取报告信息
                ItemBind ib = tscbxReports.ComboBox.SelectedItem as ItemBind;

                if (ib.Data == null)
                {
                    return(null);
                }

                ReportContextData reportData = ib.Data as ReportContextData;

                dataItem.Add("historyreportid", reportData.报告ID);
                dataItem.Add("historyreportname", reportData.报告名称);
                dataItem.Add("historyreportdoctor", reportData.报告信息.报告医生);
                dataItem.Add("historyreportcreatedate", reportData.报告信息.创建时间);

                resultDatas.Add(dataItem);

                return(resultDatas);

            default:
                return(null);
            }
        }
コード例 #30
0
        /// <summary>
        /// 初始化队列名称
        /// </summary>
        /// <param name="departmentId"></param>
        private void InitQueueName(string departmentId, string applyId)
        {
            cbxQueueName.Items.Clear();

            if (string.IsNullOrEmpty(departmentId))
            {
                return;
            }

            DataTable dtQueues = _qm.GetQueueInfoByDeptId(departmentId);

            cbxQueueName.DisplayMember = "Name";
            cbxQueueName.ValueMember   = "Value";

            DataTable dtRooms = _qm.GetApplyRoomId(applyId);


            foreach (DataRow dr in dtQueues.Rows)
            {
                QueueData queueData = new QueueData();
                queueData.BindRowData(dr);


                //如果队列不包含房间信息,则不进行加载
                if (queueData.包含房间.房间明细.Count <= 0)
                {
                    continue;
                }

                if (dtRooms.Rows.Count > 0)
                {
                    //需要判断队列是否包含了对应的房间
                    bool hasRoom = false;

                    foreach (DataRow drRoom in dtRooms.Rows)
                    {
                        if (queueData.包含房间.房间明细.FindIndex(T => T.房间ID == drRoom["房间ID"].ToString()) >= 0)
                        {
                            hasRoom = true;
                            break;
                        }
                    }

                    if (hasRoom == false)
                    {
                        continue;
                    }
                }


                ItemBind ib = new ItemBind();

                ib.Name  = queueData.队列名称;
                ib.Value = queueData.队列ID;

                ib.Tag = queueData;

                cbxQueueName.Items.Add(ib);
            }

            if (cbxQueueName.Items.Count <= 0)
            {
                return;
            }

            //默认定位到队列人数最少且只有一个房间的队列
            if (cbxQueueName.Items.Count <= 1)
            {
                cbxQueueName.SelectedIndex = 0;
            }
            else
            {
                int    roomCount = 999999;
                string minQueue  = "";
                foreach (ItemBind ib in cbxQueueName.Items)
                {
                    QueueData queData = ib.Tag as QueueData;

                    if (queData.包含房间.房间明细.Count == 1)
                    {
                        int curCount = _qm.GetLineupCount(queData.队列ID, dtpIntoQueue.Value);
                        if (curCount < roomCount)
                        {
                            roomCount = curCount;
                            minQueue  = queData.队列名称;
                        }
                    }
                }

                if (string.IsNullOrEmpty(minQueue) == false)
                {
                    cbxQueueName.Text = minQueue;
                }
            }
        }