Ejemplo n.º 1
0
 protected void LoadEntity(Links entity)
 {
     if (entity != null)
     {
         EntityId = entity.LinksId;
         Name = entity.Name;
         SortId = entity.SortId;
         Status = entity.Status;
         AUrl = entity.AUrl;
         LangId = entity.LangId;
         MainCode = entity.MainCode;
         MainName = entity.MainName;
         AdminCode = entity.AdminCode;
         AdminName = entity.AdminName;
         ServiceCode = entity.ServiceCode;
         ServiceName = entity.ServiceName;
         if (entity.LinksClass != null)
         {
             LinksClass = entity.LinksClass;
             LinksClassId = entity.LinksClass.LinksClassId;
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 刪除網路資源
 /// </summary>
 /// <param name="links">被刪除的網路資源</param>
 public void DeleteLinks(Links links)
 {
     FTISDao.DeleteLinks(links);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 更新網路資源
 /// </summary>
 /// <param name="links">被更新的網路資源</param>
 /// <returns>更新後的網路資源</returns>
 public Links UpdateLinks(Links links)
 {
     return FTISDao.UpdateLinks(links);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 網路資源
 /// </summary>
 /// <param name="links">被新增的網路資源</param>
 /// <returns>新增後的網路資源</returns>
 public Links CreateLinks(Links links)
 {
     return FTISDao.CreateLinks(links);
 }
Ejemplo n.º 5
0
        private void Save(Links entity)
        {
            if (LinksClassId > 0)
            {
                entity.LinksClass = m_FTISService.GetLinksClassById(LinksClassId);
            }
            else
            {
                entity.LinksClass = null;
            }

            entity.Name = Name;
            entity.SortId = SortId;
            entity.Status = Status;
            entity.AUrl = AUrl;
            entity.LangId = LangId;
            entity.MainCode = MainCode;
            entity.MainName = MainName;
            entity.AdminCode = AdminCode;
            entity.AdminName = AdminName;
            entity.ServiceCode = ServiceCode;
            entity.ServiceName = ServiceName;

            if (entity.LinksId == 0)
            {
                m_FTISService.CreateLinks(entity);
            }
            else
            {
                m_FTISService.UpdateLinks(entity);
            }

            LoadEntity(entity.LinksId);
        }
Ejemplo n.º 6
0
 public void Insert()
 {
     Links entity = new Links();
     Save(entity);
 }