Ejemplo n.º 1
0
    private bool DoEdit(int _id)
    {
        bool result = false;

        tbl_liuyan model = new tbl_liuyan();


        model.liuyan_title   = txttitle.Text.Trim();
        model.liuyan_memo    = txtContent.Value;
        model.liuyan_date    = DateTime.Now;
        model.liuyan_bianhao = "A00000000";
        model.liuyan_name    = "公司";
        model.liuyan_to      = txt_bianhao.Text.Trim();
        tbl_huiyuan model_hui = new tbl_huiyuan();

        model_hui.GetModel_hui_bianhao(txt_bianhao.Text.Trim());
        model.liuyan_to_name = model_hui.huiyuan_name;


        int click = 2;

        model.UpdateField(_id, "kan_flag=" + click);
        if (model.Add() > 0)
        {
            result = true;
        }

        return(result);
    }
Ejemplo n.º 2
0
    private void ShowInfo(string _id)
    {
        tbl_huiyuan model1 = new tbl_huiyuan();

        model1.GetModel_hui_id(_id);


        this.huiyuan_yinhang.SelectedValue = model1.huiyuan_yinhang;
        this.huiyuan_jiebie.SelectedValue  = model1.huiyuan_jiebie.ToString();
        this.DropDownList1.SelectedValue   = model1.huiyuan_jiebie2.ToString();
        this.bianhao.Text      = model1.huiyuan_bianhao;
        this.huiyuan_name.Text = model1.huiyuan_name;
        this.huiyuan_mob.Text  = model1.huiyuan_mob;
        //this.tjr.Text = model1.tjr_bianhao;
        this.huiyuan_pass.Text         = model1.huiyuan_pass;
        this.pass_two.Text             = model1.pass_two;
        this.huiyuan_yinhang_name.Text = model1.huiyuan_yinhang_name;
        this.huiyuan_yinhang_zh.Text   = model1.huiyuan_yinhang_zh;
        this.bank_zhi.Text             = model1.bank_zhi;
        this.huiyuan_shenfen_id.Text   = model1.huiyuan_shenfen_id;
        //this.huiyuan_qq.Text = model1.huiyuan_qq;
        //this.weixin.Text = model1.weixin;
        //this.zhifubao.Text = model1.zhifubao;
        //Image1.ImageUrl = model1.sf_pinju_src;
        //Image2.ImageUrl = model1.zl_pinju_src;
        this.born.Text    = model1.born_date;
        this.address.Text = model1.huiyuan_address;
    }
Ejemplo n.º 3
0
    private bool DoEdit(string _id)
    {
        bool         result = false;
        tbl_supplier model1 = new tbl_supplier();

        model1.GetModel(int.Parse(_id));
        model1.supplyName    = this.name.Text;
        model1.legalName     = this.legelname.Text;
        model1.legalPhone    = this.phone.Text;
        model1.supplyAddress = this.address.Text;
        //model1.supplierProfile = this.content.Value;
        //model1.email = this.email.Text;
        //model1.idCard = this.IDcard.Text;
        model1.Category    = this.category.Text;
        model1.BankName    = this.bankName.Text;
        model1.BankAddress = this.bankaderess.Text;
        model1.BankNo      = this.bankno.Text;

        if (model1.Update())
        {
            tbl_huiyuan model = new tbl_huiyuan();
            model.GetModel_hui_id(model1.huiyuan_id);
            model.supply = 2;
            model.Update();
            result = true;
        }

        return(result);
    }
Ejemplo n.º 4
0
    // 单个冻结
    protected void lbtnAcceptCaDG_Click1(object sender, EventArgs e)
    {
        // 当前点击的按钮

        this.page = AXRequest.GetQueryInt("page");

        LinkButton lb         = (LinkButton)sender;
        string     huiyuan_id = lb.CommandArgument.ToString().Split(',')[0];

        int         xinxi_flag = Convert.ToInt32(lb.CommandArgument.ToString().Split(',')[1]);
        tbl_huiyuan bll        = new tbl_huiyuan();

        bll.GetModel_hui_id(huiyuan_id);
        bll.huiyuan_id = huiyuan_id;

        if (xinxi_flag == 0)
        {
            bll.xinxi_flag = 1;
        }
        else
        {
            bll.xinxi_flag = 0;
        }
        bll.Update_fending(); //更新封顶


        mym.JscriptMsg(this.Page, " 设置成功!", Utils.CombUrlTxt("al_read3.aspx", "start_time={0}&stop_time={1}&huiyuan_jiebie={2}&note_no={3}&type={4}&page={5}", this.txtstart_time.Value, this.txtstop_time.Value, this.ddlproduct_category_id.SelectedValue, txtNote_no.Text, this.type.SelectedValue, this.page.ToString()), "Success");
    }
Ejemplo n.º 5
0
    private bool DoEdit(string _id)
    {
        bool        result = false;
        tbl_huiyuan model  = new tbl_huiyuan();

        model.GetModel_hui_id(_id);
        model.huiyuan_jiebie  = int.Parse(huiyuan_jiebie.SelectedValue);
        model.huiyuan_jiebie2 = model.huiyuan_jiebie2;
        model.huiyuan_name    = this.huiyuan_name.Text;
        // model.huiyuan_pass = this.huiyuan_pass.Text;
        // model.pass_two = this.pass_two.Text;
        model.huiyuan_yinhang      = this.huiyuan_yinhang.SelectedItem.Text;
        model.huiyuan_yinhang_zh   = this.huiyuan_yinhang_zh.Text;
        model.bank_zhi             = this.bank_zhi.Text;
        model.huiyuan_shenfen_id   = this.huiyuan_shenfen_id.Text;
        model.huiyuan_qq           = this.huiyuan_qq.Text;
        model.weixin               = this.weixin.Text;
        model.zhifubao             = this.zhifubao.Text;
        model.huiyuan_yinhang_name = this.huiyuan_yinhang_name.Text;
        model.huiyuan_mob          = this.huiyuan_mob.Text;
        if (model.Update())
        {
            result = true;
        }

        return(result);
    }
