コード例 #1
0
        private void ShowInfo()
        {
            var weixin = GetWeiXinCode();
            lblWeixinName.Text = weixin.WxName;
            lblAppid.Text = weixin.AppId;

            var wxpayBll = new PaymentService();
            var model = wxpayBll.GetModelByAppId(weixin.Id);
            if (model == null || model.Id == 0)
            {
                //新增记录
            }
            else
            {
                //修改
                hidId.Value = model.Id.ToString();
                this.txtmch_id.Text = model.MchId;
                this.txtpaykey.Text = model.Paykey;
                this.txtcertInfoPath.Text = model.CertInfoPath;
                this.txtcerInfoPwd.Text = model.CerInfoPwd;

            }
            var propertyBll = new PropertyService(new PropertyRepository());
            var propertyEntity = propertyBll.GetModelByIName(weixin.Id, MXEnums.WXPropertyKeyName.OpenOauth.ToString());
            if (propertyEntity != null)
            {
                radOpenOAuth.SelectedValue = propertyEntity.iContent;
                hidOpenOauthId.ID = propertyEntity.Id.ToString();
            }
        }