예제 #1
0
        public int SaveSiteLink(int siteId, ISiteLink link)
        {
            if (link.GetDomainId() <= 0)
            {
                return(linkDal.AddSiteLink(siteId, link));
            }

            return(linkDal.UpdateSiteLink(siteId, link));
        }
예제 #2
0
 public static SiteLinkDto ConvertFrom(ISiteLink link)
 {
     return(new SiteLinkDto
     {
         Bind = link.Bind,
         Id = link.GetDomainId(),
         ImgUrl = link.ImgUrl,
         SortNumber = link.SortNumber,
         Pid = link.Pid,
         Target = link.Target,
         Text = link.Text,
         Type = link.Type,
         Uri = link.Uri,
         Visible = link.Visible
     });
 }
예제 #3
0
파일: LinkDal.cs 프로젝트: lyfb/cms-1
 public int UpdateSiteLink(int siteId, ISiteLink link)
 {
     return(ExecuteNonQuery(
                NewQuery(DbSql.Link_UpdateSiteLink,
                         Db.CreateParametersFromArray(
                             new object[, ]
     {
         { "@siteId", siteId },
         { "@pid", link.Pid },
         { "@TypeId", link.Type },
         { "@Text", link.Text },
         { "@Uri", link.Uri },
         { "@imgurl", link.ImgUrl },
         { "@Target", link.Target },
         { "@sortNumber", link.SortNumber },
         { "@visible", link.Visible },
         { "@LinkId", link.GetDomainId() },
         { "@bind", link.Bind }
     }))));
 }