Esempio n. 1
0
 /// <summary>
 /// LoadDicFee
 /// </summary>
 void LoadDicFee()
 {
     try
     {
         using (ProxyEntityFactory proxy = new ProxyEntityFactory())
         {
             DataTable dt = proxy.Service.SelectFullTable(new EntityCodeFee());
             GlobalDic.DataSourceDicFee = EntityTools.ConvertToEntityList <EntityCodeFee>(dt);
             if (GlobalDic.DataSourceDicFee != null)
             {
                 for (int i = GlobalDic.DataSourceDicFee.Count - 1; i >= 0; i--)
                 {
                     if (!string.IsNullOrEmpty(GlobalDic.DataSourceDicFee[i].instFlag) && GlobalDic.DataSourceDicFee[i].instFlag.ToUpper() == "T" &&
                         GlobalDic.DataSourceDicFee[i].leafFlag.ToUpper() == "T")
                     {
                         GlobalDic.DataSourceDicFee[i].pyCode = SpellCodeHelper.GetPyCode(GlobalDic.DataSourceDicFee[i].feeName);
                         GlobalDic.DataSourceDicFee[i].wbCode = SpellCodeHelper.GetWbCode(GlobalDic.DataSourceDicFee[i].feeName);
                     }
                     else
                     {
                         GlobalDic.DataSourceDicFee.RemoveAt(i);
                     }
                 }
             }
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 2
0
        private bool m_blnDelTemplate()
        {
            if (this.ctlPopupSelect.Value != null)
            {
                EntityElementTemplate vo = new EntityElementTemplate();
                vo.status = 0;
                vo.serno  = Function.Dec(this.ctlPopupSelect.Value.ToString());

                ProxyEntityFactory proxy = new ProxyEntityFactory();
                int intResult            = proxy.Service.UpdateByPk(vo);
                proxy = null;
                if (intResult > 0)
                {
                    DialogBox.Msg("删除成功");
                    return(true);
                }
                else
                {
                    DialogBox.Msg("删除失败");
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
        private bool m_blnUpdateOldData()
        {
            string strContent = txtNew.Text.Trim();

            if (string.IsNullOrEmpty(strContent))
            {
                return(false);
            }
            if (txtNew.Tag == null)
            {
                return(false);
            }

            EntityElementTemplateContent vo = new EntityElementTemplateContent();

            vo.colContent = strContent;
            vo.serNo      = Function.Dec(txtNew.Tag.ToString());

            ProxyEntityFactory proxy = new ProxyEntityFactory();
            int intResult            = proxy.Service.UpdateByPk(vo);

            if (intResult > 0)
            {
                DialogBox.Msg("保存成功!");
                m_mthRefresh();
                return(true);
            }
            else
            {
                DialogBox.Msg("保存失败.");
                return(false);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Init
        /// </summary>
        internal void Init()
        {
            try
            {
                Viewer.Location = new Point(Viewer.Location.X, 0);
                Viewer.Height   = Screen.PrimaryScreen.WorkingArea.Height;
                uiHelper.BeginLoading(Viewer);

                #region 参数
                using (ProxyEntityFactory proxy = new ProxyEntityFactory())
                {
                    ContagionParmData = EntityTools.ConvertToEntityList <EntityRptContagionParm>(proxy.Service.SelectFullTable(new EntityRptContagionParm()));
                }
                #endregion

                // 传染病报表
                if (ContagionParmData != null)
                {
                    if (ContagionParmData.Any(t => t.reportId == this.ContagionDisplayVo.reportId && t.keyId == "templateId"))
                    {
                        this.formId = Function.Dec(ContagionParmData.FirstOrDefault(t => t.reportId == this.ContagionDisplayVo.reportId && t.keyId == "templateId").keyValue);
                    }
                }
                if (this.formId > 0)
                {
                    using (ProxyFormDesign proxy = new ProxyFormDesign())
                    {
                        proxy.Service.GetForm((int)this.formId, out FormDesignVo);
                    }
                }
                if (FormDesignVo == null)
                {
                    FormDesignVo = new EntityFormDesign();
                }
                if (Function.Dec(this.ContagionDisplayVo.rptId) > 0)
                {
                    using (ProxyContagion proxy = new ProxyContagion())
                    {
                        EntityRptContagion vo = proxy.Service.GetContagion(Function.Dec(this.ContagionDisplayVo.rptId));

                        #region patientInfo
                        Viewer.rdoFlag.SelectedIndex       = vo.patType - 1;
                        Viewer.rdoFlag.Properties.ReadOnly = true;
                        Viewer.txtCardNo.Text = vo.patNo;
                        #endregion

                        LoadForm(FormDesignVo.Layout, vo.xmlData);
                        GetPatient();
                    }
                }
                else
                {
                    LoadForm(FormDesignVo.Layout, null);
                }
            }
            finally
            {
                uiHelper.CloseLoading(Viewer);
            }
        }
Esempio n. 5
0
        private bool m_blnSaveNewData()
        {
            string strContent = txtNew.Text.Trim();

            if (string.IsNullOrEmpty(strContent))
            {
                return(false);
            }
            EntityElementTemplateContent objNewContent = new EntityElementTemplateContent();

            objNewContent.status     = 1;
            objNewContent.elementId  = Convert.ToInt32(this.ctlPopupSelect.Value.ToString());
            objNewContent.colContent = strContent;

            ProxyEntityFactory proxy = new ProxyEntityFactory();
            int intResult            = proxy.Service.Insert(objNewContent);

            proxy = null;
            if (intResult > 0)
            {
                DialogBox.Msg("保存成功!");
                m_mthRefresh();
                return(true);
            }
            else
            {
                DialogBox.Msg("保存失败.");
                return(false);
            }
        }
Esempio n. 6
0
 private void EditValueChanged(string empNo)
 {
     if (!string.IsNullOrEmpty(empNo))
     {
         EntityCodeOperator vo = new EntityCodeOperator();
         vo.disable  = "F";
         vo.operCode = empNo;
         using (ProxyEntityFactory proxy = new ProxyEntityFactory())
         {
             vo = EntityTools.ConvertToEntity <EntityCodeOperator>(proxy.Service.Select(vo, new List <string> {
                 EntityCodeOperator.Columns.disable, EntityCodeOperator.Columns.operCode
             }));
             //this.CaKeyId = ?
             if (empNo != vo.operCode)
             {
                 this.txtEmpName.Text = string.Empty;
                 this.lblInfo.Visible = true;
             }
             else
             {
                 this.txtEmpName.Text = vo.operName;
                 CurrPwd = vo.pwd;
                 empNo   = vo.operCode;
                 EmpName = vo.operName;
                 this.lblInfo.Visible = false;
             }
         }
     }
 }
Esempio n. 7
0
        /// <summary>
        /// 载入元素内容联动信息
        /// </summary>
        private void LoadLinkage(object value)
        {
            txtContent_vchr.ClearText();

            //标记是否原有数据,以便在保存时根据情况执行不同操作
            txtContent_vchr.Tag = null;
            if (value != null)
            {
                EntityElementTemplateLinkage vo = new EntityElementTemplateLinkage();
                vo.elementId = Function.Int(value);
                vo.status    = 1;
                ProxyEntityFactory proxy = new ProxyEntityFactory();
                vo = EntityTools.ConvertToEntity <EntityElementTemplateLinkage>(proxy.Service.Select(vo, new List <string> {
                    EntityElementTemplateLinkage.Columns.elementId, EntityElementTemplateLinkage.Columns.status
                }));
                proxy = null;
                if (vo != null)
                {
                    txtContent_vchr.SetXmlText(vo.colContentRtf, vo.colContentXml, false);
                    txtContent_vchr.Tag = vo;
                    m_mthOpenLinkedPage();
                }
                else
                {
                    if (m_intFlags == 0)
                    {
                        m_mthCloseLinkedPage();
                    }
                }
                proxy = null;
            }
        }
Esempio n. 8
0
 /// <summary>
 /// Init
 /// </summary>
 internal void Init()
 {
     #region dic
     DataTable dt = null;
     DataSourceDuty  = new List <EntityCodeDuty>();
     DataSourceClass = new List <EntityCodeOperatorClass>();
     DataSourceRole  = new List <EntityCodeRole>();
     using (ProxyEntityFactory proxy = new ProxyEntityFactory())
     {
         dt = proxy.Service.SelectFullTable(new EntityCodeDuty());
         DataSourceDuty.AddRange(EntityTools.ConvertToEntityList <EntityCodeDuty>(dt));
         dt = proxy.Service.SelectFullTable(new EntityCodeOperatorClass());
         DataSourceClass.AddRange(EntityTools.ConvertToEntityList <EntityCodeOperatorClass>(dt));
         dt = proxy.Service.SelectFullTable(new EntityCodeRole());
         DataSourceRole.AddRange(EntityTools.ConvertToEntityList <EntityCodeRole>(dt));
     }
     #endregion
     isInit = true;
     LoadList();
     InitLue();
     SetEditValueChangedEvent(Viewer.plMain);
     CreateTreeDept();
     LoadDataSourceDept();
     isInit = false;
 }
Esempio n. 9
0
 /// <summary>
 /// 病理分类
 /// </summary>
 void LoadPisClass()
 {
     try
     {
         using (ProxyEntityFactory proxy = new ProxyEntityFactory())
         {
             GlobalParm.PisClass = EntityTools.ConvertToEntityList <EntityPisClass>(proxy.Service.SelectFullTable(new EntityPisClass()));
             if (GlobalParm.PisClass == null)
             {
                 GlobalParm.PisClass = new List <EntityPisClass>();
             }
             else
             {
                 List <EntityFormDesign> data = EntityTools.ConvertToEntityList <EntityFormDesign>(proxy.Service.SelectFullTable(new EntityFormDesign()));
                 foreach (EntityPisClass item in GlobalParm.PisClass)
                 {
                     if (data.Any(t => t.Formid == (int)item.formId))
                     {
                         item.layout = data.FirstOrDefault(t => t.Formid == (int)item.formId).Layout;
                     }
                 }
             }
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 10
0
 /// <summary>
 /// 通用字典
 /// </summary>
 void LoadDicCommon()
 {
     try
     {
         using (ProxyEntityFactory proxy = new ProxyEntityFactory())
         {
             GlobalDic.DataSourceDicCommon = EntityTools.ConvertToEntityList <EntityCommonDic>(proxy.Service.SelectFullTable(new EntityCommonDic()));
             if (GlobalDic.DataSourceDicCommon != null)
             {
                 foreach (EntityCommonDic item in GlobalDic.DataSourceDicCommon)
                 {
                     if (!string.IsNullOrEmpty(item.Itemname))
                     {
                         item.Pycode = SpellCodeHelper.GetPyCode(item.Itemname);
                         item.Wbcode = SpellCodeHelper.GetWbCode(item.Itemname);
                     }
                 }
             }
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 11
0
        private bool m_blnDelData()
        {
            if (clstElement.SelectedItem != null)
            {
                int serno_int = Convert.ToInt32(clstElement.SelectedValue);

                EntityElementTemplateContent vo = new EntityElementTemplateContent();
                vo.status = 0;
                vo.serNo  = Function.Dec(clstElement.SelectedValue);

                ProxyEntityFactory proxy = new ProxyEntityFactory();
                int intResult            = proxy.Service.UpdateByPk(vo);
                proxy = null;
                if (intResult > 0)
                {
                    DialogBox.Msg("删除成功");
                    return(true);
                }
                else
                {
                    DialogBox.Msg("删除失败");
                    return(false);
                }
            }
            return(false);
        }
Esempio n. 12
0
 /// <summary>
 /// LoadQnDataSource
 /// </summary>
 void LoadQnDataSource()
 {
     dataSourceQN = null;
     using (ProxyEntityFactory proxy = new ProxyEntityFactory())
     {
         dataSourceQN = EntityTools.ConvertToEntityList <EntityDicQnMain>(proxy.Service.SelectFullTable(new EntityDicQnMain()));
     }
 }
Esempio n. 13
0
 /// <summary>
 /// LoadSmsContent
 /// </summary>
 void LoadSmsContent()
 {
     dataSourceMsgContent = null;
     using (ProxyEntityFactory proxy = new ProxyEntityFactory())
     {
         dataSourceMsgContent = EntityTools.ConvertToEntityList <EntityDicMessageContent>(proxy.Service.SelectFullTable(new EntityDicMessageContent()));
     }
 }
Esempio n. 14
0
 /// <summary>
 /// LoadSportItem
 /// </summary>
 void LoadSportItem()
 {
     dataSourceSportItem = null;
     using (ProxyEntityFactory proxy = new ProxyEntityFactory())
     {
         dataSourceSportItem = EntityTools.ConvertToEntityList <EntityDicSportItem>(proxy.Service.SelectFullTable(new EntityDicSportItem()));
     }
 }
Esempio n. 15
0
 /// <summary>
 /// Init
 /// </summary>
 void Init()
 {
     //
     DataSourceForm = new List <EntityObjectList>();
     //
     this.lueForm.Properties.PopupWidth          = 280;
     this.lueForm.Properties.PopupHeight         = 400;
     this.lueForm.Properties.ValueColumn         = EntityObjectList.Columns.formId;
     this.lueForm.Properties.DisplayColumn       = EntityObjectList.Columns.formName;
     this.lueForm.Properties.Essential           = false;
     this.lueForm.Properties.IsShowColumnHeaders = true;
     this.lueForm.Properties.ColumnWidth.Add(EntityObjectList.Columns.formCode, 80);
     this.lueForm.Properties.ColumnWidth.Add(EntityObjectList.Columns.formName, 200);
     this.lueForm.Properties.ColumnHeaders.Add(EntityObjectList.Columns.formCode, "编码");
     this.lueForm.Properties.ColumnHeaders.Add(EntityObjectList.Columns.formName, "名称");
     this.lueForm.Properties.ShowColumn      = EntityObjectList.Columns.formCode + "|" + EntityObjectList.Columns.formName;
     this.lueForm.Properties.IsUseShowColumn = true;
     this.lueForm.Properties.FilterColumn    = EntityObjectList.Columns.formCode + "|" + EntityObjectList.Columns.formName + "|" + EntityObjectList.Columns.pyCode + "|" + EntityObjectList.Columns.wbCode;
     // 表单
     using (ProxyFormDesign proxy = new ProxyFormDesign())
     {
         List <EntityFormDesign> data = proxy.Service.GetForm(0, false);
         if (data != null && data.Count > 0)
         {
             foreach (EntityFormDesign item in data)
             {
                 DataSourceForm.Add(new EntityObjectList()
                 {
                     formId = "a" + item.Formid.ToString(), formCode = item.Formcode, formName = item.Formname, pyCode = item.Pycode, wbCode = item.Wbcode
                 });
             }
         }
     }
     // 表格
     using (ProxyEntityFactory proxy = new ProxyEntityFactory())
     {
         DataTable dt = proxy.Service.SelectFullTable(new EntityEmrTableBasicInfo());
         List <EntityEmrTableBasicInfo> DataSourceTable = EntityTools.ConvertToEntityList <EntityEmrTableBasicInfo>(dt);
         if (DataSourceTable == null)
         {
             DataSourceTable = new List <EntityEmrTableBasicInfo>();
         }
         foreach (EntityEmrTableBasicInfo item in DataSourceTable)
         {
             DataSourceForm.Add(new EntityObjectList()
             {
                 formId = "b" + item.tableCode, formCode = item.tableCode, formName = item.tableName, pyCode = SpellCodeHelper.GetPyCode(item.tableName), wbCode = SpellCodeHelper.GetWbCode(item.tableName)
             });
         }
     }
     if (DataSourceForm != null && DataSourceForm.Count > 0)
     {
         this.lueForm.Properties.DataSource = DataSourceForm.ToArray();
     }
     this.lueForm.Properties.SetSize();
 }
Esempio n. 16
0
 /// <summary>
 /// InitFunc
 /// </summary>
 void InitFunc()
 {
     using (ProxyEntityFactory proxy = new ProxyEntityFactory())
     {
         DataTable             dt       = proxy.Service.SelectFullTable(new EntityFunction());
         List <EntityFunction> dataFunc = EntityTools.ConvertToEntityList <EntityFunction>(dt);
         dataFunc.Sort();
         Viewer.tvFunction.BeginUpdate();
         Viewer.tvFunction.DataSource = dataFunc;
         Viewer.tvFunction.ExpandAll();
         Viewer.tvFunction.EndUpdate();
     }
 }
Esempio n. 17
0
 /// <summary>
 /// Refresh
 /// </summary>
 internal void Refresh()
 {
     using (ProxyEntityFactory proxy = new ProxyEntityFactory())
     {
         DataTable             dt   = proxy.Service.SelectFullTable(new EntityCodeRole());
         List <EntityCodeRole> data = EntityTools.ConvertToEntityList <EntityCodeRole>(dt);
         foreach (EntityCodeRole item in data)
         {
             item.isEdit = 1;    // 不能编辑
         }
         this.gvDataBindingSourceRole.DataSource = data;
     }
     LoadRoleOper(Viewer.gvRole.FocusedRowHandle);
 }
Esempio n. 18
0
 /// <summary>
 /// LoadDataSource
 /// </summary>
 void LoadDataSource()
 {
     using (ProxyEntityFactory proxy = new ProxyEntityFactory())
     {
         this.isInit = true;
         DataTable dt = proxy.Service.SelectFullTable(new EntitySysReport());
         DataSourceRpt = EntityTools.ConvertToEntityList <EntitySysReport>(dt);
         Viewer.tvRport.BeginUpdate();
         Viewer.tvRport.DataSource = DataSourceRpt;
         Viewer.tvRport.ExpandAll();
         Viewer.tvRport.EndUpdate();
         this.isInit = false;
     }
 }
Esempio n. 19
0
        /// <summary>
        /// LoadDataSource
        /// </summary>
        void LoadDataSource(bool isFind)
        {
            this.isInit = true;
            using (ProxyEntityFactory proxy = new ProxyEntityFactory())
            {
                DataTable dt = proxy.Service.SelectFullTable(new EntityEmrTableBasicInfo());
                DataSourceTable = EntityTools.ConvertToEntityList <EntityEmrTableBasicInfo>(dt);
            }
            if (DataSourceTable == null)
            {
                DataSourceTable = new List <EntityEmrTableBasicInfo>();
            }
            foreach (EntityEmrTableBasicInfo item in DataSourceTable)
            {
                if (string.IsNullOrEmpty(item.pyCode))
                {
                    item.pyCode = SpellCodeHelper.GetPyCode(item.tableName);
                }
                if (string.IsNullOrEmpty(item.wbCode))
                {
                    item.wbCode = SpellCodeHelper.GetWbCode(item.tableName);
                }
                item.imageIndex = 1;
                item.parent     = "99";
                item.isLeaf     = true;
            }
            EntityEmrTableBasicInfo defaultVo = null;

            if (DataSourceTable.Count > 0 && defaultVo == null)
            {
                defaultVo = DataSourceTable[0];
            }
            EntityEmrTableBasicInfo vo = new EntityEmrTableBasicInfo();

            vo.tableCode  = "99";
            vo.tableName  = "全部表格";
            vo.imageIndex = 2;
            DataSourceTable.Add(vo);

            Viewer.tvTable.BeginUpdate();
            Viewer.tvTable.DataSource = DataSourceTable;
            Viewer.tvTable.ExpandAll();
            Viewer.tvTable.EndUpdate();
            if (defaultVo != null && isFind == false)
            {
                LoadTable(defaultVo);
            }
            Viewer.ValueChanged = false;
            this.isInit         = false;
        }
Esempio n. 20
0
 /// <summary>
 /// LoadDicMarry
 /// </summary>
 void LoadDicMarry()
 {
     try
     {
         using (ProxyEntityFactory proxy = new ProxyEntityFactory())
         {
             GlobalDic.DataSourceDicMarry = EntityTools.ConvertToEntityList <EntityCodeMarry>(proxy.Service.SelectFullTable(new EntityCodeMarry()));
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 21
0
        /// <summary>
        /// LoadDataSource
        /// </summary>
        internal void LoadDataSource(bool isFind)
        {
            this.isInit = true;
            using (ProxyEntityFactory proxy = new ProxyEntityFactory())
            {
                DataTable dt = proxy.Service.SelectFullTable(new EntityEmrPrintTemplate());
                DataSourcePrtTemplate = EntityTools.ConvertToEntityList <EntityEmrPrintTemplate>(dt);
            }
            if (DataSourcePrtTemplate == null)
            {
                DataSourcePrtTemplate = new List <EntityEmrPrintTemplate>();
            }
            foreach (EntityEmrPrintTemplate item in DataSourcePrtTemplate)
            {
                if (string.IsNullOrEmpty(item.pyCode))
                {
                    item.pyCode = SpellCodeHelper.GetPyCode(item.templateName);
                }
                if (string.IsNullOrEmpty(item.wbCode))
                {
                    item.wbCode = SpellCodeHelper.GetWbCode(item.templateName);
                }
                item.imageIndex = 1;
                //item.parent = "999999999";
                item.isLeaf = true;
            }
            EntityEmrPrintTemplate defaultVo = null;

            if (DataSourcePrtTemplate.Count > 0 && defaultVo == null)
            {
                defaultVo = DataSourcePrtTemplate[0];
            }
            //EntityEmrPrintTemplate vo = new EntityEmrPrintTemplate();
            //vo.templateId = 999999999;
            //vo.templateName = "全部模板";
            //vo.imageIndex = 2;
            //DataSourcePrtTemplate.Add(vo);

            Viewer.tvTemplate.BeginUpdate();
            Viewer.tvTemplate.DataSource = DataSourcePrtTemplate;
            Viewer.tvTemplate.ExpandAll();
            Viewer.tvTemplate.EndUpdate();
            if (defaultVo != null && isFind == false)
            {
                LoadTemplate(defaultVo);
            }
            Viewer.ValueChanged = false;
            this.isInit         = false;
        }
Esempio n. 22
0
 /// <summary>
 /// LoadDefConfiguration
 /// </summary>
 void LoadDefConfiguration()
 {
     try
     {
         using (ProxyEntityFactory proxy = new ProxyEntityFactory())
         {
             DataTable dt = proxy.Service.SelectFullTable(new EntityDefConfiguration());
             GlobalDic.DataSourceDefConfiguration = EntityTools.ConvertToEntityList <EntityDefConfiguration>(dt);
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 23
0
 /// <summary>
 /// LoadDicDepartment
 /// </summary>
 static void LoadDicDepartment()
 {
     try
     {
         using (ProxyEntityFactory proxy = new ProxyEntityFactory())
         {
             DataTable dt = proxy.Service.SelectFullTable(new EntityCodeDepartment());
             GlobalDic.DataSourceDepartment = EntityTools.ConvertToEntityList <EntityCodeDepartment>(dt);
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 24
0
 /// <summary>
 /// RefreshData
 /// </summary>
 public override void RefreshData()
 {
     try
     {
         uiHelper.BeginLoading(this);
         using (ProxyEntityFactory proxy = new ProxyEntityFactory())
         {
             this.gridControl.DataSource = EntityTools.ConvertToEntityList <EntityDicHazards>(proxy.Service.SelectFullTable(new EntityDicHazards()));
             this.gridControl.RefreshDataSource();
         }
     }
     finally
     {
         uiHelper.CloseLoading(this);
     }
 }
Esempio n. 25
0
        /// <summary>
        /// Init
        /// </summary>
        void Init()
        {
            #region 参数
            List <EntityRptEventParm> EventParmData = null;
            using (ProxyEntityFactory proxy = new ProxyEntityFactory())
            {
                EventParmData = EntityTools.ConvertToEntityList <EntityRptEventParm>(proxy.Service.SelectFullTable(new EntityRptEventParm()));
            }
            #endregion

            #region xr
            decimal         printId = 0;
            EntitySysReport rptVo   = null;
            if (EventParmData != null)
            {
                if (EventParmData.Any(t => t.eventId == "12" && t.keyId == "printId"))
                {
                    printId = Function.Dec(EventParmData.FirstOrDefault(t => t.eventId == "12" && t.keyId == "printId").keyValue);
                }
            }
            if (printId > 0)
            {
                using (ProxyCommon proxy = new ProxyCommon())
                {
                    rptVo = proxy.Service.GetReport(printId);
                }
            }
            else
            {
                return;
            }
            xr = new XtraReport();
            if (rptVo != null)
            {
                MemoryStream ms = new MemoryStream();
                ms.Write(rptVo.rptFile, 0, rptVo.rptFile.Length);
                xr.LoadLayout(ms);
            }
            this.ucPrintControl.PrintingSystem = xr.PrintingSystem;
            xr.CreateDocument();
            #endregion

            this.Stat();
        }
Esempio n. 26
0
        /// <summary>
        /// 加载病历树
        /// </summary>
        void InitCatalog()
        {
            try
            {
                uiHelper.BeginLoading(Viewer);
                List <EntityEmrCatalog>       dataSourceEmrCatalog   = null;
                List <EntityEmrBasicInfo>     dataSourceEmrBasicInfo = null;
                List <EntityProgressNoteType> dataSourceEmrPnType    = null;
                using (ProxyEntityFactory proxy = new ProxyEntityFactory())
                {
                    EntityEmrCatalog vo1 = new EntityEmrCatalog();
                    vo1.caseScope        = 2;
                    vo1.status           = 1;
                    dataSourceEmrCatalog = EntityTools.ConvertToEntityList <EntityEmrCatalog>(proxy.Service.SelectSort(vo1, new List <string> {
                        EntityEmrCatalog.Columns.caseScope, EntityEmrCatalog.Columns.status
                    }, new List <string> {
                        EntityEmrCatalog.Columns.sortNo
                    }));

                    EntityEmrBasicInfo vo2 = new EntityEmrBasicInfo();
                    vo2.attribute          = -1;
                    vo2.showType           = -1;
                    dataSourceEmrBasicInfo = EntityTools.ConvertToEntityList <EntityEmrBasicInfo>(proxy.Service.Select(vo2, new List <string> {
                        EntityEmrBasicInfo.Columns.attribute, EntityEmrBasicInfo.Columns.showType
                    }, "<>", new List <string> {
                        EntityEmrBasicInfo.Columns.parentCode, EntityEmrBasicInfo.Columns.sortNo
                    }));

                    EntityProgressNoteType vo3 = new EntityProgressNoteType();
                    vo3.status          = 1;
                    dataSourceEmrPnType = EntityTools.ConvertToEntityList <EntityProgressNoteType>(proxy.Service.SelectSort(vo3, new List <string> {
                        EntityProgressNoteType.Columns.status
                    }, new List <string> {
                        EntityProgressNoteType.Columns.sortNo
                    }));
                }
                CreateCatalog(dataSourceEmrCatalog, dataSourceEmrBasicInfo, dataSourceEmrPnType);
            }
            finally
            {
                uiHelper.CloseLoading(Viewer);
            }
        }
Esempio n. 27
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            //if (clsDialog.Msg("是否保存自定义列信息?", MessageBoxIcon.Question) == DialogResult.Yes)
            if (GlobalPatient.currPatient == null || string.IsNullOrEmpty(GlobalPatient.currPatient.RegisterID))
            {
                return;
            }

            int    intRet     = 0;
            string strColDesc = this.txtColCaption.Text;

            EntityEmrSelfDefineCol vo = new EntityEmrSelfDefineCol();

            vo.registerId = GlobalPatient.currPatient.RegisterID;
            vo.caseCode   = GlobalCase.caseInfo.CaseCode;
            vo.colCode    = this.m_strColCode;
            vo.colDesc    = strColDesc;
            vo.pageNo     = this.m_intPageNo;
            using (ProxyEntityFactory proxy = new ProxyEntityFactory())
            {
                try
                {
                    intRet = proxy.Service.DeleteByPk(vo);
                    intRet = proxy.Service.Insert(vo);
                    if (intRet > 0)
                    {
                        DialogBox.Msg("保存成功!");
                        strColCaption     = strColDesc;
                        strOrgColCaption  = strColCaption;
                        this.DialogResult = DialogResult.OK;
                    }
                    else
                    {
                        DialogBox.Msg("保存失败.", MessageBoxIcon.Error);
                    }
                }
                catch (Exception ex)
                {
                    DialogBox.Msg("保存失败." + ex.Message, MessageBoxIcon.Error);
                }
            }
        }
Esempio n. 28
0
 /// <summary>
 /// LoadDicJob
 /// </summary>
 void LoadDicJob()
 {
     try
     {
         using (ProxyEntityFactory proxy = new ProxyEntityFactory())
         {
             GlobalDic.DataSourceDicJob = EntityTools.ConvertToEntityList <EntityCodeJob>(proxy.Service.SelectFullTable(new EntityCodeJob()));
             if (GlobalDic.DataSourceDicJob != null)
             {
                 foreach (EntityCodeJob item in GlobalDic.DataSourceDicJob)
                 {
                     item.pyCode = SpellCodeHelper.GetPyCode(item.name);
                     item.wbCode = SpellCodeHelper.GetWbCode(item.name);
                 }
             }
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 29
0
        private void m_mthLoadData()
        {
            bool   blnSingle   = true;
            string strCaseCode = GlobalCase.caseInfo.CaseCode;

            if (!TemplateFlag && !string.IsNullOrEmpty(this.m_strCaseCode) && this.m_strCaseCode != GlobalCase.caseInfo.CaseCode)
            {
                blnSingle   = false;
                strCaseCode = "'" + GlobalCase.caseInfo.CaseCode + "', '" + this.m_strCaseCode + "'";
            }
            EntityElementTemplate vo = new EntityElementTemplate();

            vo.status = 1;
            if (blnSingle)
            {
                vo.caseCode = strCaseCode;
            }
            else
            {
                vo.caseCode = "in (" + strCaseCode + ")";
            }
            ProxyEntityFactory proxy = new ProxyEntityFactory();
            DataTable          dt    = proxy.Service.Select(vo, new List <string> {
                EntityElementTemplate.Columns.caseCode, EntityElementTemplate.Columns.status
            });

            proxy = null;
            if (dt != null && dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    if (!this.m_hasElement.ContainsKey(dr[EntityElementTemplate.Columns.serno].ToString()))
                    {
                        this.m_hasElement.Add(dr[EntityElementTemplate.Columns.serno].ToString(), dr[EntityElementTemplate.Columns.caseCode].ToString());
                    }
                }
            }
            this.ctlPopupSelect.DataSource = dt;
        }
Esempio n. 30
0
        /// <summary>
        /// InitCatalog
        /// </summary>
        void InitCatalog()
        {
            List <EntityDicMessageType> dataSourceMsgCatalog = null;

            using (ProxyEntityFactory proxy = new ProxyEntityFactory())
            {
                dataSourceMsgCatalog = EntityTools.ConvertToEntityList <EntityDicMessageType>(proxy.Service.SelectFullTable(new EntityDicMessageType()));
            }
            if (dataSourceMsgCatalog != null)
            {
                // 树结构
                tvMsgType.Columns.Clear();
                uiHelper.SetGridCol(tvMsgType, new string[] { "typeName" }, new string[] { "短信模板" }, new int[] { 200 });
                tvMsgType.Columns["typeName"].AppearanceCell.Font = new Font("宋体", 9);
                tvMsgType.KeyFieldName        = "typeId";
                tvMsgType.ParentFieldName     = "parentId";
                tvMsgType.ImageIndexFieldName = "tmpNo";

                tvMsgType.OptionsView.FocusRectStyle = DrawFocusRectStyle.None;
                tvMsgType.Appearance.FocusedRow.Options.UseBackColor       = true;
                tvMsgType.Appearance.FocusedRow.BackColor                  = Color.LightGreen; // Color.LightSkyBlue;
                tvMsgType.Appearance.FocusedRow.BackColor2                 = Color.White;
                tvMsgType.Appearance.HideSelectionRow.Options.UseBackColor = true;
                tvMsgType.Appearance.HideSelectionRow.BackColor            = Color.LightGreen; // Color.LightSkyBlue;
                tvMsgType.Appearance.HideSelectionRow.BackColor2           = Color.White;

                tvMsgType.BeginUpdate();
                tvMsgType.DataSource = dataSourceMsgCatalog;

                tvMsgType.MouseClick       -= new MouseEventHandler(tvMsgType_MouseClick);
                tvMsgType.MouseClick       += new MouseEventHandler(tvMsgType_MouseClick);
                tvMsgType.MouseDoubleClick -= new MouseEventHandler(tvMsgType_MouseDoubleClick);
                tvMsgType.MouseDoubleClick += new MouseEventHandler(tvMsgType_MouseDoubleClick);

                tvMsgType.ExpandAll();
                tvMsgType.EndUpdate();
            }
        }