private void RptBind(string _strWhere, string _orderby)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            _strWhere = "wId=" + weixin.id + " " + _strWhere;
            this.page = MXRequest.GetQueryInt("page", 1);

            DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("BlackManage.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 2
0
 /// <summary>
 /// 重写父类的虚方法,此方法将在Init事件前执行
 /// </summary>
 protected override void ShowPage()
 {
     action = MXRequest.GetQueryString("action");
     if (action == "reset")
     {
         string strcode = MXRequest.GetQueryString("code");
         if (strcode != null)
         {
             model = new BLL.user_code().GetModel(strcode);
             if (model == null)
             {
                 HttpContext.Current.Response.Redirect(linkurl("repassword", "error"));
                 return;
             }
         }
     }
 }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     yiModel = new Model.wx_fc_yyInfo();
     wid     = MXRequest.GetQueryInt("wid");
     fid     = MXRequest.GetQueryInt("fid");
     openid  = MyCommFun.RequestOpenid();
     if (!IsPostBack)
     {
         int yid = MXRequest.GetQueryInt("yid");
         if (yid > 0)
         {
             yiModel   = yiBll.GetModel(yid);
             addOrEdit = yiModel.Id;
         }
         showInfo();
     }
 }
Esempio n. 4
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();

            //判断是否已经设置了微留言基本信息
            BLL.wx_hotel_dingdan sbll = new BLL.wx_hotel_dingdan();

            _strWhere = " hotelid=" + hotelid + " " + _strWhere;

            this.page        = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            // DataSet ds = gbll.GetList( _strWhere);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr;

                int count = ds.Tables[0].Rows.Count;
                for (int i = 0; i < count; i++)
                {
                    dr = ds.Tables[0].Rows[i];
                    if (dr["orderStatus"].ToString() == "0")
                    {
                        dr["payStatusStr"] = "未处理";
                    }
                    else if (dr["orderStatus"].ToString() == "1")
                    {
                        dr["payStatusStr"] = "已确认";
                    }
                    else
                    {
                        dr["payStatusStr"] = "已拒绝";
                    }
                }
                ds.AcceptChanges();
            }
            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("hotel_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ChkAdminLevel("fensimgr", MXEnums.ActionEnum.View.ToString()); //检查权限
            this.group_id = MXRequest.GetQueryInt("group_id");
            status        = MXRequest.GetQueryString("status");
            this.keywords = MXRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ValidAccessToken();
                GroupBind(); //绑定类别

                Model.wx_userweixin weixin = GetWeiXinCode();
                RptBind("u.wid=" + weixin.id + " " + CombSqlTxt(this.status, this.group_id, this.keywords), "groupid desc,id desc");
            }
        }
Esempio n. 6
0
        private void RptBind(string _strWhere, string _orderby)
        {
            int aid = MyCommFun.RequestInt("id");

            _strWhere        = "actid=" + aid + " " + _strWhere;
            this.page        = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            DataSet ds = ubll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr;
                int     count = ds.Tables[0].Rows.Count;
                var     table = ds.Tables[0];
                table.Columns.Add("nickName");
                table.Columns.Add("headimgurl");
                for (int i = 0; i < count; i++)
                {
                    dr = table.Rows[i];
                    var openid = dr["openid"].ToString();
                    if (!string.IsNullOrEmpty(openid))
                    {
                        var userDto = _userService.Get(openid);
                        if (userDto != null)
                        {
                            var headImg = MyCommFun.getWebSite() + "/images/weichatDefaultHeadImg.jpg";
                            if (!string.IsNullOrEmpty(userDto.headimgurl))
                            {
                                headImg = userDto.headimgurl;
                            }
                            dr["nickName"]   = userDto.nickname;
                            dr["headimgurl"] = headImg;
                        }
                    }
                }
                ds.AcceptChanges();
            }
            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("luckyMoneyAwardUser.aspx", "id={0}&keywords={1}&page={2}", MyCommFun.RequestInt("id").ToString(), this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 7
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page             = MXRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            //列表显示
            BLL.wx_mz_magazine bll   = new BLL.wx_mz_magazine();
            DataSet            artDs = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out totalCount);

            this.rptList.DataSource = artDs;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("magazien_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ChkAdminLevel("ucard_info", MXEnums.ActionEnum.View.ToString()); //检查权限

            this.keywords = MXRequest.GetQueryString("keywords");
            sid           = getStoreid();
            if (sid == 0)
            {
                JscriptMsg("请先在商家设置里面添加一个店铺!!", "back", "Error");
                return;
            }
            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                RptBind(CombSqlTxt(keywords), "createDate desc");
            }
        }
