コード例 #1
0
        protected void BtnOk_Click(object sender, EventArgs e)
        {
            Business.userinfo     userinfo     = new Business.userinfo();
            Business.userinfoData userinfodata = new Business.userinfoData();

            userinfodata.subscribe      = subscribe.Text;
            userinfodata.openid         = openid.Text;
            userinfodata.nickname       = nickname.Text;
            userinfodata.sex            = sex.Text;
            userinfodata.language       = language.Text;
            userinfodata.city           = city.Text;
            userinfodata.province       = province.Text;
            userinfodata.country        = country.Text;
            userinfodata.headimgurl     = headimgurl.Text;
            userinfodata.subscribe_time = subscribe_time.Text;
            userinfodata.unionid        = unionid.Text;
            userinfodata.remark         = remark.Text;
            userinfodata.privilege      = privilege.Text;


            if (Request.QueryString["id"] != null)
            {
                userinfodata.Id = Request.QueryString["id"];
                userinfo.Modify(userinfodata);
            }
            else
            {
                userinfo.Insert(userinfodata);
            }

            Response.Redirect("userinfotb.aspx");

            userinfo     = null;
            userinfodata = null;
        }