示例#1
0
        /// <summary>
        /// 新增出院诊断
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnNewOutDiag_Click(object sender, EventArgs e)
        {
            //if (m_DiagInfoForm == null)
            m_DiagInfoForm = new IemNewDiagInfoForm(m_App, "add", "", "", "");
            m_DiagInfoForm.ShowDialog();
            if (m_DiagInfoForm.DialogResult == DialogResult.OK)
            {
                m_DiagInfoForm.IemOperInfo = null;
                DataTable dataTable = m_DiagInfoForm.DataOper;


                DataTable dataTableOper = new DataTable();
                if (this.gridControl1.DataSource != null)
                {
                    dataTableOper = this.gridControl1.DataSource as DataTable;
                }
                if (dataTableOper.Rows.Count == 0)
                {
                    dataTableOper = dataTable.Clone();
                }
                foreach (DataRow row in dataTable.Rows)
                {
                    dataTableOper.ImportRow(row);
                }
                this.gridControl1.BeginUpdate();
                this.gridControl1.DataSource = dataTableOper;
                m_App.PublicMethod.ConvertGridDataSourceUpper(gridViewDiagnose);
                this.gridControl1.EndUpdate();
            }
        }
示例#2
0
        /// <summary>
        /// 新增出院诊断
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnNewOutDiag_Click(object sender, EventArgs e)
        {
            try
            {
                m_DiagInfoForm = new IemNewDiagInfoForm(m_App, "add", "", "", "", "", "");
                m_DiagInfoForm.ShowDialog();
                if (m_DiagInfoForm.DialogResult == DialogResult.OK)
                {
                    m_DiagInfoForm.IemOperInfo = null;
                    DataTable dataTable = m_DiagInfoForm.DataOper;

                    if (m_DiagInfoForm.DiagnosisType == "1")
                    {
                        DataTable dataTableOper = new DataTable();
                        if (this.gridControl1.DataSource != null)
                        {
                            dataTableOper = this.gridControl1.DataSource as DataTable;
                        }
                        if (dataTableOper.Rows.Count == 0)
                        {
                            dataTableOper = dataTable.Clone();
                        }
                        foreach (DataRow row in dataTable.Rows)
                        {
                            dataTableOper.ImportRow(row);
                        }
                        this.gridControl1.BeginUpdate();
                        this.gridControl1.DataSource = dataTableOper;
                        m_App.PublicMethod.ConvertGridDataSourceUpper(gridViewDiagnose);
                        this.gridControl1.EndUpdate();
                    }
                    else if (m_DiagInfoForm.DiagnosisType == "2")
                    {
                        DataTable dataTableOper = new DataTable();
                        if (this.gridControl2.DataSource != null)
                        {
                            dataTableOper = this.gridControl2.DataSource as DataTable;
                        }
                        if (dataTableOper.Rows.Count == 0)
                        {
                            dataTableOper = dataTable.Clone();
                        }
                        foreach (DataRow row in dataTable.Rows)
                        {
                            dataTableOper.ImportRow(row);
                        }
                        this.gridControl2.BeginUpdate();
                        this.gridControl2.DataSource = dataTableOper;
                        m_App.PublicMethod.ConvertGridDataSourceUpper(gridViewDiagnose2);
                        this.gridControl2.EndUpdate();
                    }
                }
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.Message);
            }
        }
示例#3
0
 /// <summary>
 /// 新加的编辑出院诊断
 /// add by ywk
 /// Modify by xlb 2013-07-02
 /// 解决编辑时行错乱问题
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnEditOutDiag_Click(object sender, EventArgs e)
 {
     try
     {
         if (gridViewDiagnose.FocusedRowHandle < 0)
         {
             return;
         }
         DataRow dataRow = gridViewDiagnose.GetDataRow(gridViewDiagnose.FocusedRowHandle);
         if (dataRow == null)
         {
             return;
         }
         string diagcode  = dataRow["Diagnosis_Code"].ToString(); //诊断的ICD编码
         string statusid  = dataRow["Status_Id"].ToString();      //诊断结果(入院病情)
         string admitinfo = dataRow["AdmitInfo"].ToString();      //子入院病情
         m_DiagInfoForm = new IemNewDiagInfoForm(m_App, "edit", diagcode, statusid, admitinfo);
         if (m_DiagInfoForm.ShowDialog() == DialogResult.OK)
         {
             m_DiagInfoForm.IemOperInfo = null;
             DataTable dataTable     = m_DiagInfoForm.DataOper;
             DataTable dataTableOper = new DataTable();
             if (this.gridControl1.DataSource != null)
             {
                 dataTableOper = this.gridControl1.DataSource as DataTable;
             }
             if (dataTableOper.Rows.Count == 0)
             {
                 dataTableOper = dataTable.Clone();
             }
             //遍历选中行所在表的列若返回表中有该行则更新选中行的该列
             foreach (DataColumn item in dataRow.Table.Columns)
             {
                 DataRow rowData = dataTable.Rows[0];
                 if (dataTable.Columns.Contains(item.ColumnName))
                 {
                     dataRow[item.ColumnName] = rowData[item.ColumnName].ToString();
                 }
             }
             #region 注销 by xlb 2013-07-02
             //foreach (DataRow row in dataTable.Rows)
             //{
             //    dataTableOper.Rows.Remove(dataRow);//由编辑页面返回后,要将原来编辑的此行移除,因为编辑时,会加上这个行
             //    //dataTableOper.ImportRow(row);
             //}
             #endregion
             this.gridControl1.BeginUpdate();
             this.gridControl1.DataSource = dataTableOper;
             m_App.PublicMethod.ConvertGridDataSourceUpper(gridViewDiagnose);
             this.gridControl1.EndUpdate();
         }
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
示例#4
0
 /// <summary>
 /// 编辑中医出院诊断
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnEditOutDiagCHn_Click(object sender, EventArgs e)
 {
     try
     {
         if (gridViewDiagnose2.FocusedRowHandle < 0)
         {
             return;
         }
         DataRow dataRow = gridViewDiagnose2.GetDataRow(gridViewDiagnose2.FocusedRowHandle);
         if (dataRow == null)
         {
             return;
         }
         string diagcode = dataRow["Diagnosis_Code"].ToString(); //诊断的ICD编码
         string diagname = dataRow["Diagnosis_Name"].ToString();
         string statusid = dataRow["Status_Id"].ToString();      //诊断结果(入院病情)
         string orienid  = dataRow["Orien_Id"].ToString();       //诊断方位
         string diagtype = "zhongyi";
         m_DiagInfoForm = new IemNewDiagInfoForm(m_App, "edit", diagcode, diagname, statusid, orienid, diagtype);
         m_DiagInfoForm.ShowDialog();
         if (m_DiagInfoForm.DialogResult == DialogResult.OK)
         {
             m_DiagInfoForm.IemOperInfo = null;
             DataTable dataTable     = m_DiagInfoForm.DataOper;
             DataTable dataTableOper = new DataTable();
             if (this.gridControl2.DataSource != null)
             {
                 dataTableOper = this.gridControl2.DataSource as DataTable;
             }
             if (dataTableOper.Rows.Count == 0)
             {
                 dataTableOper = dataTable.Clone();
             }
             //遍历选中行所在表的列若返回表中有该行则更新选中行的该列
             foreach (DataColumn item in dataRow.Table.Columns)
             {
                 DataRow rowOper = dataTable.Rows[0];
                 if (dataTable.Columns.Contains(item.ColumnName))
                 {
                     dataRow[item.ColumnName] = rowOper[item.ColumnName].ToString();
                 }
             }
             this.gridControl2.BeginUpdate();
             this.gridControl2.DataSource = dataTableOper;
             m_App.PublicMethod.ConvertGridDataSourceUpper(gridViewDiagnose2);
             this.gridControl2.EndUpdate();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
示例#5
0
        /// <summary>
        /// 新加的编辑出院诊断
        /// add by ywk
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnEditOutDiag_Click(object sender, EventArgs e)
        {
            if (gridViewDiagnose.FocusedRowHandle < 0)
            {
                return;
            }
            DataRow dataRow = gridViewDiagnose.GetDataRow(gridViewDiagnose.FocusedRowHandle);

            if (dataRow == null)
            {
                return;
            }
            string diagcode    = dataRow["Diagnosis_Code"].ToString(); //诊断的ICD编码
            string statusid    = dataRow["Status_Id"].ToString();      //诊断结果(入院病情)
            string admitinfo   = dataRow["AdmitInfo"].ToString();      //子入院病情
            string statusIdOut = dataRow["Status_Id_Out"].ToString();

            m_DiagInfoForm = new IemNewDiagInfoForm(m_App, "edit", diagcode, statusid, admitinfo, statusIdOut);
            m_DiagInfoForm.ShowDialog();

            if (m_DiagInfoForm.DialogResult == DialogResult.OK)
            {
                m_DiagInfoForm.IemOperInfo = null;
                DataTable dataTable     = m_DiagInfoForm.DataOper;
                DataTable dataTableOper = new DataTable();
                if (this.gridControl1.DataSource != null)
                {
                    dataTableOper = this.gridControl1.DataSource as DataTable;
                }
                if (dataTableOper.Rows.Count == 0)
                {
                    dataTableOper = dataTable.Clone();
                }
                //遍历选中行所在表的列若返回表中有该行则更新选中行的该列
                foreach (DataColumn item in dataRow.Table.Columns)
                {
                    DataRow rowOper = dataTable.Rows[0];
                    if (dataTable.Columns.Contains(item.ColumnName))
                    {
                        dataRow[item.ColumnName] = rowOper[item.ColumnName].ToString();
                    }
                }
                this.gridControl1.BeginUpdate();
                this.gridControl1.DataSource = dataTableOper;
                m_App.PublicMethod.ConvertGridDataSourceUpper(gridViewDiagnose);
                this.gridControl1.EndUpdate();
            }
        }
示例#6
0
        /// <summary>
        /// 新增出院诊断
        /// Modify by xlb 2013-07-02
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnNewOutDiag_Click(object sender, EventArgs e)
        {
            try
            {
                //if (m_DiagInfoForm == null)
                m_DiagInfoForm = new IemNewDiagInfoForm(m_App, "add", "", "", "");
                //m_DiagInfoForm.ShowDialog();
                if (m_DiagInfoForm.ShowDialog() == DialogResult.OK)
                {
                    m_DiagInfoForm.IemOperInfo = null;
                    DataTable dataTable = m_DiagInfoForm.DataOper;

                    DataTable dataTableOper = new DataTable();
                    if (this.gridControl1.DataSource != null)
                    {
                        dataTableOper = this.gridControl1.DataSource as DataTable;
                    }
                    if (dataTableOper.Rows.Count == 0)
                    {
                        dataTableOper = dataTable.Clone();
                    }
                    DataRow newRow = dataTableOper.NewRow();
                    foreach (DataColumn item in dataTableOper.Columns)
                    {
                        DataRow dataRow = dataTable.Rows[0];
                        if (dataTable.Columns.Contains(item.ColumnName))
                        {
                            newRow[item.ColumnName] = dataRow[item.ColumnName].ToString();
                        }
                    }
                    dataTableOper.Rows.Add(newRow);
                    //foreach (DataRow row in dataTable.Rows)
                    //{
                    //    dataTableOper.ImportRow(row);
                    //}
                    this.gridControl1.BeginUpdate();
                    this.gridControl1.DataSource = dataTableOper;
                    m_App.PublicMethod.ConvertGridDataSourceUpper(gridViewDiagnose);
                    this.gridControl1.EndUpdate();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#7
0
        /// <summary>
        /// 新加的编辑出院诊断
        /// add by ywk
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnEditOutDiag_Click(object sender, EventArgs e)
        {
            if (gridViewDiagnose.FocusedRowHandle < 0)
            {
                return;
            }
            DataRow dataRow = gridViewDiagnose.GetDataRow(gridViewDiagnose.FocusedRowHandle);

            if (dataRow == null)
            {
                return;
            }
            string diagcode  = dataRow["Diagnosis_Code"].ToString(); //诊断的ICD编码
            string statusid  = dataRow["Status_Id"].ToString();      //诊断结果(入院病情)
            string admitinfo = dataRow["AdmitInfo"].ToString();      //子入院病情

            m_DiagInfoForm = new IemNewDiagInfoForm(m_App, "edit", diagcode, statusid, admitinfo);
            m_DiagInfoForm.ShowDialog();

            if (m_DiagInfoForm.DialogResult == DialogResult.OK)
            {
                m_DiagInfoForm.IemOperInfo = null;
                DataTable dataTable     = m_DiagInfoForm.DataOper;
                DataTable dataTableOper = new DataTable();
                if (this.gridControl1.DataSource != null)
                {
                    dataTableOper = this.gridControl1.DataSource as DataTable;
                }
                if (dataTableOper.Rows.Count == 0)
                {
                    dataTableOper = dataTable.Clone();
                }
                foreach (DataRow row in dataTable.Rows)
                {
                    dataTableOper.Rows.Remove(dataRow);//由编辑页面返回后,要将原来编辑的此行移除,因为编辑时,会加上这个行
                    dataTableOper.ImportRow(row);
                }
                this.gridControl1.BeginUpdate();
                this.gridControl1.DataSource = dataTableOper;
                m_App.PublicMethod.ConvertGridDataSourceUpper(gridViewDiagnose);
                this.gridControl1.EndUpdate();
            }
        }