Ejemplo n.º 1
0
 private GuideLine EntityToModel2(CTMS_GUIDELINE entity)
 {
     if (entity == null)
     {
         return(null);
     }
     return(new GuideLine()
     {
         ID = entity.ID,
         Name = entity.NAME,
     });
 }
Ejemplo n.º 2
0
 public GuideLine Get(string id)
 {
     using (DbContext db = new CRDatabase())
     {
         CTMS_GUIDELINE entity = db.Set <CTMS_GUIDELINE>().Find(id);
         if (entity == null || string.IsNullOrEmpty(entity.ID))
         {
             return(null);
         }
         return(EntityToModel(entity));
     }
 }
Ejemplo n.º 3
0
 private GuideLine EntityToModel(CTMS_GUIDELINE entity)
 {
     if (entity == null)
     {
         return(null);
     }
     return(new GuideLine()
     {
         ID = entity.ID,
         Code = entity.CODE,
         Name = entity.NAME,
         ParentID = entity.PARENTID,
         CreateDateTime = entity.CREATEDATETIME
     });
 }
Ejemplo n.º 4
0
        private GuideLine EntityToModel(CTMS_GUIDELINE entity)
        {
            if (entity == null)
            {
                return(null);
            }
            return(new GuideLine()
            {
                ID = entity.ID,
                Name = entity.NAME,
                Code = entity.CODE,
                ClinicalBasis = entity.CLINICALBASIS,
                IsInherit = entity.ISINHERIT,
                ParentID = entity.PARENTID,


                ParentList = GetParentGuideLineList(entity.ID),


                ParentName = string.IsNullOrEmpty(entity.PARENTID) ? null : GetSimpleModel(entity.PARENTID).Name,
                EnterLogicalOperator = (LogicOperator)entity.ENTERLOGICALOPERATOR,
                EnterCondItemList = string.IsNullOrEmpty(entity.ENTERCONDITEMIDS) ? new List <ConditionItem>() : new ConditionItemBLL().GetCondItemListByIDs(entity.ENTERCONDITEMIDS),
                OutLogicalOperator = (LogicOperator)entity.OUTLOGICALOPERATOR,
                OutCondItemList = string.IsNullOrEmpty(entity.OUTCONDITEMIDS) ? new List <ConditionItem>() : new ConditionItemBLL().GetCondItemListByIDs(entity.OUTCONDITEMIDS),
                MetaDataList = new GuideLineDataBLL().GetDataList(entity.ID),

                CreateDateTime = entity.CREATEDATETIME,
                CreateUserID = entity.CREATEUSERID,
                CreateUserName = entity.CREATEUSERNAME,
                EditTime = entity.EDITDATETIME,
                EditUserID = entity.EDITUSERID,
                EditUserName = entity.EDITUSERNAME,
                OwnerID = entity.OWNERID,
                OwnerName = entity.OWNERNAME,
                IsDeleted = entity.ISDELETED,
                RecommendProcess = entity.RECOMMENDPROCESS
            });
        }