Esempio n. 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //取得返回参数
            string state = MXRequest.GetQueryString("state");
            string code  = MXRequest.GetQueryString("code");

            string access_token = string.Empty;
            string expires_in   = string.Empty;
            string client_id    = string.Empty;
            string openid       = string.Empty;

            if (Session["oauth_state"] == null || Session["oauth_state"].ToString() == "" || state != Session["oauth_state"].ToString())
            {
                Response.Write("出错啦,state未初始化!");
                return;
            }

            //第一步:获取Access Token
            JsonData jd = kaixin_helper.get_access_token(code, state);

            if (jd == null)
            {
                Response.Write("出错了,无法获取Access Token,请检查App Key是否正确!");
                return;
            }
            access_token = jd["access_token"].ToString();
            expires_in   = jd["expires_in"].ToString();

            //第二步:通过Access Token来获取用户的ID
            JsonData jd2 = kaixin_helper.get_info(access_token, "uid");

            if (jd2 == null)
            {
                Response.Write("出错啦,无法获取用户授权uid!");
                return;
            }
            openid = jd2["uid"].ToString();
            //储存获取数据用到的信息
            Session["oauth_name"]         = "kaixin";
            Session["oauth_access_token"] = access_token;
            Session["oauth_openid"]       = openid;

            //第三步:跳转到指定页面
            Response.Redirect(new Web.UI.BasePage().linkurl("oauth_login"));
            return;
        }
Esempio n. 10
0
        private bool DoAdd()
        {
            bool result = false;

            Model.users model = new Model.users();
            BLL.users   bll   = new BLL.users();

            model.group_id = int.Parse(ddlGroupId.SelectedValue);
            model.status   = int.Parse(rblStatus.SelectedValue);
            //检测用户名是否重复
            if (bll.Exists(txtUserName.Text.Trim()))
            {
                return(false);
            }
            model.user_name = Utils.DropHTML(txtUserName.Text.Trim());
            //获得6位的salt加密字符串
            model.salt = Utils.GetCheckCode(6);
            //以随机生成的6位字符串做为密钥加密
            model.password  = DESEncrypt.Encrypt(txtPassword.Text.Trim(), model.salt);
            model.email     = Utils.DropHTML(txtEmail.Text);
            model.nick_name = Utils.DropHTML(txtNickName.Text);
            model.avatar    = Utils.DropHTML(txtAvatar.Text);
            model.sex       = rblSex.SelectedValue;
            DateTime _birthday;

            if (DateTime.TryParse(txtBirthday.Text.Trim(), out _birthday))
            {
                model.birthday = _birthday;
            }
            model.telphone = Utils.DropHTML(txtTelphone.Text.Trim());
            model.mobile   = Utils.DropHTML(txtMobile.Text.Trim());
            model.qq       = Utils.DropHTML(txtQQ.Text);
            model.address  = Utils.DropHTML(txtAddress.Text.Trim());
            model.amount   = decimal.Parse(txtAmount.Text.Trim());
            model.point    = int.Parse(txtPoint.Text.Trim());
            model.exp      = int.Parse(txtExp.Text.Trim());
            model.reg_time = DateTime.Now;
            model.reg_ip   = MXRequest.GetIP();

            if (bll.Add(model) > 0)
            {
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加用户:" + model.user_name); //记录日志
                result = true;
            }
            return(result);
        }
Esempio n. 11
0
        private void RptBind(string strWhere, string orderby)
        {
            this.CurrentPage = MXRequest.GetQueryInt("page", 1);

            //列表显示
            BLL.wx_travel_scenicDetail bll = new BLL.wx_travel_scenicDetail();
            DataSet dsData = bll.GetPageList(PageSize, this.CurrentPage, strWhere, orderby, out TotalCount);

            this.rptList.DataSource = dsData;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.PageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("scenic_deatil_list.aspx", "scenicId={0}&page={1}", ScenicId.ToString(), "__id__");

            PageContent.InnerHtml = Utils.OutPageList(PageSize, CurrentPage, TotalCount, pageUrl, 8);
        }