Ejemplo n.º 6
0
    private void ShowInfo(string _id)
    {
        tbl_huiyuan model1 = new tbl_huiyuan();

        model1.GetModel_hui_id(_id);


        this.huiyuan_yinhang.SelectedValue = model1.huiyuan_yinhang;
        this.huiyuan_jiebie.SelectedValue  = model1.huiyuan_jiebie.ToString();
        this.bianhao.Text      = model1.huiyuan_bianhao;
        this.huiyuan_name.Text = model1.huiyuan_name;
        this.huiyuan_mob.Text  = model1.huiyuan_mob;
        //this.tjr.Text = model1.tjr_bianhao;
        this.huiyuan_pass.Text         = model1.huiyuan_pass;
        this.pass_two.Text             = model1.pass_two;
        this.huiyuan_yinhang_name.Text = model1.huiyuan_yinhang_name;
        this.huiyuan_yinhang_zh.Text   = model1.huiyuan_yinhang_zh;
        this.bank_zhi.Text             = model1.bank_zhi;
        this.huiyuan_shenfen_id.Text   = model1.huiyuan_shenfen_id;
        this.huiyuan_qq.Text           = model1.huiyuan_qq;
        this.weixin.Text   = model1.weixin;
        this.zhifubao.Text = model1.zhifubao;
        //Image1.ImageUrl = model1.sf_pinju_src;
        //Image2.ImageUrl = model1.zl_pinju_src;
        this.born.Text    = model1.born_date;
        this.address.Text = model1.huiyuan_address;
        //this.qiquan_txt.Text = decimal.Parse(model1.chongfu_kechu.ToString()).ToString("n2");
    }
Ejemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string code  = RequestEx.TryGetQueryString("code");
        string state = RequestEx.TryGetQueryString("state");

        if (!string.IsNullOrWhiteSpace(code))
        {
            string  url       = string.Format("https://api.weixin.qq.com/sns/oauth2/access_token?appid={0}&secret={1}&code={2}&grant_type=authorization_code", "wxdcf5fba0c0a88064", "5a32d0d24faedfa9a6070639f3a59f03", code);
            string  result    = HttpClientHelper.GetResponse(url);
            JObject outputObj = JObject.Parse(result);

            //微信认证部分:第四步 获得更多信息
            //string accesstoken = outputObj["access_token"].ToString();
            openid = outputObj["openid"].ToString();
        }
        if (openid != "")
        {
            tbl_huiyuan huiyuan_1 = new tbl_huiyuan();
            huiyuan_1.GetModel_hui_beizhu(openid);
            string  dizhi      = getPerpetualQR(huiyuan_1.flag_1.ToString());
            JObject outputObj1 = JObject.Parse(dizhi);//将json转为数组
            this.imgQrCode.ImageUrl = QrCode.GetUrl(outputObj1["ticket"].ToString());
        }
        //this.Label1.Text = openid;
        //this.Label2.Text = outputObj1["url"].ToString();
    }
Ejemplo n.º 8
0
    public override void ProcessNotify()
    {
        WxPayData notifyData = GetNotifyData();

        //检查支付结果中transaction_id是否存在
        if (!notifyData.IsSet("transaction_id"))
        {
            //若transaction_id不存在,则立即返回结果给微信支付后台
            WxPayData res = new WxPayData();
            res.SetValue("return_code", "FAIL");
            res.SetValue("return_msg", "支付结果中微信订单号不存在");
            Log.Error(this.GetType().ToString(), "The Pay result is error : " + res.ToXml());
            page.Response.Write(res.ToXml());
            page.Response.End();
        }

        string transaction_id = notifyData.GetValue("transaction_id").ToString();
        string out_trade_no   = notifyData.GetValue("out_trade_no").ToString();

        //查询订单,判断订单真实性
        if (!QueryOrder(transaction_id))
        {
            //若订单查询失败,则立即返回结果给微信支付后台
            WxPayData res = new WxPayData();
            res.SetValue("return_code", "FAIL");
            res.SetValue("return_msg", "订单查询失败");
            Log.Error(this.GetType().ToString(), "Order query failure : " + res.ToXml());
            page.Response.Write(res.ToXml());
            page.Response.End();
        }
        //查询订单成功
        else
        {
            WxPayData res = new WxPayData();
            res.SetValue("return_code", "SUCCESS");
            res.SetValue("return_msg", "OK");
            tbl_canshu canshu = new tbl_canshu();
            canshu.GetModel(1);
            canshu.canshu_gonggao = out_trade_no;
            canshu.sys_name       = transaction_id;
            canshu.Update();
            tbl_orders orders = new tbl_orders();
            orders.GetModel(out_trade_no);
            tbl_huiyuan huiyuan = new tbl_huiyuan();
            huiyuan.GetModel_hui_bianhao(orders.user_bianhao);
            huiyuan.huiyuan_jiebie = 1;
            huiyuan.Update();
            int id = orders.id;
            if (orders.payment_status != 2)
            {
                orders.payment_status = 2;
                orders.Update();
                DbHelperSQL.ExecuteSql("exec sp_zhixing '" + orders.user_id + "'," + orders.order_amount + "");
                DbHelperSQL.ExecuteSql("exec sp_jiangjin_4 '" + orders.user_id + "'");
            }
        }
    }
Ejemplo n.º 9
0
    private void ShowInfo(string _id)
    {
        tbl_huiyuan model = new tbl_huiyuan();

        model.GetModel_hui_id(_id);

        txttitle.Text     = model.huiyuan_bianhao;
        txttitle.ReadOnly = true;
    }
Ejemplo n.º 10
0
    private bool DoEdit(string _id)
    {
        bool        result = false;
        tbl_huiyuan model  = new tbl_huiyuan();

        model.GetModel_hui_id(_id);
        int net_hege = int.Parse(model.net_hege.ToString());

        if (net_hege == 1)
        {
            mym.JscriptMsg(this.Page, "会员已经开通!请不要重复操作", "", "Error");
            return(false);
        }
        model.GetModel_hui_id(_id);
        model.huiyuan_jiebie       = int.Parse(huiyuan_jiebie.SelectedValue);
        model.huiyuan_name         = this.huiyuan_name.Text;
        model.huiyuan_pass         = this.huiyuan_pass.Text;
        model.pass_two             = this.pass_two.Text;
        model.huiyuan_yinhang      = this.huiyuan_yinhang.SelectedItem.Text;
        model.huiyuan_yinhang_zh   = this.huiyuan_yinhang_zh.Text;
        model.bank_zhi             = this.bank_zhi.Text;
        model.huiyuan_shenfen_id   = this.huiyuan_shenfen_id.Text;
        model.huiyuan_qq           = this.huiyuan_qq.Text;
        model.weixin               = this.weixin.Text;
        model.zhifubao             = this.zhifubao.Text;
        model.huiyuan_yinhang_name = this.huiyuan_yinhang_name.Text;
        model.huiyuan_mob          = this.huiyuan_mob.Text;
        //decimal moneybefore = decimal.Parse((model.chongfu_money).ToString());//改变前余额
        if (model.Update())
        {
            int i = DbHelperSQL.ExecuteSql("exec sp_kaitong_huiyuan '" + id + "','A00000000'");
            result = true;
            //if (model.huiyuan_jiebie == 1)
            //    model.chongfu_money = 750;
            //else if (model.huiyuan_jiebie == 2)
            //    model.chongfu_money = 4000;
            //else if (model.huiyuan_jiebie == 3)
            //    model.chongfu_money = 10000;
            //else if (model.huiyuan_jiebie == 4)
            //    model.chongfu_money = 30000;
            //string memo = "管理员开通会员" + model.huiyuan_bianhao + "赠送" + model.chongfu_money + "元代金券";
            //decimal? moneyafter = moneybefore + model.chongfu_money;//改变后余额
            //mym.queren_insert(model.huiyuan_id, model.huiyuan_bianhao, "代金券", memo, Convert.ToDecimal(model.chongfu_money), Convert.ToDecimal(moneyafter));
            //model.net_hege = 1;
            //model.Update();
        }

        return(result);
    }
