예제 #1
0
    protected void IbtnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        string zone    = txtTelCountry.Text.ToString().Trim();
        string country = txtTelZoneCode.Text.ToString().Trim();
        string tel     = txtTelNumber.Text.ToString().Trim();
        string phone   = zone + "-" + country + "-" + tel;

        //注册信息
        //Tz888.BLL.Login.LoginInfoBLL objInfo1 = new Tz888.BLL.Login.LoginInfoBLL();
        //登记联系人
        //Tz888.BLL.Register.common objInfo2 = new Tz888.BLL.Register.common();
        //Tz888.Model.Register.OrgContactModel modelInfo2 = new Tz888.Model.Register.OrgContactModel();
        //会员信息表
        Tz888.Model.Register.MemberInfoModel modelInfo3 = new Tz888.Model.Register.MemberInfoModel();
        Tz888.BLL.Register.MemberInfoBLL     objInfo3   = new Tz888.BLL.Register.MemberInfoBLL();
        string LoginName  = this.ViewState["LoginMemberName"].ToString();
        string MemberName = txtCompany.Text.Trim();
        //bool Sex = Convert.ToBoolean(rblSex.SelectedValue);
        string NickName     = txtNickName.Text;
        string Address      = txtAddress.Text;
        string PostCode     = txtPostCode.Text;
        string Mobile       = txtMobile.Text;
        string ManageTypeID = this.ViewState["ManageTypeID"].ToString();

        modelInfo3.LoginName    = LoginName; //登录名
        modelInfo3.CountryCode  = ZoneSelectControl1.CountryID.ToString().Trim();
        modelInfo3.CityID       = ZoneSelectControl1.CityID.ToString().Trim();
        modelInfo3.ProvinceID   = ZoneSelectControl1.ProvinceID.ToString().Trim();
        modelInfo3.CountyID     = ZoneSelectControl1.CountyID.ToString().Trim();
        modelInfo3.MemberName   = txtContactName.Text.Trim();             //联系人姓名
        modelInfo3.Address      = txtAddress.Text;                        //地址
        modelInfo3.Birthday     = DateTime.Now;                           //日期
        modelInfo3.Email        = txtEmail.Text;                          //邮箱
        modelInfo3.Mobile       = txtMobile.Text;                         //手机
        modelInfo3.NickName     = txtNickName.Text;                       //昵称
        modelInfo3.PostCode     = txtPostCode.Text.ToString().Trim();;    //邮编
        modelInfo3.Tel          = phone.Trim();                           //电话
        modelInfo3.ContactName  = txtCompany.Text.ToString().Trim();      //招商机构名称
        modelInfo3.ContactTitle = txtContactTitle.Text.ToString().Trim(); //职位
        int  int1 = 0;
        long int2 = 0;

        //判断会员信息表里是否己存在,并更新注册表
        if (this.ViewState["tag"].ToString() == "add")
        {
            int1 = objInfo3.MemberMessage_Insert(modelInfo3);
        }
        else if (this.ViewState["tag"].ToString() == "update")
        {
            int1 = objInfo3.MemberMessage_Update(modelInfo3);
        }
        //判断登记联系人表里是否己存在
        //int2 = objInfo2.OrgContactMan_FromMemberMessage(modelInfo2);
        Tz888.BLL.Register.LoginInfoBLL dal1 = new Tz888.BLL.Register.LoginInfoBLL();
        int resultproperty = dal1.UpdateLoginPropertyID(this.ViewState["LoginMemberName"].ToString(), -1, 2001);

        if (int1 > 0)
        {
            Tz888.Common.MessageBox.Show(this.Page, "信息修改成功!");
        }
    }
    protected void btnOk_Click(object sender, EventArgs e)
    {
        //注册信息
        //Tz888.BLL.Login.LoginInfoBLL objInfo1 = new Tz888.BLL.Login.LoginInfoBLL();
        //登记联系人


        //Tz888.BLL.Register.common objInfo2 = new Tz888.BLL.Register.common();
        //Tz888.Model.Register.OrgContactModel modelInfo2 = new Tz888.Model.Register.OrgContactModel();
        //会员信息表


        Tz888.Model.Register.MemberInfoModel modelInfo3 = new Tz888.Model.Register.MemberInfoModel();
        Tz888.BLL.Register.MemberInfoBLL     objInfo3   = new Tz888.BLL.Register.MemberInfoBLL();

        string LoginName  = this.ViewState["LoginMemberName"].ToString();
        string MemberName = txtCompany.Text.Trim();
        //bool Sex = Convert.ToBoolean(rblSex.SelectedValue);
        string NickName = txtNickName.Text;

        string Address      = txtAddress.Text;
        string PostCode     = txtPostCode.Text;
        string Mobile       = txtMobile.Text;
        string ManageTypeID = this.ViewState["ManageTypeID"].ToString();


        ///---------------------------------
        ///design by ww (20090526)
        ///---------------------------------
        modelInfo3.LoginName  = LoginName;
        modelInfo3.MemberName = MemberName;
        modelInfo3.Tel        = txtTelCountry.Text.Trim() + "-" + txtTelZoneCode.Text.Trim() + "-" + txtTelNumber.Text.Trim();
        //modelInfo3.RequirInfo = txtContactTitle.Text;//职位


        modelInfo3.Address    = txtAddress.Text;
        modelInfo3.Birthday   = DateTime.Now;
        modelInfo3.Email      = txtEmail.Text;
        modelInfo3.Mobile     = txtMobile.Text;
        modelInfo3.NickName   = txtNickName.Text;
        modelInfo3.PostCode   = txtPostCode.Text;
        modelInfo3.MemberName = txtContactName.Text;

        int int1 = 0;

        //判断会员信息表里是否己存在,并更新注册表
        if (this.ViewState["tag"].ToString() == "add")
        {
            int1 = objInfo3.MemberMessage_Insert(modelInfo3);
        }
        else if (this.ViewState["tag"].ToString() == "update")
        {
            int1 = objInfo3.MemberMessage_Update(modelInfo3);
        }
        Tz888.BLL.Register.LoginInfoBLL dal1 = new Tz888.BLL.Register.LoginInfoBLL();
        int resultproperty = dal1.UpdateLoginPropertyID(this.ViewState["LoginMemberName"].ToString(), Convert.ToInt32(this.radiotype.SelectedValue), 2003);

        //判断登记联系人表里是否己存在
        //int2 = objInfo2.OrgContactMan_FromMemberMessage(modelInfo2);

        if (int1 > 0 && resultproperty > 0)
        {
            Tz888.Common.MessageBox.Show(this.Page, "信息修改成功!");
        }
    }