public void DoAddFriendLink([DataBind("S_FriendLink")] S_FriendLink sl) { try { if (string.IsNullOrEmpty(sl.Title)) { throw new TmmException("链接名称不能为空"); } if (string.IsNullOrEmpty(sl.LinkUrl)) { throw new TmmException("链接地址不能为空"); } Service.Bll.Sys.S_FriendLinkBll bll = new TMM.Service.Bll.Sys.S_FriendLinkBll(); if (sl.Fid != 0) { bll.Update(sl); } else { bll.Insert(sl); } base.SuccessInfo(); } catch (TmmException te) { AddError(te.Message); } RedirectToReferrer(); }
public void EditFriendLink(int?fid) { Service.Bll.Sys.S_FriendLinkBll bll = new TMM.Service.Bll.Sys.S_FriendLinkBll(); if (fid.HasValue) { S_FriendLink sl = bll.Get(fid.Value); PropertyBag["model"] = sl; } }
public void Update(S_FriendLink obj) { dal.Update(obj); }
public void Insert(S_FriendLink model) { dal.Insert(model); }
public void Update(S_FriendLink obj) { SqlMapper.Get().Update("S_FriendLink.Update", obj); }
public void Insert(S_FriendLink model) { TMM.Persistence.SqlMapper.Get().Insert("S_FriendLink.Insert", model); }