예제 #1
0
 protected void lnk_Delete_Click(object sender, System.EventArgs e)
 {
     if (!base.IsAuthorizedOp(ActionType.Delete.ToString()))
     {
         base.ShowAjaxMsg(this.UpdatePanel1, "Không có thẩm quyền");
     }
     else
     {
         int            @int     = WebUtils.GetInt((sender as LinkButton).CommandArgument);
         AuctionLogInfo dataById = SinGooCMS.BLL.AuctionLog.GetDataById(@int);
         if (dataById == null)
         {
             base.ShowAjaxMsg(this.UpdatePanel1, "Những thông tin này không được tìm thấy, các dữ liệu không tồn tại hoặc đã bị xóa");
         }
         else if (SinGooCMS.BLL.AuctionLog.Delete(@int))
         {
             this.BindData();
             PageBase.log.AddEvent(base.LoginAccount.AccountName, string.Concat(new object[]
             {
                 "删除拍卖记录[ID:",
                 dataById.AuctionID,
                 "]用户[",
                 dataById.UserName,
                 "]的拍卖记录成功"
             }));
             base.ShowAjaxMsg(this.UpdatePanel1, "删除成功");
         }
         else
         {
             base.ShowAjaxMsg(this.UpdatePanel1, "删除失败");
         }
     }
 }
예제 #2
0
        public static int Add(AuctionLogInfo entity)
        {
            int result;

            if (entity == null)
            {
                result = 0;
            }
            else
            {
                result = BizBase.dbo.InsertModel <AuctionLogInfo>(entity);
            }
            return(result);
        }
예제 #3
0
 public static bool Update(AuctionLogInfo entity)
 {
     return(entity != null && BizBase.dbo.UpdateModel <AuctionLogInfo>(entity));
 }