Exemple #1
0
        /// <summary>
        /// 数据库模型转业务模型
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        protected FD_Relation EntityToModel(HR_FD_RELATION entity)
        {
            FD_Relation model = new FD_Relation()
            {
                Apply    = (entity.APPLY.HasValue && entity.APPLY.Value == 1),
                Generate = entity.GENERATE,
                Requird  = (entity.REQUIRD.HasValue && entity.REQUIRD.Value == 1),
                Sex      = entity.SEX.HasValue?entity.SEX.Value.ToString():"0",
                Side     = entity.SIDE,
                Sort     = entity.SORT.HasValue?Convert.ToInt32(entity.SORT.Value):9999,
                Text     = entity.TEXT,
                Value    = entity.RELATIONVALUE.ToString(),
                ID       = entity.ID
            };

            return(model);
        }
Exemple #2
0
 /// <summary>
 /// 修改家族史关系
 /// </summary>
 /// <param name="relation"></param>
 /// <returns></returns>
 public bool Edit(FD_Relation relation)
 {
     return(false);
 }
Exemple #3
0
 /// <summary>
 /// 新增家族史关系
 /// </summary>
 /// <param name="relation"></param>
 /// <returns></returns>
 public string Add(FD_Relation relation)
 {
     return(string.Empty);
 }