Ejemplo n.º 11
0
    // 单个删除
    protected void delete_Click1(object sender, EventArgs e)
    {
        // 当前点击的按钮

        this.page = AXRequest.GetQueryInt("page");

        LinkButton lb         = (LinkButton)sender;
        string     huiyuan_id = lb.CommandArgument.ToString();


        tbl_huiyuan bll = new tbl_huiyuan();

        if (!bll.show_is_jd(huiyuan_id) || !bll.show_is_tj(huiyuan_id))
        {
            mym.JscriptMsg(this.Page, "不能删除!下面已有消费者注册", "", "Error");
            return;
        }
        bll.GetModel_hui_id(huiyuan_id);
        bll.huiyuan_id = huiyuan_id;



        bll.Delete(huiyuan_id);//触发器删除

        tbl_shangshu ssbll = new tbl_shangshu();

        ssbll.huiyuan_id = huiyuan_id;

        ssbll.Delete(huiyuan_id);


        tbl_shangshu2 ss2bll = new tbl_shangshu2();

        ss2bll.huiyuan_id = huiyuan_id;

        ss2bll.Delete(huiyuan_id);

        tbl_xiaofei xfbll = new tbl_xiaofei();

        xfbll.xiaofei_hui_id = huiyuan_id;

        xfbll.Delete_xiaofei_hui_id(huiyuan_id);
        tbl_orders orders = new tbl_orders();

        orders.user_id = huiyuan_id;
        orders.Delete_orders(huiyuan_id);

        mym.JscriptMsg(this.Page, " 删除成功!", Utils.CombUrlTxt("al_read1.aspx", "start_time={0}&stop_time={1}&huiyuan_jiebie={2}&note_no={3}&type={4}&page={5}", this.txtstart_time.Value, this.txtstop_time.Value, this.ddlproduct_category_id.SelectedValue, txtNote_no.Text, this.type.SelectedValue, this.page.ToString()), "Success");
    }
