62,160
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using HSM.Web.Link.Common;
public class TLinkFacade
{
private static ILinkRule sm_rule = new TLinkRuleFactory().GetFactory();
public static void SaveLink(int id, string lang, string nm, string href)
{
TLinkEntity lnk = new TLinkEntity();
lnk.LinkID = id;
lnk.Language = lang;
lnk.LinkName = nm;
lnk.Href = href;
lnk.Logo = "1";
lock (sm_rule)
{
if (id > 0)
sm_rule.UpdateLink(lnk);
else
sm_rule.AddLink(lnk);
}
}
public static void DeleteLink(int id)
{
TLinkEntity lnk = new TLinkEntity();
lnk.LinkID = id;
lock (sm_rule)
{
sm_rule.DeleteLink(lnk);
}
}
public static TLinkList GetLinkList(string lang)
{
TLinkEntity lnk = new TLinkEntity();
lnk.Language = lang;
lock (sm_rule)
{
return sm_rule.GetLinkList(lnk);
}
}
public static TLinkEntity GetLinkInfo(int id)
{
TLinkEntity lnk = new TLinkEntity();
lnk.LinkID = id;
lock (sm_rule)
{
sm_rule.GetLinkInfo(ref lnk);
}
return lnk;
}
}