private void bind() { if (id.Trim().Length > 0) { CompanysInfo info = BLL.CompanysBLL.GetModel(id); if (info == null || !info.CompanyID.ToString().Equals(id)) { Response.Write("<script>alert('无效的id');history.go(-1);</script>"); return; } if (base.UserType != Common.enumUserType.host.ToString() && base.UserType != Common.enumUserType.admin.ToString()) { if (!base.Equals(id)) { Response.Write("<script>alert('你没有编辑此信息的权限');history.go(-1);</script>"); return; } } title = info.CompanyName + " - "; Companys_PayConfigInfo pinfo = Companys_PayConfigBLL.GetModel(id); if (pinfo != null && pinfo.CompanyId.Equals(id)) { txbAppId.Text = pinfo.AppId; txbMchId.Text = pinfo.MchId; txbAppKey.Text = pinfo.AppKey; txbAppSecret.Text = pinfo.AppSecret; txbToken.Text = pinfo.Token; //string zm = DESEncrypt.Encrypt(id).ToLower(); //string jm = DESEncrypt.Decrypt(zm); //str = "companyid:" + id + " 加密后:" + zm + " 解密后:" + jm; txbwxapiurl.Text = "http://" + info.domain + "/api/weixin.ashx?s=" + id; } } }
private void bind() { if (id > 0) { hfCompanyID.Value = id.ToString(); CompanysInfo info = BLL.CompanysBLL.GetModel(id); if (info == null || info.CompanyID != id) { Response.Write("<script>alert('无效的id');history.go(-1);</script>"); return; } lbcompanyname.Text = info.CompanyName; string totalamount = Math.Round(info.totalamount, 2, MidpointRounding.AwayFromZero).ToString(); lbtotalamount.Text = "¥" + totalamount; } }
private void bind() { dist_json = new WebSite.api.dist().getjson_dist(); if (id > 0) { hfCompanyID.Value = id.ToString(); CompanysInfo info = BLL.CompanysBLL.GetModel(id); if (info == null || info.CompanyID != id) { Response.Write("<script>alert('无效的id');history.go(-1);</script>"); return; } title = "修改-" + info.CompanyName; txbEmail.Text = info.Email; txbWebsite.Text = info.Website; txbCompanyName.Text = info.CompanyName; txbContact.Text = info.Contact; txbPhone.Text = info.Phone; txbMobile.Text = info.Mobile; txbFax.Text = info.Fax; txbAddress.Text = info.Address; ltrstatus.Text = info.status == -1 ? "<span style='color:red;'>关闭</span>" : "正常"; ltrtotalamount.Text = info.totalamount.ToString(); //txbdomain.Text = info.domain; if (info.qrcode != null && info.qrcode.Trim().Length > 0) { qrcodeimg = "<img src=\"" + info.qrcode + "\" height=\"50\"/><br/>"; } if (info.wxqrcode != null && info.wxqrcode.Trim().Length > 0) { wxqrcodeimg = "<img src=\"" + Common.Constant.URL_QRCode() + info.wxqrcode + "\" height=\"50\"/><br/>"; } DistrictInfo dinfo = BLL.DistrictBLL.GetModel(info.distid); if (dinfo != null) { ProvinceId = dinfo.ProvinceId; CityId = dinfo.CityId; AreaId = dinfo.AreaId; DistrictId = dinfo.DistrictId; } } }