Ejemplo n.º 12
0
    private void RptBind(string _strWhere, string _orderby)
    {
        this.page = AXRequest.GetQueryInt("page", 1);

        tbl_huiyuan bll = new tbl_huiyuan();

        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("show.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

        PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Ejemplo n.º 13
0
    protected void imbnQuery_Click(object sender, EventArgs e)
    {
        tbl_huiyuan bll = new tbl_huiyuan();

        if (!bll.Exists_hui_bianhao(this.txtKeywords.Text.Trim()))
        {
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "alert('无此会员编号,请重新输入!');", true);
            return;
        }
        else
        {
            bianhao = this.txtKeywords.Text.Trim();

            ShowDataUser(bianhao);
        }
    }
Ejemplo n.º 14
0
    private void ShowInfo(int _id)
    {
        model.GetModel(_id);
        //绑定商品列表
        tbl_order_goods bll = new tbl_order_goods();
        string          sql = " order_id =" + _id;

        DataTable dt = bll.GetList(sql).Tables[0];

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

        //获得商家信息
        if (model.user_id != null)
        {
            tbl_huiyuan user_info = new tbl_huiyuan();
            user_info.GetModel_hui_id(model.user_id);
            user_name.Text       = model.user_bianhao;
            title.Text           = model.user_bianhao;
            contact_address.Text = model.address;
            contact_name.Text    = model.shouhuo_name;
            contact_tel.Text     = model.phone;
            wuliu_company.Text   = model.wuliu_company;
            wuliu_no.Text        = model.wuliu_no;
        }
        //根据订单状态,显示各类操作按钮
        switch (model.status)
        {
        case 1:     //订单为已生成状态
            //确认订单、取消订单显示
            btnConfirm.Visible = btnCancel.Visible = true;
            //修改订单备注、调价按钮显示
            btnEditRemark.Visible = btnEditPaymentFee.Visible = true;
            break;

        case 2:     //如果订单为已确认状态
            //完成显示
            btnComplete.Visible = true;
            //修改订单备注按钮可见
            btnEditRemark.Visible = true;
            break;
        }
        this.zf_type.Text    = zhifu_type(model.payment_id);
        this.contact_ly.Text = model.message;
    }
Ejemplo n.º 15
0
    // 单个确认
    protected void queren_click(object sender, EventArgs e)
    {
        // 当前点击的按钮
        LinkButton lb   = (LinkButton)sender;
        string     caId = lb.CommandArgument;

        tbl_huiyuan bll = new tbl_huiyuan();

        bll.GetModel_hui_id(caId);
        string title = bll.huiyuan_bianhao;

        bll.huiyuan_id          = caId;
        bll.huiyuan_zhuanmai_sq = 1;
        bll.huiyuan_zhuanmai    = 1;
        bll.Update_service_centre();

        mym.JscriptMsg(this.Page, " 确认成功(账号):" + title + "的服务中心资格!", Utils.CombUrlTxt("Service_Centre_un.aspx", "huiyuan_jiebie={0}&note_no={1}&type={2}", this.ddlproduct_category_id.SelectedValue, txtNote_no.Text, this.type.SelectedValue), "Success");
    }
Ejemplo n.º 16
0
    private void Login(string _id)
    {
        tbl_huiyuan model1 = new tbl_huiyuan();

        model1.GetModel_hui_id(_id);
        //填写逻辑过程登录会员系统
        Session["hy_id1"]      = model1.huiyuan_id;
        Session["hy_bianhao1"] = model1.huiyuan_bianhao;
        Session["hy_name1"]    = model1.huiyuan_name;
        Session["hy_zm1"]      = model1.huiyuan_zhuanmai;
        Session["hy_jiebie1"]  = model1.huiyuan_jiebie;
        Session["zhongyao1"]   = 1;
        ShopCart.Clear("0");

        //填写逻辑过程登录会员系统结束

        Response.Redirect("../../huiyuan/index.aspx");
    }
Ejemplo n.º 17
0
    protected string zhifu_type1(int?_id)
    {
        string  xiaofeimoney;
        string  xiaofeimoney1;
        DataRow dr = DbHelperSQL.GetDataRow("select aa=isnull(xiaofei_zhuanmai,0) from tbl_xiaofei where xiaofei_qr_flag=1 and xiaofei_flag_jiezhang=" + _id + "");

        if (dr != null)
        {
            xiaofeimoney1 = dr["aa"].ToString();//放置人huiyuan_id
            tbl_huiyuan huiyuan = new tbl_huiyuan();
            huiyuan.GetModel_hui_id(xiaofeimoney1);
            xiaofeimoney = huiyuan.huiyuan_bianhao;
        }
        else
        {
            xiaofeimoney = "";
        }
        return(xiaofeimoney);
    }
Ejemplo n.º 18
0
    private bool DoDelete(string _id)
    {
        bool         result = false;
        string       hui_id = null;
        tbl_supplier model1 = new tbl_supplier();

        model1.GetModel(int.Parse(_id));
        hui_id = model1.huiyuan_id;
        if (model1.Delete(int.Parse(_id)))
        {
            tbl_huiyuan model = new tbl_huiyuan();
            model.GetModel_hui_id(hui_id);
            model.supply = 0;
            model.Update();
            result = true;
        }

        return(result);
    }
Ejemplo n.º 19
0
    protected void lbtnAcceptCaDG_Click2(object sender, EventArgs e)
    {
        this.page = AXRequest.GetQueryInt("page");
        LinkButton lb = (LinkButton)sender;

        string  KindID    = lb.CommandArgument.ToString().Split(',')[0];
        int     itemIndex = Convert.ToInt32(lb.CommandArgument.ToString().Split(',')[1]);
        TextBox TextBox1  = this.rptList.Items[itemIndex].FindControl("TextBox2") as TextBox;
        string  money     = TextBox1.Text.Trim();
        Decimal dec;

        if (!Decimal.TryParse(money, out dec))
        {
            mym.JscriptMsg(this.Page, "您输入的数字不正确,请重新输入!", "", "Error");
            return;
        }


        tbl_huiyuan model = new tbl_huiyuan();

        model.GetModel_hui_id(KindID);
        model.huiyuan_id = KindID;

        string huiyuan_bianhao = model.huiyuan_bianhao;                  //会员编号

        decimal moneybefore = decimal.Parse(model.glf_money.ToString()); //改变前余额

        decimal moneyafter = moneybefore + decimal.Parse(money);         //改变后余额
        string  memo       = "管理员为会员" + huiyuan_bianhao + "修改" + Decimal.Parse(money) + "分红奖";

        model.glf_money = Decimal.Parse(money);
        model.Update_glf_money();



        mym.queren_insert(KindID, huiyuan_bianhao, "修改分红奖", memo, Decimal.Parse(money), moneyafter);


        this.page = AXRequest.GetQueryInt("page");

        mym.JscriptMsg(this.Page, " 修改成功!", Utils.CombUrlTxt("al_read2.aspx", "start_time={0}&stop_time={1}&huiyuan_jiebie={2}&note_no={3}&type={4}&page={5}", this.txtstart_time.Value, this.txtstop_time.Value, this.ddlproduct_category_id.SelectedValue, txtNote_no.Text, this.type.SelectedValue, this.page.ToString()), "Success");
    }
Ejemplo n.º 20
0
    //更新
    #region 修改操作=================================
    private bool DoEdit(string _id)
    {
        bool result = false;

        tbl_huiyuan model = new tbl_huiyuan();

        model.GetModel_hui_id(_id);
        model.zhuanmai_jb = int.Parse(jb.SelectedValue);
        // model.huiyuan_zm_diqu = Province.Text.Trim();



        if (model.Update())
        {
            // mym.AddAdminLog("修改", "修改商品类别:" + txttitle.Text); //记录日志
            result = true;
        }

        return(result);
    }
Ejemplo n.º 21
0
    private bool DoEdit(string _id)
    {
        bool        result = false;
        tbl_huiyuan model  = new tbl_huiyuan();

        model.GetModel_hui_id(_id);
        model.huiyuan_jiebie = int.Parse(huiyuan_jiebie.SelectedValue);
        if (int.Parse(DropDownList1.SelectedValue) == 0)
        {
            model.huiyuan_jiebie1 = 0;
            model.huiyuan_jiebie2 = int.Parse(DropDownList1.SelectedValue);
            model.koushui_flag    = 0;
        }
        else
        {
            model.huiyuan_jiebie1 = 1;
            model.huiyuan_jiebie2 = int.Parse(DropDownList1.SelectedValue);
            model.koushui_flag    = 1;
            //DbHelperSQL.ExecuteSql("update tbl_orders set flag_1=1 where payment_status=2 AND flag_1=0");
        }
        model.huiyuan_name       = this.huiyuan_name.Text;
        model.huiyuan_pass       = this.huiyuan_pass.Text;
        model.pass_two           = this.pass_two.Text;
        model.huiyuan_yinhang    = this.huiyuan_yinhang.SelectedItem.Text;
        model.huiyuan_yinhang_zh = this.huiyuan_yinhang_zh.Text;
        model.bank_zhi           = this.bank_zhi.Text;
        model.huiyuan_shenfen_id = this.huiyuan_shenfen_id.Text;
        //model.huiyuan_qq = this.huiyuan_qq.Text;
        //model.weixin = this.weixin.Text;
        //model.zhifubao = this.zhifubao.Text;
        model.huiyuan_address      = this.address.Text;
        model.huiyuan_yinhang_name = this.huiyuan_yinhang_name.Text;
        model.huiyuan_mob          = this.huiyuan_mob.Text;
        if (model.Update())
        {
            result = true;
        }

        return(result);
    }
Ejemplo n.º 22
0
    // 单个空单开通
    protected void kd_kaitong(object sender, EventArgs e)
    {
        // 当前点击的按钮

        this.page = AXRequest.GetQueryInt("page");

        LinkButton lb         = (LinkButton)sender;
        string     huiyuan_id = lb.CommandArgument.ToString();


        tbl_huiyuan bll = new tbl_huiyuan();

        bll.GetModel_hui_id(huiyuan_id);

        int net_hege = int.Parse(bll.net_hege.ToString());

        if (net_hege == 1)
        {
            mym.JscriptMsg(this.Page, "会员已经开通!请不要重复操作", "", "Error");
            return;
        }

        bll.net_hege        = 1;
        bll.kd_flag         = 1;
        bll.huiyuan_qr_date = DateTime.Now;
        bll.Update();


        //tbl_orders orders = new tbl_orders();
        //orders.user_id = huiyuan_id;
        //orders.Delete_orders(huiyuan_id);

        //tbl_xiaofei xf_bll = new tbl_xiaofei();
        //xf_bll.xiaofei_hui_id = huiyuan_id;
        //xf_bll.Delete_xiaofei_hui_id(huiyuan_id);
        int i = DbHelperSQL.ExecuteSql("exec sp_kongdan_huiyuan '" + huiyuan_id + "'");


        mym.JscriptMsg(this.Page, " 激活成功!", Utils.CombUrlTxt("al_read1.aspx", "start_time={0}&stop_time={1}&huiyuan_jiebie={2}&note_no={3}&type={4}&page={5}", this.txtstart_time.Value, this.txtstop_time.Value, this.ddlproduct_category_id.SelectedValue, txtNote_no.Text, this.type.SelectedValue, this.page.ToString()), "Success");
    }
Ejemplo n.º 23
0
    private bool DoAdd()
    {
        // Response.Write(District.SelectedValue);
        // Response.End();
        tbl_huiyuan model = new tbl_huiyuan();

        model.GetModel_hui_bianhao(this.txttitle.Text.Trim());
        model.huiyuan_zhuanmai_sq = 1;
        //model.huiyuan_zm_diqu = Province.Text.Trim();

        model.huiyuan_zm_sq_time = DateTime.Now;
        model.huiyuan_id         = model.huiyuan_id;
        model.zhuanmai_jb        = int.Parse(jb.SelectedValue);

        if (model.Update())
        {
            // mym.AddAdminLog("增加", "添加商品类别:" + txttitle.Text); //记录日志
            return(true);
        }

        return(false);
    }
Ejemplo n.º 24
0
    private bool DoAdd()
    {
        tbl_liuyan model = new tbl_liuyan();

        model.liuyan_title   = txttitle.Text.Trim();
        model.liuyan_memo    = txtContent.Value;
        model.liuyan_date    = DateTime.Now;
        model.liuyan_bianhao = "A00000000";
        model.liuyan_name    = "公司";
        model.liuyan_to      = txt_bianhao.Text.Trim();

        tbl_huiyuan model_hui = new tbl_huiyuan();

        model_hui.GetModel_hui_bianhao(txt_bianhao.Text.Trim());
        model.liuyan_to_name = model_hui.huiyuan_name;
        if (model.Add() > 0)
        {
            return(true);
        }

        return(false);
    }
Ejemplo n.º 25
0
    private void ShowInfo(string _order_no)
    {
        model.GetModel(_order_no);

        tbl_order_goods bll = new tbl_order_goods();
        string          sql = " order_id =" + model.id;
        DataTable       dt  = bll.GetList(sql).Tables[0];

        this.rptList.DataSource = dt;
        this.rptList.DataBind();
        //获得商家信息
        //获得商家信息
        if (model.user_id != null)
        {
            tbl_huiyuan user_info = new tbl_huiyuan();
            user_info.GetModel_hui_id(model.user_id);

            title.Text           = model.user_bianhao;
            contact_address.Text = model.address;
            contact_name.Text    = model.shouhuo_name;
            contact_tel.Text     = model.phone;
        }
    }
Ejemplo n.º 26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string code  = RequestEx.TryGetQueryString("code");
        string state = RequestEx.TryGetQueryString("state");

        if (!string.IsNullOrWhiteSpace(code))
        {
            string  url       = string.Format("https://api.weixin.qq.com/sns/oauth2/access_token?appid={0}&secret={1}&code={2}&grant_type=authorization_code", "wxdcf5fba0c0a88064", "5a32d0d24faedfa9a6070639f3a59f03", code);
            string  result    = HttpClientHelper.GetResponse(url);
            JObject outputObj = JObject.Parse(result);

            //微信认证部分:第四步 获得更多信息
            //string accesstoken = outputObj["access_token"].ToString();
            openid = outputObj["openid"].ToString();
        }
        tbl_huiyuan model1 = new tbl_huiyuan();

        model1.GetModel_hui_beizhu(openid);
        if (model1.huiyuan_id != null)
        {
            //填写逻辑过程登录会员系统
            Session["hy_id1"]            = model1.huiyuan_id;
            Session["hy_bianhao1"]       = model1.huiyuan_bianhao;
            Session["hy_name1"]          = model1.huiyuan_name;
            Session["hy_zm1"]            = model1.huiyuan_zhuanmai;
            Session["hy_jiebie1"]        = model1.huiyuan_jiebie;
            Session["huiyuan_zhuanmai1"] = model1.huiyuan_zhuanmai;
            Session["flag4"]             = model1.flag_4;
            Session["zhongyao1"]         = 1;
            ShopCart.Clear("0");
            //填写逻辑过程登录会员系统结束

            Response.Redirect("/shop/index.aspx");
            //this.Label1.Text = openid;
            //this.Label2.Text = outputObj1["url"].ToString();
        }
    }
