Exemplo n.º 1
0
        public void DeletePaperOfTopic(PaperEntity entity, long topicId)
        {
            TopicPaper tp = new TopicPaper()
            {
                TopicId = topicId, PaperId = entity.PaperId
            };

            topicPaperRepository.DeletePaperOfTopic(tp);
        }
Exemplo n.º 2
0
        //继承自SerializablePropertiesBase可序列化属性基类后,自动生成了两个列:PropertyNames和PropertyValues,详见该类定义

        /// <summary>
        /// 专题实体
        /// </summary>
        public static PaperEntity New()
        {
            PaperEntity topic = new PaperEntity()
            {
                //PaperId = -1,
                Title = string.Empty,
                Doi   = string.Empty,
            };

            return(topic);
        }
        //继承自SerializablePropertiesBase可序列化属性基类后,自动生成了两个列:PropertyNames和PropertyValues,详见该类定义

        /// <summary>
        /// 专题实体
        /// </summary>
        public static PaperEntity New()
        {
            PaperEntity topic = new PaperEntity()
            {
                //PaperId = -1,
                Title = string.Empty,
                Doi = string.Empty,

            };
            return topic;
        }
 public void AddPaperToTopic(long topicId,PaperEntity paperEntity)
 {
     if (paperEntity.PaperId > 0)
     {
         //paper已经存在了,只需添加到topicpaper中即可
         topicPaperRepository.AddPaperToTopic(paperEntity, topicId);
     }
     else {
         //新构建的paper,需要添加到paper表中;
         long retPaperId= (long)Create(paperEntity);
         AddPaperToTopic(topicId, retPaperId);
     }
 }
Exemplo n.º 5
0
 public void AddPaperToTopic(long topicId, PaperEntity paperEntity)
 {
     if (paperEntity.PaperId > 0)
     {
         //paper已经存在了,只需添加到topicpaper中即可
         topicPaperRepository.AddPaperToTopic(paperEntity, topicId);
     }
     else
     {
         //新构建的paper,需要添加到paper表中;
         long retPaperId = (long)Create(paperEntity);
         AddPaperToTopic(topicId, retPaperId);
     }
 }
        public void DeletePaperOfTopic(PaperEntity entity,long topicId)
        {
            TopicPaper tp = new TopicPaper() {TopicId=topicId,PaperId=entity.PaperId };

            topicPaperRepository.DeletePaperOfTopic(tp);
        }
 /// <summary>
 /// 删除专题
 /// </summary>
 /// <param name="groupId">专题Id</param>
 public int Delete(PaperEntity paper)
 {
     return paperRepository.Delete(paper);            
 }
 /// <summary>
 /// 创建专题
 /// </summary>
 /// <param name="userId">当前操作人</param>
 /// <param name="paper"><see cref="TopicEntity"/></param>
 /// <param name="logoFile">专题标识图</param>
 /// <returns>创建成功返回true,失败返回false</returns>
 public object Create(PaperEntity paper)
 {
     return paperRepository.Insert(paper);
 }
Exemplo n.º 9
0
 /// <summary>
 /// 删除专题
 /// </summary>
 /// <param name="groupId">专题Id</param>
 public int Delete(PaperEntity paper)
 {
     return(paperRepository.Delete(paper));
 }
Exemplo n.º 10
0
 /// <summary>
 /// 创建专题
 /// </summary>
 /// <param name="userId">当前操作人</param>
 /// <param name="paper"><see cref="TopicEntity"/></param>
 /// <param name="logoFile">专题标识图</param>
 /// <returns>创建成功返回true,失败返回false</returns>
 public object Create(PaperEntity paper)
 {
     return(paperRepository.Insert(paper));
 }