protected void lbtSingleDelete_Click(object sender, EventArgs e) { var bll = new BLL.CCOM.SMS_apply_record(); var lbtn = sender as LinkButton; if (lbtn != null) { var SMS_apply_id = Int64.Parse(DESEncrypt.Decrypt(lbtn.ToolTip.ToString())); bool result = true; try { result = bll.Delete(SMS_apply_id); } catch { result = false; } //string keywords = MyRequest.GetQueryString("keywords"); int page = MyRequest.GetQueryInt("page", 1); if (result == true) { JscriptMsg("删除成功!", Utils.CombUrlTxt("Manage_SMS_apply.aspx", "fun_id={0}&keywords={1}&page={2}", this.fun_id, this.keywords, page.ToString()), "Success"); } else { JscriptMsg("删除失败!", Utils.CombUrlTxt("Manage_SMS_apply.aspx", "fun_id={0}&keywords={1}&page={2}", this.fun_id, this.keywords, page.ToString()), "Error"); } } }
private void RptBind(string _strWhere, string _order) { int pageSize = GetPageSize(15); //每页数量 int page = MyRequest.GetQueryInt("page", 1); string keywords = MyRequest.GetQueryString("keywords"); int start_index = pageSize * (page - 1) + 1; int end_index = pageSize * page; this.txtKeywords.Text = keywords; var bll = new BLL.CCOM.SMS_apply_record(); //计算数量 int totalCount = bll.GetRecordCount(_strWhere); //绑定当页 if (check_type == 0 || check_type == -1) { this.rptList.DataSource = bll.GetListByPage(_strWhere, _order, start_index, end_index); this.rptList.DataBind(); } else { this.Repeater1.DataSource = bll.GetListByPage(_strWhere, _order, start_index, end_index); this.Repeater1.DataBind(); } //绑定页码 txtPageNum.Text = pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("Manage_SMS_apply.aspx", "fun_id={0}&keywords={1}&page={2}", this.fun_id, this.keywords, "__id__"); this.PageContent.InnerHtml = Utils.OutPageList(pageSize, page, totalCount, pageUrl, 8, true); }
public bool IsApplyStatus(long userId, int status) { var ml = new BLL.CCOM.SMS_apply_record().GetModelList(" User_id=" + userId + " and SMS_apply_status=" + status); if (ml != null && ml.Count > 0) { return(true); } return(false); }