Ejemplo n.º 27
0
    private void Login(string _id)
    {
        tbl_canshu canshu = new tbl_canshu();

        canshu.GetModel(1);
        Session["tikuan"] = canshu.reg_shoping.ToString();
        tbl_huiyuan model1 = new tbl_huiyuan();

        model1.GetModel_hui_id(_id);
        //填写逻辑过程登录会员系统
        Session["hy_id1"]            = model1.huiyuan_id;
        Session["hy_bianhao1"]       = model1.huiyuan_bianhao;
        Session["hy_name1"]          = model1.huiyuan_name;
        Session["hy_zm1"]            = model1.huiyuan_zhuanmai;
        Session["hy_jiebie1"]        = model1.huiyuan_jiebie;
        Session["huiyuan_zhuanmai1"] = model1.huiyuan_zhuanmai;
        Session["flag4"]             = model1.flag_4;
        Session["zhongyao1"]         = 1;
        ShopCart.Clear("0");

        //填写逻辑过程登录会员系统结束

        Response.Redirect("../../shop/member_center.aspx");
    }
Ejemplo n.º 28
0
    protected void ibtnLogin_Click(object sender, EventArgs e)
    {
        TextBox txtname = (TextBox)((MasterPage)Master).FindControl("txtUserName");
        TextBox txtpwd  = (TextBox)((MasterPage)Master).FindControl("txtPassword");
        TextBox Txtcode = (TextBox)((MasterPage)Master).FindControl("Txtcode");

        if (Txtcode.Text == "")
        {
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "alert('您未输入验证码。');", true);
            //lblTip.Text = "您输入的验证码不正确,请重新输入。";
            return;
        }

        if (Session["serverCode"] == null)
        {
            Response.Write("<script language=javascript>alert('验证码失效,刷新页面!');location.href='index.aspx';</script>");
            Response.End();
        }
        string sVCode = Session["serverCode"].ToString();

        if (txtname.Text == "")
        {
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "alert('请输入用户名。');", true);
            //lblTip.Text = "您输入的验证码不正确,请重新输入。";
            return;
        }
        if (txtpwd.Text == "")
        {
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "alert('请输入密码。');", true);
            //lblTip.Text = "您输入的验证码不正确,请重新输入。";
            return;
        }
        if (Txtcode.Text != sVCode)
        {
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "alert('您输入的验证码不正确,请重新输入。');", true);
            //lblTip.Text = "您输入的验证码不正确,请重新输入。";
            return;
        }

        string sUserName = Utils.Filter(txtname.Text.Trim());

        string sPassWord = Utils.Filter(txtpwd.Text.Trim());

        if (tbl_huiyuan.Existshui(sUserName, sPassWord) || tbl_huiyuan.Exists(sUserName, sPassWord))
        {
            if (tbl_huiyuan.Existshui(sUserName, sPassWord))
            {
                tbl_huiyuan model1 = new tbl_huiyuan();
                model1.GetModel_hui_mob(sUserName);
                Session["hy_id1"]      = model1.huiyuan_id;
                Session["hy_bianhao1"] = model1.huiyuan_bianhao;
                Session["hy_name1"]    = model1.huiyuan_name;
                Session["hy_zm1"]      = model1.huiyuan_zhuanmai;
                Session["hy_jiebie1"]  = model1.huiyuan_jiebie;
                //Session["zhongyao1"] = 1;

                //写入登录日志
                tbl_login login_log = new tbl_login();
                login_log.huiyuan_bianhao = sUserName;
                login_log.huiyuan_name    = model1.huiyuan_name;
                login_log.login_date      = DateTime.Now;
                login_log.login_flag      = 2;
                login_log.huiyuan_ip      = AXRequest.GetIP();
                login_log.Add();
            }

            if (tbl_huiyuan.Exists(sUserName, sPassWord))
            {
                tbl_huiyuan model1 = new tbl_huiyuan();
                model1.GetModel_hui_bianhao(sUserName);
                Session["hy_id1"]      = model1.huiyuan_id;
                Session["hy_bianhao1"] = model1.huiyuan_bianhao;
                Session["hy_name1"]    = model1.huiyuan_name;
                Session["hy_zm1"]      = model1.huiyuan_zhuanmai;
                Session["hy_jiebie1"]  = model1.huiyuan_jiebie;
                //Session["zhongyao1"] = 1;

                //写入登录日志
                tbl_login login_log = new tbl_login();
                login_log.huiyuan_bianhao = sUserName;
                login_log.huiyuan_name    = model1.huiyuan_name;
                login_log.login_date      = DateTime.Now;
                login_log.login_flag      = 2;
                login_log.huiyuan_ip      = AXRequest.GetIP();
                login_log.Add();
            }



            Utils.WriteCookie("ps_cookie_shopping_cart", "AoXiang", -14400);
            Response.Redirect("huiyuan/index.aspx");
            return;
        }
        else
        {
            Response.Write("<script language=javascript>alert('账号或密码有误或被冻结,请重试!');location.href='login.aspx';</script>");
            Response.End();
        }
    }