Esempio n. 12
0
        private void RptBind()
        {
            this.page = MXRequest.GetQueryInt("page", 1);
            // this.txtKeywords.Text = this.keywords;
            string _orderby = " SortNum asc,ID desc";
            List <Model.T_Regional> list = bll.GetListByPage(pageSize, page, WhereSql(), _orderby, out this.totalCount);

            this.rptList.DataSource = list;
            this.rptList.DataBind();


            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt(ThisUrl, "keywords={0}&page={1}&id={2}", this.keywords, "__id__", id.ToString());

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //取得返回参数
            string state = MXRequest.GetQueryString("state");
            string code  = MXRequest.GetQueryString("code");

            string access_token = string.Empty;
            string expires_in   = string.Empty;
            string client_id    = string.Empty;
            string openid       = string.Empty;

            if (Session["oauth_state"] == null || Session["oauth_state"].ToString() == "" || state != Session["oauth_state"].ToString())
            {
                Response.Write("出错啦,state未初始化!");
                return;
            }

            //第一步:获取Access Token
            Dictionary <string, object> dic1 = feixin_helper.get_access_token(code);

            if (dic1 == null || !dic1.ContainsKey("access_token"))
            {
                Response.Write("出错了,无法获取Access Token,请检查App Key是否正确!");
                return;
            }
            access_token = dic1["access_token"].ToString();
            expires_in   = dic1["expires_in"].ToString();
            //第二步:通过Access Token来获取用户的ID
            Dictionary <string, object> dic2 = feixin_helper.get_info(access_token);

            if (dic2 == null || !dic2.ContainsKey("userId"))
            {
                Response.Write("出错啦,无法获取用户授权uid!");
                return;
            }
            openid = dic2["userId"].ToString();
            //储存获取数据用到的信息
            Session["oauth_name"]         = "feixin";
            Session["oauth_access_token"] = access_token;
            Session["oauth_openid"]       = openid;

            //第三步:跳转到指定页面
            Response.Redirect(new Web.UI.BasePage().linkurl("oauth_login"));
            return;
        }
Esempio n. 14
0
        private bool DoAdd()
        {
            //地区
            string prov = ddlProvince.SelectedItem.Value;
            string city = ddlCity.SelectedItem.Value;
            string dist = "";


            Model.manager model = new Model.manager();
            BLL.manager   bll   = new BLL.manager();
            model.role_id   = 2;
            model.role_type = new BLL.manager_role().GetModel(model.role_id).role_type;
            model.is_lock   = 0;

            //检测用户名是否重复
            if (bll.Exists(txtUserName.Text.Trim()))
            {
                return(false);
            }
            model.user_name = txtUserName.Text.Trim();
            //获得6位的salt加密字符串
            model.salt = Utils.GetCheckCode(6);
            //以随机生成的6位字符串做为密钥加密
            model.password  = DESEncrypt.Encrypt(txtPassword.Text.Trim(), model.salt);
            model.real_name = txtRealName.Text.Trim();
            model.telephone = txtTelephone.Text.Trim();
            model.email     = "";
            model.add_time  = DateTime.Now;
            model.wxNum     = 3;
            model.agentId   = 1;
            model.qq        = txtqq.Text;
            model.email     = "";
            model.reg_ip    = MXRequest.GetIP();
            model.province  = prov;
            model.city      = city;
            model.county    = dist;
            model.sort_id   = 99;

            if (bll.Add(model) > 0)
            {
                // mp.AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "注册用户:" + model.user_name); //记录日志
                return(true);
            }
            return(false);
        }
