예제 #1
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            int sucCount   = 0;
            int errorCount = 0;

            BLL.wx_userweixin bll = new BLL.wx_userweixin();
            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.DeleteWeixin(id))
                    {
                        sucCount += 1;
                    }
                    else
                    {
                        errorCount += 1;
                    }
                }
            }
            AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), "删除微信号信息" + sucCount + "条,失败" + errorCount + "条"); //记录日志

            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("wxcodemgr.aspx", "keywords={0}", this.keywords), "Success");
        }
예제 #2
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            int sucCount = 0;
            int errorCount = 0;
            BLL.wx_userweixin bll = new BLL.wx_userweixin();
            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.DeleteWeixin(id))
                    {
                        sucCount += 1;
                    }
                    else
                    {
                        errorCount += 1;
                    }
                }
            }
            AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), "删除微信号信息" + sucCount + "条,失败" + errorCount + "条"); //记录日志

            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("wxcodemgr.aspx", "keywords={0}", this.keywords), "Success");
        }
예제 #3
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            int sucCount   = 0;
            int errorCount = 0;

            BLL.wx_userweixin bll = new BLL.wx_userweixin();
            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.DeleteWeixin(id))
                    {
                        sucCount += 1;
                    }
                    else
                    {
                        errorCount += 1;
                    }
                }
            }

            //bool isAgent = false;
            //BLL.wx_agent_info aBll = new BLL.wx_agent_info();
            //Model.manager adminEntity = GetAdminInfo(); //取得管理员信息
            //Model.wx_agent_info agent = new Model.wx_agent_info();
            //if (adminEntity.agentLevel > 0)
            //{
            //    isAgent = true;
            //    agent = aBll.GetAgentModel(adminEntity.id);
            //}
            //if (isAgent && agent != null)
            //{
            //    如果为代理商,则将起微帐号数量减掉
            //    agent.wcodeNum -= sucCount;
            //    aBll.Update(agent);
            //}


            AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), "删除微信号信息" + sucCount + "条,失败" + errorCount + "条"); //记录日志

            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("wxcodemgr.aspx", "keywords={0}", this.keywords), "Success");
        }