Ejemplo n.º 29
0
    protected void ShowDataUser(string UserName)
    {
        tbl_huiyuan bll = new tbl_huiyuan();

        bll.GetModel_hui_bianhao(UserName);
        // string templateStr = "<table class='DataUser_liTable'><tr><td><a href='{Cyly:Url}' style='color:;'>{Cyly:UserName}</a></td></tr></table>";



        string templateStr = "<table cellspacing='0' cellpadding='0' border='1'  align='center' style=' margin:0 auto; width:100px;background-color:#c0dbf3;border:1px solid #295594;'>";

        templateStr += "  <tr><td colspan=3 style='background-color:#00ff00;'><a href='{Cyly:Url}'>{Cyly:UserName}</a><br /></td></tr>";
        templateStr += "  <tr><td colspan=3 style='background-color:#00ff00;'><a href='{Cyly:Url}'>{Cyly:true_name}</a><br /></td></tr>";
        templateStr += "  <tr><td colspan=3 style='background-color:#00ff00;'><a href='{Cyly:Url}'>{Cyly:jiebie}</a><br /></td></tr>";
        templateStr += "  <tr><td style='background-color:#00ff00;'><a href='{Cyly:Url}'>{Cyly:zuo_zong}</a> </td><td style='background-color:#00ff00;'>总</td><td style='background-color:#00ff00;'><a href='{Cyly:Url}'>{Cyly:you_zong}</a> </td></tr>";
        templateStr += "  <tr><td style='background-color:#00ff00;'><a href='{Cyly:Url}'>{Cyly:zuo_yu}</a> </td><td style='background-color:#00ff00;'>余</td><td style='background-color:#00ff00;'><a href='{Cyly:Url}'>{Cyly:you_yu}</a> </td></tr>";
        templateStr += "  <tr><td colspan=3 style='background-color:#33b5e5;'><a href='{Cyly:Url1}'>返回上一级</a><br /></td></tr>";
        templateStr += "   </table>";



        //第一层
        string tempStr = templateStr;

        tempStr = tempStr.Replace("{Cyly:UserName}", UserName);

        tempStr = tempStr.Replace("{Cyly:zuo_zong}", double.Parse(bll.zuo_zong.ToString()).ToString());
        tempStr = tempStr.Replace("{Cyly:you_zong}", double.Parse(bll.you_zong.ToString()).ToString());
        tempStr = tempStr.Replace("{Cyly:zuo_yu}", double.Parse((bll.zuo_zong - bll.huiyuan_pen_zuo).ToString()).ToString());
        tempStr = tempStr.Replace("{Cyly:you_yu}", double.Parse((bll.you_zong - bll.huiyuan_pen_you).ToString()).ToString());
        tempStr = tempStr.Replace("{Cyly:true_name}", bll.huiyuan_name);
        tempStr = tempStr.Replace("{Cyly:jiebie}", new tbl_reg_jiebie().GetTitle(Convert.ToInt32(bll.huiyuan_jiebie)));
        tempStr = tempStr.Replace("{Cyly:Url}", "?bianhao=" + UserName);
        tempStr = tempStr.Replace("{Cyly:Url1}", "?bianhao=" + new tbl_huiyuan().Getbianhao(bll.huiyuan_jiedian));
        if (bll.net_hege == 0)
        {
            tempStr = tempStr.Replace("background-color:#00ff00;", "background-color:#eea0a1;");
        }
        if (bll.huiyuan_zhuanmai == 1)
        {
            tempStr = tempStr.Replace("background-color:#00ff00;", "background-color:#F9F900;");
        }


        this.table_leval_1.InnerHtml = tempStr;
        //第二层
        //DataRow[] dsv = dt.Select("jd_bianhao='" + UserName + "'", "zuoyou asc");

        string Listr1 = "";
        string Listr2 = "";

        for (int i = 0; i < 2; i++)
        {
            tempStr = templateStr;
            int mm = i + 1;

            tbl_huiyuan bll2 = new tbl_huiyuan();
            bll2.GetModel_jiedian(bll.huiyuan_id, mm);

            if (bll2.huiyuan_id != null)
            {
                tempStr = tempStr.Replace("{Cyly:UserName}", bll2.huiyuan_bianhao);

                tempStr = tempStr.Replace("{Cyly:zuo_zong}", double.Parse(bll2.zuo_zong.ToString()).ToString());
                tempStr = tempStr.Replace("{Cyly:you_zong}", double.Parse(bll2.you_zong.ToString()).ToString());
                tempStr = tempStr.Replace("{Cyly:zuo_yu}", double.Parse((bll2.zuo_zong - bll2.huiyuan_pen_zuo).ToString()).ToString());
                tempStr = tempStr.Replace("{Cyly:you_yu}", double.Parse((bll2.you_zong - bll2.huiyuan_pen_you).ToString()).ToString());
                tempStr = tempStr.Replace("{Cyly:true_name}", bll2.huiyuan_name);
                tempStr = tempStr.Replace("{Cyly:jiebie}", new tbl_reg_jiebie().GetTitle(Convert.ToInt32(bll2.huiyuan_jiebie)));
                tempStr = tempStr.Replace("{Cyly:Url}", "?bianhao=" + bll2.huiyuan_bianhao);
                tempStr = tempStr.Replace("{Cyly:Url1}", "?bianhao=" + new tbl_huiyuan().Getbianhao(bll2.huiyuan_shang_id));
                if (bll2.net_hege == 0)
                {
                    tempStr = tempStr.Replace("background-color:#00ff00;", "background-color:#eea0a1;");
                }
                if (bll2.huiyuan_zhuanmai == 1)
                {
                    tempStr = tempStr.Replace("background-color:#00ff00;", "background-color:#F9F900;");
                }

                Listr1 += "<td colspan=2>" + tempStr + "</td>";
                //DataRow[] dsz = dt.Select("jd_bianhao='" + dr["huiyuan_bianhao"].ToString() + "'");

                for (int j = 0; j < 2; j++)
                {
                    tempStr = templateStr;
                    int nn = j + 1;

                    tbl_huiyuan bll3 = new tbl_huiyuan();
                    bll3.GetModel_jiedian(bll2.huiyuan_id, nn);



                    if (bll3.huiyuan_id != null)
                    {
                        tempStr = tempStr.Replace("{Cyly:UserName}", bll3.huiyuan_bianhao);

                        tempStr = tempStr.Replace("{Cyly:zuo_zong}", double.Parse(bll3.zuo_zong.ToString()).ToString());
                        tempStr = tempStr.Replace("{Cyly:you_zong}", double.Parse(bll3.you_zong.ToString()).ToString());
                        tempStr = tempStr.Replace("{Cyly:zuo_yu}", double.Parse((bll3.zuo_zong - bll3.huiyuan_pen_zuo).ToString()).ToString());
                        tempStr = tempStr.Replace("{Cyly:you_yu}", double.Parse((bll3.you_zong - bll3.huiyuan_pen_you).ToString()).ToString());
                        tempStr = tempStr.Replace("{Cyly:true_name}", bll3.huiyuan_name);
                        tempStr = tempStr.Replace("{Cyly:jiebie}", new tbl_reg_jiebie().GetTitle(Convert.ToInt32(bll3.huiyuan_jiebie)));
                        tempStr = tempStr.Replace("{Cyly:Url}", "?bianhao=" + bll3.huiyuan_bianhao);
                        tempStr = tempStr.Replace("{Cyly:Url1}", "?bianhao=" + new tbl_huiyuan().Getbianhao(bll3.huiyuan_shang_id));
                        if (bll3.net_hege == 0)
                        {
                            tempStr = tempStr.Replace("background-color:#00ff00;", "background-color:#eea0a1;");
                        }
                        if (bll3.huiyuan_zhuanmai == 1)
                        {
                            tempStr = tempStr.Replace("background-color:#00ff00;", "background-color:#F9F900;");
                        }
                    }
                    else
                    {
                        tempStr = tempStr.Replace("{Cyly:UserName}", "注册");
                        tempStr = tempStr.Replace("{Cyly:true_name}", "");
                        tempStr = tempStr.Replace("{Cyly:zuo_zong}", "");
                        tempStr = tempStr.Replace("{Cyly:you_zong}", "");
                        tempStr = tempStr.Replace("{Cyly:zuo_yu}", "");
                        tempStr = tempStr.Replace("{Cyly:you_yu}", "");
                        tempStr = tempStr.Replace("{Cyly:jiebie}", "");
                        tempStr = tempStr.Replace("{Cyly:Url}", "../../reg/reg.aspx?jd_bianhao=" + bll2.huiyuan_bianhao.ToString().Trim() + "&zuoyou=" + nn + "");
                    }
                    Listr2 += "<td><div style='margin:2px;'>" + tempStr + "</div></td>";
                }
            }
            else
            {
                tempStr = tempStr.Replace("{Cyly:UserName}", "注册");
                tempStr = tempStr.Replace("{Cyly:true_name}", "");
                tempStr = tempStr.Replace("{Cyly:zuo_zong}", "");
                tempStr = tempStr.Replace("{Cyly:you_zong}", "");
                tempStr = tempStr.Replace("{Cyly:zuo_yu}", "");
                tempStr = tempStr.Replace("{Cyly:you_yu}", "");
                tempStr = tempStr.Replace("{Cyly:jiebie}", "");
                tempStr = tempStr.Replace("{Cyly:Url}", "../../reg/reg.aspx?jd_bianhao=" + UserName + "&zuoyou=" + mm + "");
                Listr1 += "<td colspan=2>" + tempStr + "</td>";

                for (int j = 0; j < 2; j++)
                {
                    tempStr = templateStr;
                    tempStr = tempStr.Replace("{Cyly:UserName}", "注册");
                    tempStr = tempStr.Replace("{Cyly:true_name}", "");
                    tempStr = tempStr.Replace("{Cyly:zuo_zong}", "");
                    tempStr = tempStr.Replace("{Cyly:you_zong}", "");
                    tempStr = tempStr.Replace("{Cyly:zuo_yu}", "");
                    tempStr = tempStr.Replace("{Cyly:you_yu}", "");
                    tempStr = tempStr.Replace("{Cyly:jiebie}", "");
                    tempStr = tempStr.Replace("{Cyly:Url}", "../../reg/reg.aspx?jd_bianhao=" + UserName + "&zuoyou=" + mm + "");
                    Listr2 += "<td><div style='margin:2px;'>" + tempStr + "</div></td>";
                }
            }
        }
        this.table_leval_2.InnerHtml = Listr1;
        this.table_leval_3.InnerHtml = Listr2;
    }
