コード例 #1
0
        public ActionResult DebarBank(int BankId, int ChannelId, int UserId)
        {
            int    backState = -100;
            string msg       = string.Empty;

            string ubcurl = "/users/info/" + UserId;

            if (BankId > 0 && ChannelId > 0 && UserId > 0)
            {
                DebarBankChannel dbc = new DebarBankChannel();
                dbc.BankID    = BankId;
                dbc.ChannelID = ChannelId;
                dbc.UserId    = UserId;
                var result = debarBankChannelDao.Insert(dbc);
                backState = result > 0? 0 : -100;
                msg       = result > 0? "操作成功" : "操作失败";
                MemcachHelper.Delete(Constant.debarbankchannel_key);//清理缓存
            }
            return(new RedirectResult($"/Prompt?state={backState}&msg={msg}&url={ubcurl}"));
        }
コード例 #2
0
 /// <summary>
 /// Delete,根据实体对象删除
 /// </summary>
 /// <returns>返回,成功:true,失败:false</returns>
 public bool Delete(DebarBankChannel entity)
 {
     return(dal.Update(entity));
 }
コード例 #3
0
 /// <summary>
 /// 插入数据
 /// </summary>
 /// <returns>返回,成功:true,失败:false</returns>
 public int Insert(DebarBankChannel entity)
 {
     return(dal.Insert(entity));
 }