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; }
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); }
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"); }
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; }