Esempio n. 15
0
        private void RptBind(int _channel_id, int _category_id, string _strWhere, string _orderby)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();

            this.page = MXRequest.GetQueryInt("page", 1);

            this.txtKeywords.Text = this.keywords;
            //图表或列表显示
            BLL.article bll = new BLL.article();
            DataSet     ds  = bll.GetWCodeList(weixin.id, _channel_id, _category_id, this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr;
                int     cout = ds.Tables[0].Rows.Count;
                for (int i = 0; i < cout; i++)
                {
                    dr = ds.Tables[0].Rows[i];

                    string linkUrl = MyCommFun.ObjToStr(dr["link_url"]);

                    if (linkUrl.Length > 0)
                    {
                        //外链地址
                        dr["link_url"] = "<span class=\"lianjie_wai\">[外]</span>" + " <a href=\"javascript:;\">" + linkUrl + "</a>";
                    }
                    else
                    {
                        dr["link_url"] = "<span class=\"lianjie_ben\">[本]</span>" + " <a href=\"javascript:;\">" + MyCommFun.getWebSite() + "/content.aspx?wid=" + MyCommFun.ObjToStr(dr["wid"]) + "&aid=" + dr["id"].ToString() + "</a>";

                        // dr["link_url"] = "<span class=\"lianjie_ben\">[本]</span>" + " <a href=\"javascript:;\">" + MyCommFun.getWebSite() + "/detail.aspx?wid=" + MyCommFun.ObjToStr(dr["wid"]) + "&aid=" + dr["id"] + "</a>";
                    }
                }
                ds.AcceptChanges();
            }
            this.rptList1.DataSource = ds;
            this.rptList1.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("wx_article_page_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}",
                                              _channel_id.ToString(), _category_id.ToString(), this.keywords, this.property, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            bll = new WXUserService(new WXUserRepository());
            string _action = MXRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == MXEnums.ActionEnum.Edit.ToString())
            {
                this.action = MXEnums.ActionEnum.Edit.ToString();//修改类型
                if (!int.TryParse(Request.QueryString["id"] as string, out this.id))
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!bll.Exists(this.id))
                {
                    JscriptMsg("记录不存在或已被删除!", "back", "Error");
                    return;
                }
            }
            else
            {
                //添加,则需要判断可以添加的微信号数量
                if (IsChaoGuoWxNum())
                {
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                txtapiurl.Text = MyCommFun.getWebSite() + "/api/weixin/api.aspx";
                //  ChkAdminLevel("manager_list", MXEnums.ActionEnum.View.ToString()); //检查权限
                //1e2124dd04e11d01b9df2865f85944be
                var model = GetAdminInfo();                       //取得管理员信息

                if (action == MXEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
                else
                {
                    txtEncodingAESKey.Text = Utils.GetLetterOrNumberRandom(43);
                    txtwxToken.Text        = Utils.GetLetterOrNumberRandom(10);
                }
            }
        }
Esempio n. 17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     order_no = MXRequest.GetQueryString("order_no");
     if (order_no == "")
     {
         JscriptMsg("传输参数不正确!", "back", "Error");
         return;
     }
     if (!new BLL.orders().Exists(order_no))
     {
         JscriptMsg("订单不存在或已被删除!", "back", "Error");
         return;
     }
     if (!Page.IsPostBack)
     {
         ShowInfo(order_no);
     }
 }
Esempio n. 18
0
        private void RptBind(string _strWhere, string _orderby)
        {
            int bid = MyCommFun.RequestInt("id");

            _strWhere        = "bid=" + bid + " " + _strWhere;
            this.page        = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            DataSet ds = zbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("xitieZhuFu.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 19
0
        private void manager_validate(HttpContext context)
        {
            string user_name = MXRequest.GetString("param");

            if (string.IsNullOrEmpty(user_name))
            {
                context.Response.Write("{ \"info\":\"请输入用户名\", \"status\":\"n\" }");
                return;
            }
            BLL.dt_manager bll = new BLL.dt_manager();
            if (bll.Exists(user_name))
            {
                context.Response.Write("{ \"info\":\"用户名已被占用,请更换!\", \"status\":\"n\" }");
                return;
            }
            context.Response.Write("{ \"info\":\"用户名可使用\", \"status\":\"y\" }");
            return;
        }
Esempio n. 20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.id = MXRequest.GetQueryInt("id");
     if (this.id == 0)
     {
         JscriptMsg("传输参数不正确!", "back", "Error");
         return;
     }
     if (!new BLL.wx_payment_type().Exists(this.id))
     {
         JscriptMsg("支付方式不存在或已删除!", "back", "Error");
         return;
     }
     if (!Page.IsPostBack)
     {
         ShowInfo(this.id);
     }
 }
Esempio n. 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            adminEntity = GetAdminInfo(); //取得管理员信息
            agent       = aBll.GetAgentModel(adminEntity.id);
            if (agent == null)
            {
                return;
            }
            this.keywords = MXRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("agent_myxfjl", MXEnums.ActionEnum.View.ToString()); //检查权限
                Model.manager model = GetAdminInfo();                              //取得当前管理员信息
                RptBind(CombSqlTxt(keywords), "operDate asc,id desc");
            }
        }
