Esempio n. 1
0
        /// <summary>
        /// 初始化等待框
        /// 王冀 2012-10-30
        /// </summary>
        /// <param name="caption"></param>
        //private void SetWaitDialogCaption(string caption)
        //{
        //    try
        //    {
        //        if (m_WaitDialog != null)
        //        {
        //            if (!m_WaitDialog.Visible)
        //                m_WaitDialog.Visible = true;
        //            m_WaitDialog.Caption = caption;
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
        //    }
        //}
        /// <summary>
        /// 等待框收起
        /// 王冀 2012-10-30
        /// </summary>
        //private void HideWaitDialog()
        //{
        //    try
        //    {
        //        if (m_WaitDialog != null)
        //            m_WaitDialog.Hide();
        //    }
        //    catch (Exception ex)
        //    {
        //        Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
        //    }
        //}
        #endregion

        /// <summary>
        /// 构建树控件
        /// 王冀 2012-10-30
        /// </summary>
        private void MakeTree()
        {
            try
            {
                DS_Common.SetWaitDialogCaption(m_WaitDialog, "正在构建树控件!");
                DataTable Class;
                DataTable Treatment;
                m_HaveBindNode.Clear();
                treeList_Medicine.ClearNodes();
                Class = m_SqlManger.GetTreatmentTreeOne(this.cbClass.SelectedIndex.ToString());

                //第一级
                foreach (DataRow dr in Class.Rows)
                {
                    TreeListNode parentNode = null;//
                    parentNode = treeList_Medicine.AppendNode(new object[] { dr["unitmname"].ToString(), "Folder", dr["unitmid"].ToString() }, null);
                    m_HaveBindNode.Add(dr["unitmname"].ToString());
                    Treatment = m_SqlManger.GetTreatmentTreeTwo(dr["unitmid"].ToString());

                    //第二级
                    foreach (DataRow secdr in Treatment.Rows)
                    {
                        TreeListNode node = null;
                        node = treeList_Medicine.AppendNode(new object[] { secdr["jibingmingcheng"].ToString(), "Leaf", secdr["ID"].ToString() }, parentNode);
                        //m_LeafNode.Add(secdr["id"].ToString());
                        node.Tag = secdr["id"].ToString();
                    }
                }
                DS_Common.HideWaitDialog(m_WaitDialog);
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 检索事件
 /// </summary>
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2013-02-01</date>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtQuery_EditValueChanged(object sender, EventArgs e)
 {
     try
     {
         //string searchStr = txtQuery.Text.Trim().Replace("'", "''").Replace("*", "[*]").Replace("%", "[%]").Replace("[", "[[]");
         string    searchStr = DS_Common.FilterSpecialCharacter(txtQuery.Text);
         string    filter    = string.Format(" configkey like '%{0}%' or name like '%{0}%' or value like '%{0}%' or descript like '%{0}%' ", searchStr);
         DataTable dv        = gridControl1.DataSource as DataTable;
         if (null != dv && dv.Rows.Count > 0)
         {
             dv.DefaultView.RowFilter = filter;
         }
         //重新绑定数据          add by wangj  2013 2 26
         DataRow dataRow = gridView1.GetDataRow(gridView1.FocusedRowHandle);
         if (null == dataRow)
         {
             ClearPage();
         }
         else
         {
             SetApp(dataRow);
             AddControlToMyPanel(dataRow);
         }
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// 保存时限规则条件
        /// xlb 2013-01-07
        /// </summary>
        private void SaveCondition()
        {
            try
            {
                if (_qcCondition == null)
                {
                    return;
                }
                string message = "";
                bool   result  = ValidateInfo(ref message);
                if (!result)
                {
                    MessageBox.Show(message);
                    return;
                }
                _qcCondition.Code            = this.textEditConditionCode.Text.Trim();
                _qcCondition.Description     = this.textEditConditonDes.Text.Trim();
                _qcCondition.TableName       = this.textEditConditionTable.Text.Trim();
                _qcCondition.ColumnName      = this.textEditConditionColumn.Text.Trim();
                _qcCondition.ColumnValue     = this.textEditColumnValue.Text.Trim();
                _qcCondition.TimeColumnName  = this.textEditTimeColumn.Text.Trim();
                _qcCondition.TimeRange       = TimesToSeconds(textEditTimeRange.Text.Trim());
                _qcCondition.PatNoColumnName = this.textEditPatColumn.Text.Trim();
                _qcCondition.Memo            = textEditMemo.Text.Trim();
                _qcCondition.DBLink          = comboBoxEditDBLink.SelectedItem.ToString();

                //质控条件集合
                List <QCCondition> qcConditionList = gridControlCondition.DataSource as List <QCCondition>;
                if (qcConditionList == null)
                {
                    qcConditionList = new List <QCCondition>();
                }

                if (_editState == EditState.Add)
                {
                    QCCondition.InsertCondition(_qcCondition);
                    MessageBox.Show("添加成功");
                    //集合中插入新增数据行 便于 定位焦点在新增行上
                    qcConditionList.Add(_qcCondition);
                }
                else
                {
                    QCCondition.UpdateCondition(_qcCondition);
                    MessageBox.Show("修改成功");
                }

                //绑定数据源
                gridControlCondition.DataSource = new List <QCCondition>(qcConditionList);
                //定位焦点在最后一行
                gridViewCondition.MoveBy(qcConditionList.Count - 1);
                DS_Common.ClearControl(groupControl1);
                SetEditState(false, false);
                _qcCondition = new QCCondition();
                gridViewCondition.FocusedRowHandle = (gridControlCondition.DataSource as List <QCCondition>).Count;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 设置复选框列表
        /// </summary>
        public void SetCheckBoxList()
        {
            try
            {
                //SetPreViewVisible(false);
                DataTable dt = GetEmrRecord(m_CurrentInpatient.NoOfFirstPage.ToString(), ChangeID);
                if (CheckIfNeedRefresh(dt, CurrentUCEmrInputBody.CurrentTreeList.FocusedNode))
                {
                    if (MyMessageBox.Show("数据库中病历有更新,建议您刷新后预览。您是否要刷新病程记录?", "提示", MyMessageBoxButtons.YesNo, DrectSoft.Common.Ctrs.DLG.MessageBoxIcon.QuestionIcon) == DialogResult.Yes)
                    {
                        TreeListNode focusedNode = CurrentUCEmrInputBody.CurrentTreeList.FocusedNode;
                        if (null != focusedNode && null != focusedNode.Tag && focusedNode.Tag is EmrModel)
                        {
                            EmrModel model = focusedNode.Tag as EmrModel;
                            m_App.CurrentSelectedEmrID = model.InstanceId.ToString();
                        }
                        CurrentUCEmrInputBody.RefreshBingChengJiLu();
                    }
                }

                m_WaitDialog = new WaitDialogForm("正在加载病程预览区...", "请稍候");
                SetCheckBoxListSource(dt);
                DefaultCheckItem();
                XmlDocument doc = ConcatCheckedEmrContent();

                SetEmrContent(doc);
                SetPreViewVisible(true);
                CurrentEditorForm.SetCurrentElement(FirstCallRecordDetailCaptionDateTime);
                DS_Common.HideWaitDialog(m_WaitDialog);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 5
0
 /// <summary>
 /// 加载当前科室的所有病人
 /// edit by Yanqiao.Cai 2012-11-15
 /// 1、add try ... catch
 /// 2、加载性别图片
 /// </summary>
 private void LoadPatInfo()
 {
     try
     {
         DataTable dt     = DataManager.GetCurrentPatient(m_app.User.CurrentDeptId, m_app.User.CurrentWardId);
         string    filter = string.Format(@"  yebz='0' ");
         //DataTable dt1 = gridControl2.DataSource as DataTable;
         if (dt != null)
         {
             dt.DefaultView.RowFilter = filter;
         }
         //要进行处理的DataTAble,处理 病人姓名字段(***病人姓名【1个婴儿】***)
         DataTable newDt      = dt.DefaultView.ToTable();
         string    ResultName = string.Empty;//声明最终要在列表显示的姓名的内容
         for (int i = 0; i < newDt.Rows.Count; i++)
         {
             ResultName = DataManager.GetPatsBabyContent(m_app, newDt.Rows[i]["noofinpat"].ToString());
             newDt.Rows[i]["PatName"] = ResultName;
         }
         //加载性别图片
         DS_Common.InitializeImage_XB(repositoryItemImageXB2, imageListXB);
         this.gridControl2.DataSource = newDt;
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Esempio n. 6
0
        private void simpleButtonAddQC_Click(object sender, EventArgs e)
        {
            try
            {
                m_WaitDialog = new WaitDialogForm("正在创建综合评分", "请您稍后!");

                if (m_noofinpat == "")
                {
                    m_App.CustomMessageBox.MessageShow("请选择一个病人");
                    DS_Common.HideWaitDialog(m_WaitDialog);
                    return;
                }

                m_chiefID = InsertNewAutoRecord("0");
                InitUCPoint();
                if (m_chiefID == "")
                {
                    m_App.CustomMessageBox.MessageShow("出错");
                    DS_Common.HideWaitDialog(m_WaitDialog);
                    return;
                }
                m_check = CheckState.NEW;
                DS_Common.HideWaitDialog(m_WaitDialog);
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 窗体加载事件
        /// edit by Yanqiao.Cai 2012-11-16
        /// 1、add try ... catch
        /// 2、加载性别图片
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PatientListForNew_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable dataSource = new DataTable();
                if (!m_IsAllInpatient)
                {
                    //新增的时候抓取指定科室的病人
                    dataSource = m_SqlHelper.GetPatientListForNew(m_App.User.CurrentDeptId);
                }
                else
                {
                    //补录的时候抓取全院患者
                    dataSource = m_SqlHelper.GetAllPatientListForNew();
                    //checkEditOutHospital.Visible = false;//补录可看到出院的人,edit  by ywk 2012年8月9日14:41:41
                }
                //加载性别图片
                DS_Common.InitializeImage_XB(repositoryItemImageXB, imageListXB);

                gridControlPatientList.DataSource = dataSource.DefaultView;
                RefreshPatientList();
                gridControlPatientList.Focus();
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
Esempio n. 8
0
 /// <summary>
 /// 删除事件
 /// by xlb 2013-01-05
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonDelRule_Click(object sender, EventArgs e)
 {
     try
     {
         if (_currentRule == null || _currentRule.RuleCode == null)
         {
             MessageBox.Show("请选择要删除的数据");
             return;
         }
         DataTable dtQcRecord = QCRecord.GetAllQcRecord(_currentRule.RuleCode);
         int       count      = int.Parse(dtQcRecord.Rows[0][0].ToString());
         if (count > 0)
         {
             MessageBox.Show("该规则已被质控记录使用,无法删除");
             return;
         }
         if (MyMessageBox.Show("您确定删除吗?", "提示", MyMessageBoxButtons.OkCancel) == DialogResult.Cancel)
         {
             return;
         }
         QCRule.DeleteQcRule(_currentRule);
         MessageBox.Show("删除成功");
         InitDataRule();
         DS_Common.ClearControl(groupControlRule);
         DS_Common.ClearControl(groupControlCondtion);
         lookUpEditDoctorLevel.EditValue = null;
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 9
0
        /// <summary>
        /// 查询方法
        /// edit by Yanqiao.Cai 2012-11-15
        /// 1、add try ... catch
        /// 2、加载性别图片
        /// </summary>
        private void Search()
        {
            try
            {
                //加载性别图片
                DS_Common.InitializeImage_XB(repositoryItemImageXB, imageListXB);

                SqlParameter[] sqlParam = new SqlParameter[]
                {
                    new SqlParameter("@DeptCode", SqlDbType.VarChar),
                    new SqlParameter("@DateTimeBegin", SqlDbType.VarChar),
                    new SqlParameter("@DateTimeEnd", SqlDbType.VarChar),
                    new SqlParameter("@QCStatType", SqlDbType.VarChar),
                    new SqlParameter("@PatientName", SqlDbType.VarChar),
                    new SqlParameter("@RecordID", SqlDbType.VarChar),
                    new SqlParameter("@PatID", SqlDbType.VarChar),
                    new SqlParameter("@OutDiag", SqlDbType.VarChar)
                };
                sqlParam[0].Value = lookUpEditorDepartment.CodeValue == "0000" ? "" : lookUpEditorDepartment.CodeValue;
                sqlParam[1].Value = "";
                sqlParam[2].Value = "";
                sqlParam[3].Value = 2;
                sqlParam[4].Value = textEditName.Text.Trim();
                sqlParam[5].Value = "";
                sqlParam[6].Value = textEditPatID.Text.Trim();
                sqlParam[7].Value = this.lookUpEditorOutDiag.CodeValue;

                DataTable MedicalRrecordSet = sql_Helper.ExecuteDataTable("usp_GetMedicalRrecordView", sqlParam, CommandType.StoredProcedure);
                gridControlApplyRecord.DataSource = MedicalRrecordSet;
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 查询事件
        /// edit by Yanqiao.Cai 2012-11-16
        /// 1、add try ... catch
        /// 2、加载性别图片
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                string errorStr = CheckItem();
                if (!string.IsNullOrEmpty(errorStr))
                {
                    DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(errorStr);
                    return;
                }

                SqlParameter[] sqlParam = new SqlParameter[]
                { new SqlParameter("@DateBegin", SqlDbType.VarChar),
                  new SqlParameter("@DateEnd", SqlDbType.VarChar),
                  new SqlParameter("@PatID", SqlDbType.VarChar),
                  new SqlParameter("@Name", SqlDbType.VarChar),
                  new SqlParameter("@SexID", SqlDbType.VarChar),
                  new SqlParameter("@AgeBegin", SqlDbType.VarChar),
                  new SqlParameter("@AgeEnd", SqlDbType.VarChar),
                  new SqlParameter("@OutHosDept", SqlDbType.VarChar),
                  new SqlParameter("@InDiag", SqlDbType.VarChar),
                  new SqlParameter("@OutDiag", SqlDbType.VarChar),
                  new SqlParameter("@SurgeryID", SqlDbType.VarChar),
                  new SqlParameter("@Physician", SqlDbType.VarChar) };

                sqlParam[0].Value  = dateEditBegin.DateTime.Date.ToString("yyyy-MM-dd");
                sqlParam[1].Value  = string.IsNullOrEmpty(this.dateEditEnd.Text) ? DateTime.Now.ToString("yyyy-MM-dd") : this.dateEditEnd.DateTime.ToString("yyyy-MM-dd");
                sqlParam[2].Value  = txtPatID.Text.Trim();
                sqlParam[3].Value  = txtName.Text.Trim();
                sqlParam[4].Value  = radioSex.SelectedIndex == 0 ? "" : radioSex.SelectedIndex.ToString();
                sqlParam[5].Value  = txtAgeBegin.Text.Trim();
                sqlParam[6].Value  = txtAgeEnd.Text.Trim();
                sqlParam[7].Value  = lookUpEditorDepartment.CodeValue;
                sqlParam[8].Value  = lookUpEditorInDiag.CodeValue;
                sqlParam[9].Value  = lookUpEditorOutDiag.CodeValue;
                sqlParam[10].Value = lookUpEditorSurgery.CodeValue;
                sqlParam[11].Value = this.lookUpEditorPhysician.CodeValue.Trim();

                DataTable table = SqlUtil.App.SqlHelper.ExecuteDataTable("usp_GetRecordOnFile", sqlParam, CommandType.StoredProcedure);
                //加载性别图片
                DS_Common.InitializeImage_XB(repositoryItemImageXB, imageListXB);

                gridViewRecordOnFile.SelectAll();
                gridViewRecordOnFile.DeleteSelectedRows();
                gridControlRecordOnFile.DataSource = table;

                lblTip.Text = "共" + table.Rows.Count.ToString() + "条记录";

                if (table.Rows.Count <= 0)
                {
                    SqlUtil.App.CustomMessageBox.MessageShow("没有满足条件的记录");
                }
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.Message);
            }
        }
Esempio n. 11
0
 /// <summary>
 /// Enter事件 --- 获取焦点选中内容
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2011-12-28</date>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txt_Enter(object sender, EventArgs e)
 {
     try
     {
         DS_Common.txt_Enter(sender);
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 12
0
 /// <summary>
 /// 显示自定义字符事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void gridViewInpatientFail_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
 {
     try
     {
         DS_Common.CustomDrawEmptyDataSource("没有查询到您想要的数据", new Font("宋体", 10, FontStyle.Bold), Brushes.Red, e);
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 13
0
 /// <summary>
 /// 回车光标后移
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
 {
     try
     {
         DS_Common.win_KeyPress(e);
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 14
0
 /// <summary>
 /// 复选框按键事件
 /// 注:回车即勾选/不勾选
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2012-12-29</date>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void chb_KeyPress(object sender, KeyPressEventArgs e)
 {
     try
     {
         DS_Common.cbx_KeyPress(sender);
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 15
0
 /// <summary>
 /// 序号
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2011-10-25</date>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void gridViewHistoryInfo_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
 {
     try
     {
         DS_Common.AutoIndex(e);
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.Message);
     }
 }
Esempio n. 16
0
 /// <summary>
 /// 回车切换焦点
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2012-11-07</date>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void win_KeyPress(object sender, KeyPressEventArgs e)
 {
     try
     {
         DS_Common.win_KeyPress(e);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Esempio n. 17
0
 /// <summary>
 /// 序号列
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dbGridView_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
 {
     try
     {
         DS_Common.AutoIndex(e);
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 18
0
 /// <summary>
 /// 序号 --- 婴儿
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2011-11-12</date>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void gViewBabyInfo_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
 {
     try
     {
         DS_Common.AutoIndex(e);
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 19
0
        public string userid_check(string userid, ref string user_name)
        {
            if (string.IsNullOrEmpty(userid))
            {
                return("用户id为空");
            }

            //IAccount acnt = bizbus.BuildUp<IAccount>();
            try
            {
                if (userid.Contains("用户已过期"))
                {
                    m_TempUserID = userid;
                    throw new InvalidUserIdException("用户已过期");
                }
                bool available = true;
                {
                    if (userid.Trim() != "00")
                    {
                        string extraCodeLong = userid.Trim().Insert(0, "000000");
                        string strLoginCode  = extraCodeLong.Substring(extraCodeLong.Length - 6, 6);

                        // textBoxUserID.Text = strLoginCode;
                    }

                    string username = m_Acnt.GetAUserName(DS_Common.FilterSpecialCharacter(userid), out available);
                    m_TempUserID = userid;
                    if (IsUserPwdNull(userid.Trim()))//允许登录则切换到密码框
                    {
                        ShowInitPwd(userid.Trim());
                    }
                    //Add By wwj 2011-06-07 在初始化登录人的Account之后初始化带教老师的Account
                    string masterID = m_Acnt.User.MasterID;//得到带教老师的ID
                    if (!string.IsNullOrEmpty(masterID))
                    {
                        m_MasterAcnt.InitMaster(masterID);//得到带教老师的帐户信息
                    }
                    user_name = username;
                    //textBoxUserID.Text = username;
                }
                if (!available)
                {
                    throw new Exception("不存在当前用户");
                }

                return("不存在当前用户");
            }
            catch (Exception ex)
            {
                m_Log.Error(ex.Message);
                return(ex.ToString());
            }
        }
Esempio n. 20
0
 private void textEditName_TextChanged(object sender, EventArgs e)
 {
     try
     {
         string rowFilter = " D_NAME like '%{0}%' or INPUT like '%{0}%'";
         m_SourceTable.DefaultView.RowFilter = string.Format(rowFilter, DS_Common.FilterSpecialCharacter(textEditName.Text));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Esempio n. 21
0
 /// <summary>
 /// 重置事件
 /// by xlb 2013-01-06
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnReset_Click(object sender, EventArgs e)
 {
     try
     {
         DS_Common.ClearControl(panelControlTop);
         InitDataConditon();
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 22
0
 /// <summary>
 /// 加序号列
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void gvMainPage_CustomDrawRowIndicator(
     object sender,
     DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
 {
     try
     {
         DS_Common.AutoIndex(e);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 23
0
 /// <summary>
 /// 窗体加载事件
 /// by xlb 2012-12-19
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CommonNote_ModelWeiHu_Load(object sender, EventArgs e)
 {
     try
     {
         DS_Common.SetWaitDialogCaption(m_WaitForm, "正在加载数据");
         txtFileName.Focus();
         DS_Common.HideWaitDialog(m_WaitForm);
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 24
0
 /// <summary>
 /// 取消事件
 /// xlb 2013-01-07
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnCancel_Click(object sender, EventArgs e)
 {
     try
     {
         DS_Common.ClearControl(groupControl1);
         SetEditState(false, false);
         _qcCondition = new QCCondition();
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 25
0
        /// <summary>
        /// 时限规则条件信息
        /// xlb 2013-01-06
        /// </summary>
        /// <param name="_qcCondition"></param>
        private void ShowCondition(QCCondition _qcCondition)
        {
            try
            {
                if (_qcCondition == null)
                {
                    throw new Exception("没有数据");
                }
                textEditConditionCode.Text   = _qcCondition.Code;
                textEditConditonDes.Text     = _qcCondition.Description;
                textEditConditionTable.Text  = _qcCondition.TableName;
                textEditConditionColumn.Text = _qcCondition.ColumnName;
                textEditColumnValue.Text     = _qcCondition.ColumnValue;
                textEditTimeColumn.Text      = _qcCondition.TimeColumnName;
                int      time  = _qcCondition.TimeRange;
                TimeSpan times = new TimeSpan(0, 0, 0, time);
                textEditTimeRange.Text = DS_Common.TimeSpanToLocal(times);
                textEditPatColumn.Text = _qcCondition.PatNoColumnName;
                textEditMemo.Text      = _qcCondition.Memo;
                if (_qcCondition.DBLink == "EMRDB")
                {
                    comboBoxEditDBLink.SelectedIndex = 0;
                }
                else
                {
                    comboBoxEditDBLink.SelectedIndex = 1;
                }

                string timeRange = Convert.ToString((int)_qcCondition.TimeRange / 60 / 60 / 24);
                if (timeRange != "" && timeRange != "" && timeRange != "0")
                {
                    textEditSql.Text = string.Format("select * from {0} where {1} {2} and {3}> sysdate-{4}",
                                                     _qcCondition.TableName,
                                                     _qcCondition.ColumnName,
                                                     _qcCondition.ColumnValue,
                                                     _qcCondition.TimeColumnName,
                                                     timeRange);
                }
                else
                {
                    textEditSql.Text = string.Format("select * from {0} where {1} {2}",
                                                     _qcCondition.TableName,
                                                     _qcCondition.ColumnName,
                                                     _qcCondition.ColumnValue);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 26
0
        void textBoxUserID_Leave(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBoxUserID.Text))
            {
                return;
            }

            try
            {
                if (textBoxUserID.Text.Contains("用户已过期"))
                {
                    m_TempUserID = textBoxUserID.Text;
                    throw new InvalidUserIdException("用户已过期");
                }
                bool available = true;
                {
                    if (textBoxUserID.Text.Trim() != "00")
                    {
                        string extraCodeLong = textBoxUserID.Text.Trim().Insert(0, "000000");
                        string strLoginCode  = extraCodeLong.Substring(extraCodeLong.Length - 6, 6);

                        textBoxUserID.Text = strLoginCode;
                    }

                    string username = m_Acnt.GetAUserName(DS_Common.FilterSpecialCharacter(textBoxUserID.Text), out available);
                    m_TempUserID = textBoxUserID.Text;
                    if (IsUserPwdNull(textBoxUserID.Text.Trim()))//允许登录则切换到密码框
                    {
                        ShowInitPwd(textBoxUserID.Text.Trim());
                    }
                    //Add By wwj 2011-06-07 在初始化登录人的Account之后初始化带教老师的Account
                    string masterID = m_Acnt.User.MasterID;//得到带教老师的ID
                    if (!string.IsNullOrEmpty(masterID))
                    {
                        m_MasterAcnt.InitMaster(masterID);//得到带教老师的帐户信息
                    }

                    textBoxUserID.Text = username;
                }
                if (!available)
                {
                    throw new Exception("不存在当前用户");
                }
            }
            catch (Exception ex)
            {
                m_Log.Error(ex.Message);
                textBoxUserID.Text = ex.Message;
                textBoxUserID.Focus();
            }
        }
Esempio n. 27
0
 /// <summary>
 /// 复选框回车事件
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2011-10-23</date>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cbx_KeyPress(object sender, KeyPressEventArgs e)
 {
     try
     {
         if ((int)e.KeyChar == 13)
         {
             DS_Common.cbx_KeyPress(sender);
         }
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.Message);
     }
 }
 /// <summary>
 /// 复选框回车事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cbx_KeyPress(object sender, KeyPressEventArgs e)
 {
     try
     {
         if ((int)e.KeyChar == 13)
         {
             DS_Common.cbx_KeyPress(sender);
         }
     }
     catch (Exception ex)
     {
         m_App.CustomMessageBox.MessageShow(ex.Message);
     }
 }
Esempio n. 29
0
 /// <summary>
 /// 复选框回车事件
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2011-10-30</date>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void chb_KeyPress(object sender, KeyPressEventArgs e)
 {
     try
     {
         if ((int)e.KeyChar == 13)
         {
             DS_Common.cbx_KeyPress(sender);
         }
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
Esempio n. 30
0
        /// <summary>
        /// .ctor
        /// </summary>
        /// <param name="recordDal"></param>
        /// <param name="model"></param>
        /// <param name="node"></param>
        /// <param name="inpatient"></param>
        public HistoryEmrFormNew(RecordDal recordDal, EmrModel model, TreeListNode node, Inpatient inpatient, IEmrHost app)
        {
            WaitDialogForm m_WaitDialog = new WaitDialogForm("正在加载病历...", "请稍候");

            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterScreen;
            m_RecordDal        = recordDal;
            m_Node             = node;
            m_CurrentInpatient = inpatient;
            m_App = app;
            GetEmrContent(model);
            AddPadForm();
            DS_Common.HideWaitDialog(m_WaitDialog);
        }