Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 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;
     }
 }
Esempio n. 3
0
 public void Update(S_FriendLink obj)
 {
     dal.Update(obj);
 }
Esempio n. 4
0
 public void Insert(S_FriendLink model)
 {
     dal.Insert(model);
 }
Esempio n. 5
0
 public void Update(S_FriendLink obj)
 {
     SqlMapper.Get().Update("S_FriendLink.Update", obj);
 }
Esempio n. 6
0
 public void Insert(S_FriendLink model)
 {
     TMM.Persistence.SqlMapper.Get().Insert("S_FriendLink.Insert", model);
 }