Esempio n. 1
0
        private void ShowInfo(int _id)
        {
            SF.BLL.sf_website   bll   = new SF.BLL.sf_website();
            SF.Model.sf_website model = bll.GetModel(_id);
            txtsitename.Text = model.sitename;
            //txtappid_name.Text = model.appid_name;
            //txtappid_origin_id.Text = model.appid_origin_id;
            //txtweixin_account.Text = model.weixin_account;
            //txtavatar.Text = model.avatar;
            //txtinterface_url.Text = model.interface_url;
            //if(string.IsNullOrEmpty(model.token_value))
            //{
            //    //model.token_value=this.CreateKey(8);
            //}
            //txttoken_value.Text = model.token_value;
            //txtencodingaeskey.Text = model.encodingaeskey;
            //txtappid.Text = model.appid;
            //txtappsecret.Text = model.appsecret;

            //txtpayment_name.Text = model.payment_name;
            //cbstate.Checked = model.state == 1 ? true : false;
            //txtweixin_pay_account.Text = model.weixin_pay_account;
            //txtaccount_pay_key.Text = model.account_pay_key;
            //rblsend_type.SelectedValue = model.send_type.ToString();
            //txtlogo.Text = model.logo;
            //txtdescription.Text = model.description;
        }
Esempio n. 2
0
        private bool DoAdd()
        {
            bool result = false;

            SF.BLL.sf_website   bll    = new SF.BLL.sf_website();
            SF.Model.sf_website model  = new SF.Model.sf_website();
            ManagerInfo         model1 = (ManagerInfo)Session[DTKeys.SESSION_ADMIN_INFO];

            //model.businessNum = model1.businessNum;
            model.sitename = txtsitename.Text.Trim();
            //model.appid_name = txtappid_name.Text.Trim();
            //model.appid_origin_id = txtappid_origin_id.Text.Trim();
            //model.weixin_account = txtweixin_account.Text.Trim();
            //model.avatar = txtavatar.Text;
            //model.interface_url = txtinterface_url.Text.Trim();
            //model.token_value = txttoken_value.Text.Trim();
            //if (string.IsNullOrEmpty(model.token_value))
            //{
            //    //model.token_value = this.CreateKey(8);
            //}
            //model.encodingaeskey = txtencodingaeskey.Text.Trim();
            //model.appid = txtappid.Text.Trim().Trim();
            //model.appsecret = txtappsecret.Text.Trim();

            //model.payment_name = txtpayment_name.Text;
            ////model.state = cbstate.Checked ? 1 : 0;
            //model.weixin_pay_account = txtweixin_pay_account.Text.Trim();
            //model.account_pay_key = txtaccount_pay_key.Text.Trim();
            //model.send_type = int.Parse(rblsend_type.SelectedValue);
            //model.logo = txtlogo.Text;
            //model.description = txtdescription.Text;

            model.create_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            model.create_user = model1.realname;
            model.mid         = model1.UserId;
            model.wid         = "W" + SFUtils.GetCheckCode(4).ToString() + DateTime.Now.ToString("yyyyMMddHHmmss");
            if (bll.Add(model) > 0)
            {
                //AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加公众服务号:" + model.appid_name); //记录日志
                //1.拷贝默认模板
                CopyTemplate(model.wid);

                //2.增加默认会员类别
                MemberGradeInfo memberGrade = new MemberGradeInfo();
                memberGrade.wid         = model.wid;
                memberGrade.Name        = "普通会员";
                memberGrade.Description = "普通会员";
                memberGrade.IsDefault   = true;
                memberGrade.TranVol     = 999999999.00;
                memberGrade.TranTimes   = 999999999;
                //折扣
                memberGrade.Discount = 100;
                result = MemberHelper.CreateMemberGrade(memberGrade);
            }
            return(result);
        }
Esempio n. 3
0
        private bool DoEdit(int _id)
        {
            bool result = false;

            //调整AppId时,需要调整的表
            string[]            strTables = null;
            SF.BLL.sf_website   bll       = new SF.BLL.sf_website();
            SF.Model.sf_website model     = bll.GetModel(_id);

            //if (txtappid.Text.Trim().Equals(model.appid) == false)
            //{
            //    //strTables = new string[] { "sf_contract_child", "sf_user_info", "sf_goods_info", "sf_goods_amounts", "sf_goods_cart", "sf_goods_color", "sf_goods_img", "sf_goods_index_pics", "sf_goods_order", "sf_goods_orderdetal", "sf_goods_size", "sf_goods_types", "sf_user_address", "sf_user_bank", "sf_user_withdraw_order", "sf_auto_reply" };
            //}

            model.id       = _id;
            model.sitename = txtsitename.Text.Trim();
            //model.appid_name = txtappid_name.Text;
            //model.appid_origin_id = txtappid_origin_id.Text;
            //model.weixin_account = txtweixin_account.Text;
            //model.avatar = txtavatar.Text;
            //model.interface_url = txtinterface_url.Text;
            //model.token_value = txttoken_value.Text;
            //if (string.IsNullOrEmpty(model.token_value))
            //{
            //    //model.token_value = this.CreateKey(8);
            //}
            //model.encodingaeskey = txtencodingaeskey.Text;
            //model.appid = txtappid.Text.Trim();
            //model.appsecret = txtappsecret.Text;

            //model.payment_name = txtpayment_name.Text;
            ////model.state = cbstate.Checked ? 1 : 0;
            //model.weixin_pay_account = txtweixin_pay_account.Text;
            //model.account_pay_key = txtaccount_pay_key.Text;
            //model.send_type = int.Parse(rblsend_type.SelectedValue);
            //model.logo = txtlogo.Text;
            //model.description = txtdescription.Text;

            if (bll.Update(model, strTables) == true)
            {
                //AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改公众服务号:" + model.appid_name); //记录日志
                result = true;
            }
            return(result);
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.action = DTRequest.GetQueryString("action");
            if (this.action == "setting")
            {
                int id = DTRequest.GetQueryInt("id");

                SF.BLL.sf_website   bll   = new SF.BLL.sf_website();
                SF.Model.sf_website model = bll.GetModel(id);

                Session[DTKeys.SESSION_WEB_ID] = model.wid;
                //Session[DTKeys.SESSION_TEMPLATES_INFO] = model.templatesNum;
                //Response.Write("<script>parent.location.href='/admin/business/index.aspx';</script>");

                Response.Write("<script>parent.location.href='/admin/default.aspx';</script>");
                //Response.Redirect("/admin/business/index.aspx",true);
                Response.End();
                return;
            }

            RptBind("", "id desc");
        }
Esempio n. 5
0
        private void ShowInfo(int _id)
        {
            SF.BLL.sf_website   bll   = new SF.BLL.sf_website();
            SF.Model.sf_website model = bll.GetModel(_id);

            txtappid_name.Text      = model.appid_name;
            txtappid_origin_id.Text = model.appid_origin_id;
            txtweixin_account.Text  = model.weixin_account;
            txtavatar.Text          = model.avatar;
            txtinterface_url.Text   = model.interface_url;
            txttoken_value.Text     = model.token_value;
            txtencodingaeskey.Text  = model.encodingaeskey;
            txtappid.Text           = model.appid;
            txtappsecret.Text       = model.appsecret;

            txtpayment_name.Text       = model.payment_name;
            cbstate.Checked            = model.state == 1 ? true : false;
            txtweixin_pay_account.Text = model.weixin_pay_account;
            txtaccount_pay_key.Text    = model.account_pay_key;
            rblsend_type.SelectedValue = model.send_type.ToString();
            txtlogo.Text        = model.logo;
            txtdescription.Text = model.description;
        }