Esempio n. 22
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            _strWhere        = "wId=" + weixin.id + " " + _strWhere;
            this.page        = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            DataSet ds = tbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow  dr;
                DateTime begin = new DateTime();
                DateTime end   = new DateTime();
                int      count = ds.Tables[0].Rows.Count;
                for (int i = 0; i < count; i++)
                {
                    dr    = ds.Tables[0].Rows[i];
                    begin = MyCommFun.Obj2DateTime(dr["beginDate"]);
                    end   = MyCommFun.Obj2DateTime(dr["endDate"]);
                    if (begin > DateTime.Now)
                    {
                        dr["status_s"] = "<span class=\"act_before\">未开始</span>";
                    }
                    else if (end <= DateTime.Now)
                    {
                        dr["status_s"] = "<span class=\"act_end\">已结束</span>";
                    }
                    else
                    {
                        dr["status_s"] = "<span class=\"act_in\">进行中</span>";
                    }
                    dr["url"] = MyCommFun.getWebSite() + "/weixin/sticket/index.aspx?wid=" + dr["wid"].ToString() + "&aid=" + dr["id"].ToString();
                }
                ds.AcceptChanges();
            }
            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("simpleTList.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = MXRequest.GetQueryString("action");

            this.channel_id = MXRequest.GetQueryInt("channel_id");
            this.id         = MXRequest.GetQueryInt("id");

            if (this.channel_id == 0)
            {
                JscriptMsg("频道参数不正确!", "back", "Error");
                return;
            }
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得频道名称
            if (!string.IsNullOrEmpty(_action) && _action == MXEnums.ActionEnum.Edit.ToString())
            {
                this.action = MXEnums.ActionEnum.Edit.ToString();//修改类型
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.article_category().Exists(this.id))
                {
                    JscriptMsg("类别不存在或已被删除!", "back", "Error");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("fenlei", MXEnums.ActionEnum.View.ToString()); //检查权限
                TreeBind(this.channel_id);                                   //绑定类别
                if (action == MXEnums.ActionEnum.Edit.ToString())            //修改
                {
                    ShowInfo(this.id);
                }
                else
                {
                    if (this.id > 0)
                    {
                        this.ddlParentId.SelectedValue = this.id.ToString();
                    }
                }
            }
        }