Ejemplo n.º 30
0
    private void ResponseMsg(RequestXML requestXML)
    {
        string MsgType = requestXML.MsgType;

        try
        {
            //根据消息类型判断发送何种类型消息
            switch (MsgType)
            {
            case "text":
                SendTextCase(requestXML);    //发送文本消息
                break;

            case "event":    //发送事件消息
                if (!string.IsNullOrWhiteSpace(requestXML.EventName) && requestXML.EventName.ToString().Trim().Equals("subscribe"))
                {
                    GetUserInfo(access_token, requestXML.FromUserName);
                    tbl_huiyuan huiyuan_model = new tbl_huiyuan();
                    huiyuan_model.GetModel_hui_beizhu(requestXML.FromUserName);
                    if (huiyuan_model.huiyuan_id == null)
                    {
                        tbl_huiyuan shang_huiyuan = new tbl_huiyuan();
                        shang_huiyuan.GetModel_hui_ticket(requestXML.EventKey);
                        tbl_huiyuan model_th         = new tbl_huiyuan();
                        string      huiyuan_id       = DbHelperSQL.GetDataRow("exec sp_shengcheng_id")["aa"].ToString();
                        string      bas_id1          = DbHelperSQL.GetDataRow("exec sp_shengcheng_bianhao")["aa"].ToString();
                        string      huiyuan_shang_id = "A00000000";
                        string      huiyuan_jiedian  = "A00000000";
                        string      huiyuan_zm       = "A00000000";
                        if (shang_huiyuan.huiyuan_id != null)
                        {
                            huiyuan_shang_id = shang_huiyuan.huiyuan_id;
                        }
                        if (tbl_huiyuan.Exists_tiaojian_check(" huiyuan_id='" + huiyuan_id + "'"))
                        {
                            huiyuan_id = DbHelperSQL.GetDataRow("exec sp_shengcheng_id")["aa"].ToString();
                        }
                        if (tbl_huiyuan.Exists_tiaojian_check(" huiyuan_bianhao='" + bas_id1 + "'"))
                        {
                            bas_id1 = DbHelperSQL.GetDataRow("exec sp_shengcheng_bianhao")["aa"].ToString();
                        }
                        model_th.huiyuan_id       = huiyuan_id;
                        model_th.huiyuan_shang_id = huiyuan_shang_id;
                        model_th.huiyuan_jiedian  = huiyuan_jiedian;
                        model_th.huiyuan_name     = nickname;
                        model_th.huiyuan_bianhao  = bas_id1;
                        model_th.zuoyou           = 1;// int.Parse(zuoyou.SelectedValue.ToString());
                        model_th.huiyuan_id       = huiyuan_id;
                        model_th.Add_huiyuan1();
                        int dr = int.Parse(DbHelperSQL.GetDataRow("select top 1 aa=flag_1 from tbl_huiyuan order by flag_1 desc")["aa"].ToString());

                        model_th.GetModel_hui_id(huiyuan_id);
                        model_th.huiyuan_zm = huiyuan_zm;
                        //model_th.huiyuan_mob = this.bas_mob.Text;
                        model_th.huiyuan_jiebie = 0;
                        model_th.huiyuan_pass   = "******";
                        model_th.pass_two       = "222222";
                        model_th.beizhu         = openid;
                        //model_th.huiyuan_yinhang = bas_bankaddress.SelectedItem.Text;
                        //model_th.huiyuan_yinhang_zh = bas_bankaddress1.Text;
                        //model_th.huiyuan_yinhang_name = zhanghuming.Text;
                        //model_th.bank_zhi = bank_zhi.Text;
                        //model_th.huiyuan_address = huiyuan_address.Text;
                        //model_th.bid = province;
                        //model_th.mmid = city;
                        //model_th.sid = int.Parse(bind_Borough.SelectedValue);
                        model_th.flag_1 = dr + 1;  //可以提现
                        //model_th.huiyuan_shenfen_id = this.huiyuan_idcard.Text.Trim().ToString();
                        //model_th.weixin = this.weixin.Text.Trim().ToString();
                        model_th.born_date        = DateTime.Now.ToString();
                        model_th.huiyuan_shangshu = headimgurl;
                        model_th.zhifubao         = "qrscene_" + model_th.flag_1;
                        model_th.net_hege         = 1;
                        model_th.Update();
                    }
                    SendWelComeMsg(requestXML);    //关注时返回的图文消息
                }
                else if (!string.IsNullOrWhiteSpace(requestXML.EventName) && requestXML.EventName.ToString().Trim().Equals("CLICK"))
                {
                    SendEventMsg(requestXML);    //发送事件消息
                }
                break;

            case "voice":
                SendVoiceMsg(requestXML);    //发送语音消息
                break;

            //case "location"://发送位置消息
            //    SendMapMsg(requestXML);
            //    break;
            default:
                break;
            }
        }
        catch (Exception ex)
        {
            HttpContext.Current.Response.Write(ex.ToString());
        }
    }