示例#1
0
        //删除
        protected void lbtSingleDelete_Click(object sender, EventArgs e)
        {
            BLL.CCOM.Family_member bll = new BLL.CCOM.Family_member();
            var lbtn = sender as Button;

            if (lbtn != null)
            {
                var  id     = Int32.Parse(DESEncrypt.Decrypt(lbtn.ToolTip.ToString()));
                bool result = true;
                try
                {
                    result = bll.Delete(id);
                }
                catch
                {
                    result = false;
                }
                if (result == true)
                {
                    JscriptMsg("删除成功!", Utils.CombUrlTxt("StudentApply1.aspx", "fun_id={0}",
                                                         DESEncrypt.Encrypt(this.fun_id)), "Success");
                }
                else
                {
                    JscriptMsg("删除失败!", Utils.CombUrlTxt("StudentApply1.aspx", "fun_id={0}",
                                                         DESEncrypt.Encrypt(this.fun_id)), "Error");
                }
            }
        }
示例#2
0
        //绑定信息
        public void MemberBing(long userID)
        {
            int start_index = 1;

            BLL.CCOM.Family_member bll = new BLL.CCOM.Family_member();
            string _strWhere           = " User_id = '" + userID + "' ";
            string _order = " Fm_id desc ";

            //计算数量
            int totalCount = bll.GetRecordCount(_strWhere);

            //绑定当页
            this.rptList.DataSource = bll.GetListByPage(_strWhere, _order, start_index, totalCount);
            this.rptList.DataBind();

            new BLL.CCOM.Politics().BindDDL(this.ddlMPolitics);
            this.ddlMPolitics.Items.Insert(0, new ListItem("请选择", "0"));
        }