Esempio n. 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = MXRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == MXEnums.ActionEnum.Edit.ToString())
            {
                this.action = MXEnums.ActionEnum.Edit.ToString();//修改类型
                if (!int.TryParse(Request.QueryString["id"] as string, out this.id))
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.manager().Exists(this.id))
                {
                    JscriptMsg("记录不存在或已被删除!", "back", "Error");
                    return;
                }
            }


            if (!Page.IsPostBack)
            {
                BindDdlProvince(ddlProvince);
                BindDdlCity(ddlCity);

                ChkAdminLevel("manager_list", MXEnums.ActionEnum.View.ToString()); //检查权限
                Model.manager       model = GetAdminInfo();                        //取得管理员信息
                Model.wx_agent_info agent = aBll.GetAgentModel(model.id);
                //代理商信息
                if (agent != null)
                {
                    lblremainMony.Text = agent.remainMony.Value.ToString();
                    lblagentPrice.Text = agent.agentPrice.Value.ToString();
                    lblMoney.Text      = agent.agentPrice.Value.ToString();
                    isAgent            = true;
                }

                RoleBind(ddlRoleId, model.id);
                if (action == MXEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Esempio n. 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //取得返回参数
            string state = MXRequest.GetQueryString("state");
            string code  = MXRequest.GetQueryString("code");

            string access_token = string.Empty;
            string expires_in   = string.Empty;
            string client_id    = string.Empty;
            string openid       = string.Empty;

            if (Session["oauth_state"] == null || Session["oauth_state"].ToString() == "" || state != Session["oauth_state"].ToString())
            {
                Response.Write("出错啦,state未初始化!");
                return;
            }
            if (string.IsNullOrEmpty(code))
            {
                Response.Write("出错啦,无法获取用户授权信息!");
                return;
            }

            //第一步:获取Access Token
            Dictionary <string, object> dic = taobao_helper.get_access_token(code);

            if (dic == null || !dic.ContainsKey("access_token"))
            {
                Response.Write("出错了,无法获取Access Token,请检查App Key是否正确!");
                return;
            }

            access_token = dic["access_token"].ToString();
            expires_in   = dic["expires_in"].ToString();
            openid       = dic["taobao_user_id"].ToString();
            //储存获取数据用到的信息
            Session["oauth_name"]         = "taobao";
            Session["oauth_access_token"] = access_token;
            Session["oauth_openid"]       = openid;

            //第二步:跳转到指定页面
            //Response.Write(access_token);
            Response.Redirect(new Web.UI.BasePage().linkurl("oauth_login"));
            return;
        }
Esempio n. 26
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.manager model = GetAdminInfo(); //取得当前管理员信息
            _strWhere        = "isDelete=0 " + _strWhere;
            this.page        = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;

            Model.manager adminEntity = GetAdminInfo(); //取得当前管理员信息
            _strWhere += " and (agentId=" + adminEntity.id + " or uId=" + adminEntity.id + " )";

            DataSet ds = bll.GetUserWeiXinList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr;
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    dr = ds.Tables[0].Rows[i];
                    DateTime endDate = MyCommFun.Obj2DateTime(dr["endDate"]);
                    if (endDate < DateTime.Now)
                    {
                        dr["daoqistr"] = "<span class='guoqi'>" + endDate.ToString("yyyy-MM-dd") + "[已过期]</span>";
                    }
                    else if (endDate < DateTime.Now.AddDays(20))
                    {
                        dr["daoqistr"] = "<span class='kuaidaoqi'>" + endDate.ToString("yyyy-MM-dd") + "[需尽快充值]</span>";
                    }
                    else
                    {
                        dr["daoqistr"] = "<span class='weiguoqi'>" + endDate.ToString("yyyy-MM-dd") + "</span>";
                    }
                }
            }

            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("wxcodemgr.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 27
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = MXRequest.GetQueryInt("page", 1);
            if (this.group_id > 0)
            {
                this.ddlGroupId.SelectedValue = this.group_id.ToString();
            }
            this.txtKeywords.Text = this.keywords;
            BLL.users bll = new BLL.users();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("user_list.aspx", "group_id={0}&keywords={1}&page={2}",
                                              this.group_id.ToString(), this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.id = MXRequest.GetQueryInt("id");
     if (this.id == 0)
     {
         JscriptMsg("传输参数不正确!", "back", "Error");
         return;
     }
     if (!new BLL.orders().Exists(this.id))
     {
         JscriptMsg("记录不存在或已被删除!", "back", "Error");
         return;
     }
     if (!Page.IsPostBack)
     {
         ChkAdminLevel("order_list", MXEnums.ActionEnum.View.ToString()); //检查权限
         ShowInfo(this.id);
     }
 }
Esempio n. 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.keywords = MXRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("manager_list", MXEnums.ActionEnum.View.ToString()); //检查权限
                var model = GetAdminInfo();                                        //取得当前管理员信息
                if (model.AgentLevel > 0)
                {
                    RptBind("agentId=" + model.Id + CombSqlTxt(keywords), "add_time desc,id desc");
                }
                else
                {
                    RptBind("agentId=" + model.Id + " and agentLevel<0 " + CombSqlTxt(keywords), "add_time desc,id desc");
                }
            }
        }
Esempio n. 30
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();

            //判断是否已经设置了微留言基本信息
            BLL.wx_message_setting sbll = new BLL.wx_message_setting();
            DataSet ds_s = sbll.GetList(weixin.id);

            if (ds_s.Tables[0].Rows.Count > 0)
            {
                litwUrl.Text = MyCommFun.getWebSite() + "/weixin/message/index.aspx?wid=" + weixin.id;
            }
            else
            {
                litwUrl.Text = "设置完基本信息后,就自动生成网址";
            }

            _strWhere        = "wId=" + weixin.id + " " + _strWhere;
            this.page        = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            // DataSet ds = gbll.GetList( _strWhere);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr;

                int count = ds.Tables[0].Rows.Count;
                for (int i = 0; i < count; i++)
                {
                    dr = ds.Tables[0].Rows[i];
                }
                ds.AcceptChanges();
            }
            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("message_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }