Exemplo n.º 1
0
        private void BindData()
        {
            SQLManger m_sqlManager = new SQLManger(m_app);
            DataTable dt           = m_sqlManager.GetTempletFoot_Table("");

            this.gridControl1.DataSource = dt;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 删除事件
        /// </summary>
        /// edit by Yanqiao.Cai 2013-02-26
        /// 1、add try ... catch
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_delFoot_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                if (gridView1.FocusedRowHandle < 0)
                {
                    return;
                }
                DataRow foucesRow = gridView1.GetDataRow(gridView1.FocusedRowHandle);
                if (foucesRow == null || foucesRow.IsNull("Foot_ID"))
                {
                    return;
                }

                if (DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("您确定要删除 " + foucesRow["NAME"] + "吗?", "删除页眉", DrectSoft.Common.Ctrs.DLG.MyMessageBoxButtons.OkCancel) == DialogResult.Cancel)
                {
                    return;
                }
                SQLManger m_sqlmanager = new SQLManger(m_app);
                m_sqlmanager.DelTempletFoot(foucesRow["Foot_Id"].ToString());

                BindData();
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex.Message);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 初始化科室
        /// edit by Yanqiao.Cai 2012-11-06
        /// add try ... catch
        /// </summary>
        private void InitDepartment()
        {
            try
            {
                lookUpWindowDepartment.SqlHelper = m_app.SqlHelper;

                #region old
                //string sql = string.Format(@"select DEPT_ID ID,DEPT_NAME NAME,py,wb from EMRDEPT a");
                //DataTable Dept = m_app.SqlHelper.ExecuteDataTable(sql);
                SQLManger sqlmanger = new SQLManger(m_app);

                //edit by cyq 2013-02-19 edit by cyq 2013-03-08
                //DataTable Dept = sqlmanger.GetSubDeptListByUser();
                DataTable Dept = sqlmanger.GetDeptListByUser();
                m_depts = Dept;
                Dept.Columns["ID"].Caption   = "科室代码";
                Dept.Columns["NAME"].Caption = "科室名称";

                Dictionary <string, int> cols = new Dictionary <string, int>();

                cols.Add("ID", 80);
                cols.Add("NAME", 188);

                SqlWordbook deptWordBook = new SqlWordbook("querybook", Dept, "ID", "NAME", cols, "ID//NAME//PY//WB");
                lookUpEditorDepartment.SqlWordbook = deptWordBook;
                lookUpEditorDepartment.CodeValue   = "0000";
                #endregion
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Exemplo n.º 4
0
 private void NoAudit_Load(object sender, EventArgs e)
 {
     m_SqlManger = new SQLManger(m_app);
     InitDepartment();
     btn_AuditNo.Visibility     = DevExpress.XtraBars.BarItemVisibility.Never;
     btn_AuditYes.Visibility    = DevExpress.XtraBars.BarItemVisibility.Never;
     btn_LoadTemplet.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
 }
Exemplo n.º 5
0
        private void RePlaceTempletTitle_Load(object sender, EventArgs e)
        {
            MakeTree();
            CreateGridSourceCol();

            m_SQLManger = new SQLManger(m_app);
            m_Logger    = new DrectSoftLog("批量修改模板页眉页脚错误日志");
            HideWaitDialog();
        }
Exemplo n.º 6
0
        private void RePlaceTempletTitle_Load(object sender, EventArgs e)
        {
            try
            {
                InitHeader();
                InitFoot();
                MakeTree();
                CreateGridSourceCol();

                m_SQLManger = new SQLManger(m_app);
                m_Logger    = new DrectSoftLog("批量修改模板页眉页脚错误日志");
                HideWaitDialog();
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex.Message);
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 保存页脚
        /// </summary>
        private void SaveTemplet_Foot()
        {
            string editType = "";

            //无FootID代表为新增页脚
            if (m_EmrTemplet_Foot.FootId == "")
            {
                editType = "1";
                m_EmrTemplet_Foot.CreatorId = m_app.User.Id;
            }
            else
            {
                editType = "2";
            }
            SQLManger m_sqlmanger = new SQLManger(m_app);

            m_EmrTemplet_Foot.HospitalCode = this.lookUpEditorHospitel.CodeValue;
            m_EmrTemplet_Foot.Name         = this.txtName.Text.Trim();

            string str_Foot_id = m_sqlmanger.SaveTemplet_Foot(m_EmrTemplet_Foot, editType);

            m_EmrTemplet_Foot = m_sqlmanger.GetTemplet_Foot(str_Foot_id);
        }
Exemplo n.º 8
0
        /// <summary>
        /// 保存页眉
        /// </summary>
        private void SaveTemplet_Heard()
        {
            string editType = "";

            //无templetID代表为新增模板
            if (m_EmrTempletHeader.HeaderId == "")
            {
                editType = "1";
                m_EmrTempletHeader.CreatorId = m_app.User.Id;
            }
            else
            {
                editType = "2";
            }
            SQLManger m_sqlmanger = new SQLManger(m_app);

            m_EmrTempletHeader.HospitalCode = this.lookUpEditorHospitel.CodeValue;
            m_EmrTempletHeader.Name         = this.txtName.Text.Trim();
            //页眉中增加图片报错的问题  add by ywk 2012年10月25日 11:58:05
            string strheaderid = m_sqlmanger.SaveTemplet_Header(m_EmrTempletHeader, editType);

            m_EmrTempletHeader = m_sqlmanger.GetTemplet_Header(strheaderid);
        }
Exemplo n.º 9
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public UCEditOperInfo(IEmrHost app)
 {
     InitializeComponent();
     m_app        = app;
     m_SqlManager = new SQLManger(m_app);
 }