Exemple #1
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
            {
                Application.DoEvents();
                DevExpress.Utils.WaitDialogForm m_WaitDialog = new DevExpress.Utils.WaitDialogForm("正在查询数据...", "请稍等");
                string errorStr = CheckItem();
                if (!string.IsNullOrEmpty(errorStr))
                {
                    MessageBox.Show(errorStr);
                    m_WaitDialog.Hide();
                    m_WaitDialog.Close();
                    return;
                }
                //加载性别图片
                DS_Common.InitializeImage_XB(repositoryItemImageXB, imageListXB);
                SqlParameter[] sqlpars = new SqlParameter[]
                {
                    new SqlParameter("@DateOutHosBegin", dateEditBegin.DateTime.Date.ToString("yyyy-MM-dd")),
                    new SqlParameter("@DateOutHosEnd", string.IsNullOrEmpty(this.dateEditEnd.Text) ? DateTime.Now.ToString("yyyy-MM-dd") : this.dateEditEnd.DateTime.ToString("yyyy-MM-dd")),
                    new SqlParameter("@DateInHosBegin", "1900-01-01"),                      //dateEditInBegin.DateTime.Date.ToString("yyyy-MM-dd")
                    new SqlParameter("@DateInHosEnd", DateTime.Now.ToString("yyyy-MM-dd")), //string.IsNullOrEmpty(this.dateEditInEnd.Text) ? DateTime.Now.ToString("yyyy-MM-dd") : this.dateEditInEnd.DateTime.ToString("yyyy-MM-dd")
                    new SqlParameter("@DeptID", lookUpEditorDepartment.CodeValue.ToString() == ""?"0000":lookUpEditorDepartment.CodeValue.ToString()),
                    new SqlParameter("@InDiag", lookUpEditorInDiag.CodeValue.ToString()),
                    new SqlParameter("@OutDiag", lookUpEditorOutDiag.CodeValue.ToString()),
                    new SqlParameter("@Status", lookUpRecordStatus.EditValue.ToString()),
                    new SqlParameter("@Patientname", this.txt_patiName.Text.Trim()),
                    new SqlParameter("@Recordid", this.txt_recordID.Text.Trim()),
                    new SqlParameter("@Physician", this.lookUpEditorPhysician.CodeValue.ToString())
                };
                DataTable table = SqlUtil.App.SqlHelper.ExecuteDataTable("usp_GetRecordNoOnFileWyt", sqlpars, CommandType.StoredProcedure);
                //gridviewRecordNoOnFile.SelectAll();
                //gridviewRecordNoOnFile.DeleteSelectedRows();
                gridControlRecordNoOnFile.DataSource = table;

                m_WaitDialog.Hide();

                lblTip.Text = "共" + table.Rows.Count.ToString() + "份";

                if (table.Rows.Count <= 0)
                {
                    SqlUtil.App.CustomMessageBox.MessageShow("没有满足条件的记录");
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        /// <summary>
        /// 查询事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (CheckDate())
                {
                    DevExpress.Utils.WaitDialogForm m_WaitDialog = new DevExpress.Utils.WaitDialogForm("正在查询数据...", "请稍等");
                    InitializeButtonStatus();
                    string serachtype = string.Empty;
                    if (rdbtnInPat.Checked)
                    {
                        serachtype = "inhos";
                    }
                    if (rdbtnOutPat.Checked)
                    {
                        serachtype = "outhos";
                    }
                    LoadData(serachtype);


                    m_WaitDialog.Hide();
                }
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
Exemple #3
0
        public static void WaitClear()
        {
            //if (dlgWaitWind != null)
            //   dlgWaitWind.Close();

            //ptEndProcess();
            dlgWaitWind.Hide();
        }
 private void btnQuery_Click(object sender, EventArgs e)
 {
     try
     {
         //if (CheckDate())
         //{
         DevExpress.Utils.WaitDialogForm m_WaitDialog = new DevExpress.Utils.WaitDialogForm("正在查询数据...", "请稍等");
         LoadData();
         m_WaitDialog.Hide();
         //}
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
Exemple #5
0
 //s
 private void btnQuery_Click(object sender, EventArgs e)
 {
     try
     {
         //if (CheckDate())
         //{
         DevExpress.Utils.WaitDialogForm m_WaitDialog = new DevExpress.Utils.WaitDialogForm("正在查询数据...", "请稍等");
         LoadData();
         m_WaitDialog.Hide();
         this.txtDoctor.Focus();
         //}
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
Exemple #6
0
        /// <summary>
        /// 查询事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (CheckDate())
                {
                    m_WaitDialog = new DevExpress.Utils.WaitDialogForm("正在查询数据...", "请稍等");
                    GetInitDB(true);
                    MyControlEventArgs retvals = new MyControlEventArgs(true, this.User_Table.Rows.Count.ToString(), this);
                    if (OnButtonClick != null)
                    {
                        OnButtonClick(this, retvals);
                    }
                    m_WaitDialog.Hide();

                    m_WaitDialog.Close();
                }
            }
            catch (Exception ex)
            {
                m_WaitDialog.Close();
                MyMessageBox.Show(1, ex);
            }
        }
Exemple #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 btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                DevExpress.Utils.WaitDialogForm m_WaitDialog = new DevExpress.Utils.WaitDialogForm("正在查询数据...", "请稍等");
                string errorStr = CheckItem();
                if (!string.IsNullOrEmpty(errorStr))
                {
                    m_WaitDialog.Hide();
                    MessageBox.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;

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

                if (table.Rows.Count <= 0)
                {
                    SqlUtil.App.CustomMessageBox.MessageShow("没有满足条件的记录");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }