Пример #1
0
        //发送找回用户名信件
        public void SendSucceedMail(string url, string name, string mail, string absimgurl)
        {
            Tz888.BLL.Register.MemberInfoBLL member = new MemberInfoBLL();
            Tz888.BLL.Register.LoginInfoBLL  log    = new LoginInfoBLL();
            Tz888.BLL.AutoSendMsg            msg    = new Tz888.BLL.AutoSendMsg();

            string content;

            content = msg.DownUrl(url, "GB2312");
            content = content.Replace("$LOGINNAME$", name);
            content = content.Replace("../..", absimgurl);
            content = content.Replace("$LOGINURL$", absimgurl);
            msg.SendEmail(mail, "成功找回用户名,欢迎登陆TopFo", content);
        }
Пример #2
0
        //发送成功信件
        public void SendSuccessMail(string url, string name, string mail, string absimgurl)
        {
            Tz888.BLL.Register.MemberInfoBLL member = new MemberInfoBLL();
            Tz888.BLL.Register.LoginInfoBLL  log    = new LoginInfoBLL();
            Tz888.BLL.AutoSendMsg            msg    = new Tz888.BLL.AutoSendMsg();

            string nickName    = member.getNickName(name);
            string managerType = log.GetManagerType(name);
            string content;

            content = msg.DownUrl(url, "GB2312");
            content = content.Replace("$LOGINNAME$", name);
            content = content.Replace("$NICKNAME$", nickName);
            content = content.Replace("$MANAGERTYPE$", managerType);
            content = content.Replace("c" + managerType.Trim(), "");
            content = content.Replace("../..", absimgurl);
            content = content.Replace("$LOGINURL$", absimgurl);
            msg.SendEmail(mail, "验证成功,欢迎加入拓富大家庭", content);
        }
Пример #3
0
    public string GetMember(object obj)
    {
        string name = obj.ToString().Trim();

        Tz888.BLL.Register.LoginInfoBLL objMember = new Tz888.BLL.Register.LoginInfoBLL();
        string strMG = objMember.GetMemberGradeID(name);
        string strMT = objMember.GetManagerType(name);

        string MG = "";
        string MT = "";

        switch (strMG.Trim())
        {
        case "1002":
            MG = "<font color='red'>[拓富通]</font>";
            break;

        default:
            break;
        }
        switch (strMT.Trim())
        {
        case "企业单位":
            MT = "http://member.topfo.com/Register/MemberMessage_E.aspx?LoginName=" + name;
            break;

        case "政府机构":
            MT = "http://member.topfo.com/Register/MemberMessage_G.aspx?LoginName=" + name;
            break;

        case "个人":
            MT = "http://member.topfo.com/Register/MemberMessage_P.aspx?LoginName=" + name;
            break;
        }
        return("<a href='" + MT + "' target='_blank' >" + name + MG + "</a>");
    }
Пример #4
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, "信息修改成功!");
        }
    }
Пример #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "")
        {
            Response.Redirect("../Login.aspx?ReturnUrl=" + Server.UrlEncode(Request.RawUrl));
            return;
        }

        //信息收藏
        if (Request.Params["infoid"] != null && Request.Params["infoid"].ToString() != "")
        {
            long InfoID = Convert.ToInt64(Request.Params["infoid"]);

            //查询是否己收藏此资源
            Tz888.BLL.Conn obj     = new Tz888.BLL.Conn();
            DataTable      dtCheck = obj.GetList("InfoViewCollectionTab", "InfoID", "InfoID", 1, 1, 0, 1, "InfoID=" + InfoID + "and  LoginName='" + Page.User.Identity.Name + "'");
            if (dtCheck.Rows.Count <= 0)
            {
                Tz888.BLL.CollectionBLL objColl = new Tz888.BLL.CollectionBLL();
                if (objColl.InfoFavorite(InfoID, Page.User.Identity.Name))
                {
                    Response.Redirect("InfoCollection.aspx");
                }
                else
                {
                    Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "收藏出错!", "InfoCollection.aspx");
                }
            }
            else
            {
                Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "此信息己被收藏!", "InfoCollection.aspx");
            }
        }
        //企业机构收藏
        else if (Request.Params["ContactLoginName"] != null && Request.Params["ContactLoginName"].ToString() != "")
        {
            Tz888.Model.CollectionModel CollModel = new Tz888.Model.CollectionModel();
            Tz888.BLL.CollectionBLL     CollObj   = new Tz888.BLL.CollectionBLL();

            //查询是否己收藏此资源
            Tz888.BLL.Conn obj     = new Tz888.BLL.Conn();
            DataTable      dtCheck = obj.GetList("OrgCollectionTab", "ContactLoginName", "ContactLoginName", 1, 1, 0, 1, "ContactLoginName='" + Request.Params["ContactLoginName"].ToString().Trim() + "' and  LoginName='" + Page.User.Identity.Name + "'");

            //   Tz888.Common.MessageBox.Show(this.Page, dtCheck.Rows.Count.ToString());
            //  return;
            if (dtCheck.Rows.Count <= 0)
            {
                CollModel.LoginName        = Page.User.Identity.Name;
                CollModel.ContactLoginName = Request.Params["ContactLoginName"].ToString().Trim();

                Tz888.BLL.Register.LoginInfoBLL objMT = new Tz888.BLL.Register.LoginInfoBLL();
                switch (objMT.GetManagerType(CollModel.ContactLoginName).Trim())
                {
                case "企业单位":
                    Tz888.BLL.Conn obj1   = new Tz888.BLL.Conn();
                    DataTable      ModelE = obj1.GetList("EnterpriseTab", "*", "EnterpriseID", 1, 1, 0, 1, "AuditingStatus=1 and LoginName='" + CollModel.ContactLoginName + "'");
                    if (ModelE != null && ModelE.Rows.Count > 0)
                    {
                        CollModel.IndustryBID    = ModelE.Rows[0]["Industrylist"].ToString();
                        CollModel.CollectOrgType = Convert.ToInt32(ModelE.Rows[0]["SetComTypeID"]);
                        CollModel.CollectOrgName = ModelE.Rows[0]["EnterpriseName"].ToString();
                        CollModel.CountryCode    = ModelE.Rows[0]["CountryCode"].ToString();
                        CollModel.ProvinceID     = ModelE.Rows[0]["ProvinceID"].ToString();
                        CollModel.CityID         = ModelE.Rows[0]["CityID"].ToString();
                        CollModel.CountyID       = ModelE.Rows[0]["CountyID"].ToString();
                        //CollModel.Remrk = "http://" + ModelE.Rows[0]["ExhibitionHall"].ToString() + ".co.topfo.com";
                        System.Collections.Generic.IList <SelfCreateWeb.Model.MSelfCreateWebInfo> list = new SelfCreateWeb.BLL.BSelfCreateWebInfo().GetSelfCreateWebInfo(1, 1, new string[] { "LoginName" }, new string[] { Request.Params["ContactLoginName"].ToString().Trim() });
                        if (list.Count > 0)
                        {
                            CollModel.Remrk = "http://" + list[0].Domain.Trim() + ".co.topfo.com";
                        }
                        else
                        {
                            CollModel.Remrk = "";
                        }
                    }
                    else
                    {
                        Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "此公司展厅未通过审核,不能收藏!", "OrgCollection.aspx");
                        return;
                    }
                    break;

                case "政府机构":
                    Tz888.BLL.Conn obj2   = new Tz888.BLL.Conn();
                    string         s      = "AuditingStatus=1 and LoginName='" + CollModel.ContactLoginName + "'";
                    DataTable      ModelG = obj2.GetList("GovernmentTab", "*", "GovernmentID", 1, 1, 0, 1, "AuditingStatus=1 and LoginName='" + CollModel.ContactLoginName + "'");
                    if (ModelG != null && ModelG.Rows.Count > 0)
                    {
                        CollModel.IndustryBID    = "";
                        CollModel.CollectOrgType = Convert.ToInt32(ModelG.Rows[0]["SubjectType"]);
                        CollModel.CollectOrgName = ModelG.Rows[0]["GovernmentName"].ToString();
                        CollModel.CountryCode    = ModelG.Rows[0]["CountryCode"].ToString();
                        CollModel.ProvinceID     = ModelG.Rows[0]["ProvinceID"].ToString();
                        CollModel.CityID         = ModelG.Rows[0]["CityID"].ToString();
                        CollModel.CountyID       = ModelG.Rows[0]["CountyID"].ToString();
                        //CollModel.Remrk = "http://" + ModelG.Rows[0]["ExhibitionHall"].ToString() + ".gov.topfo.com";
                        System.Collections.Generic.IList <SelfCreateWeb.Model.MSelfCreateWebInfo> list = new SelfCreateWeb.BLL.BSelfCreateWebInfo().GetSelfCreateWebInfo(1, 1, new string[] { "LoginName" }, new string[] { Request.Params["ContactLoginName"].ToString().Trim() });
                        if (list.Count > 0)
                        {
                            CollModel.Remrk = "http://" + list[0].Domain.Trim() + ".gov.topfo.com";
                        }
                        else
                        {
                            CollModel.Remrk = "";
                        }
                    }
                    else
                    {
                        Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "此机构展厅未通过审核,不能收藏!", "OrgCollection.aspx");
                        return;
                    }
                    break;

                default:
                    Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "收藏出错!", "OrgCollection.aspx");
                    return;

                    break;
                }
            }
            else
            {
                Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "己有此收藏记录!", "OrgCollection.aspx");
            }

            Tz888.BLL.CollectionBLL objColl = new Tz888.BLL.CollectionBLL();
            if (CollObj.InfoFavoriteOrgInsert(CollModel))
            {
                Response.Redirect("OrgCollection.aspx");
            }
            else
            {
                Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "收藏出错!", "OrgCollection.aspx");
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //btnOk.Attributes.Add("onclick", "return chkPost();");

        this.ViewState["LoginMemberName"] = Page.User.Identity.Name;
        this.ViewState["HeadPortrait"]    = "";

        //注册信息
        Tz888.BLL.Login.LoginInfoBLL obj1 = new Tz888.BLL.Login.LoginInfoBLL();
        //登记联系人

        Tz888.BLL.Register.common            obj2   = new Tz888.BLL.Register.common();
        Tz888.Model.Register.OrgContactModel model2 = new Tz888.Model.Register.OrgContactModel();
        //会员信息表
        Tz888.Model.Register.MemberInfoModel model3 = new Tz888.Model.Register.MemberInfoModel();
        Tz888.BLL.Register.MemberInfoBLL     obj3   = new Tz888.BLL.Register.MemberInfoBLL();

        model3 = obj3.GetModel("LoginName='" + this.ViewState["LoginMemberName"].ToString() + "'");

        //判断是个人会员还是企业会员
        Tz888.BLL.Register.LoginInfoBLL dal1 = new Tz888.BLL.Register.LoginInfoBLL();
        string propertyid = dal1.GetPropertyID(Page.User.Identity.Name.Trim());

        if (propertyid == "1")
        {
            lbManageType.Text = "项目方 (个人)";
        }
        if (!IsPostBack)
        {
            DataTable dt1 = obj1.GetLoginInfoList("*", "LoginName='" + this.ViewState["LoginMemberName"].ToString() + "'", "LoginName");
            this.ViewState["ManageTypeID"] = dt1.Rows[0]["ManageTypeID"].ToString();
            model2 = obj2.getContactModel(this.ViewState["LoginMemberName"].ToString());

            if (dt1.Rows.Count > 0)
            {
                txtEmail.Text    = dt1.Rows[0]["Email"].ToString();
                lbLoginName.Text = dt1.Rows[0]["LoginName"].ToString();

                if (dt1.Rows[0]["Tel"] != DBNull.Value && dt1.Rows[0]["Tel"].ToString() != "")
                {
                    try
                    {
                        string[] tel = dt1.Rows[0]["Tel"].ToString().Split('-');
                        txtTelCountry.Text  = tel[0].ToString();
                        txtTelZoneCode.Text = tel[1].ToString();
                        txtTelNumber.Text   = tel[2].ToString();
                    }
                    catch
                    {
                        txtTelCountry.Text  = "+86";
                        txtTelZoneCode.Text = "";
                        //因以前数据格式不同原因,没有用‘-’分格
                        txtTelNumber.Text = dt1.Rows[0]["Tel"].ToString();
                    }
                }
                lbNickName.Text      = dt1.Rows[0]["NickName"].ToString();
                txtCompany.Text      = dt1.Rows[0]["CompanyName"].ToString();
                txtContactTitle.Text = dt1.Rows[0]["ContactTitle"].ToString();
                txtContactName.Text  = dt1.Rows[0]["ContactName"].ToString();

                if (model2 != null)
                {
                    txtMobile.Text   = model2.Mobile;
                    txtAddress.Text  = model2.address;
                    txtPostCode.Text = model2.PostCode;
                }

                ///---------------------------------
                ///design by ww (20090526)
                ///---------------------------------

                if (model3 != null)
                {
                    //modelInfo3.Address = txtAddress.Text;
                    //modelInfo3.Birthday = DateTime.Now;
                    //modelInfo3.Email = txtEmail.Text;
                    //modelInfo3.Mobile = txtMobile.Text;
                    //modelInfo3.NickName = lbNickName.Text;
                    //modelInfo3.PostCode = txtPostCode.Text;
                    txtAddress.Text     = model3.Address.ToString();
                    txtEmail.Text       = model3.Email.ToString();
                    txtMobile.Text      = model3.Mobile.ToString();
                    lbNickName.Text     = model3.NickName.ToString();
                    txtPostCode.Text    = model3.PostCode.ToString();
                    txtContactName.Text = model3.MemberName;
                }


                this.ViewState["tag"] = "update";
            }
            else
            {
                this.ViewState["tag"] = "add";
            }
        }
    }
    private void BindShow()
    {
        this.ViewState["LoginMemberName"] = "wa";
        this.ViewState["HeadPortrait"]    = "";

        //注册信息
        Tz888.BLL.Login.LoginInfoBLL obj1 = new Tz888.BLL.Login.LoginInfoBLL();
        //登记联系人

        Tz888.BLL.Register.common            obj2   = new Tz888.BLL.Register.common();
        Tz888.Model.Register.OrgContactModel model2 = new Tz888.Model.Register.OrgContactModel();
        //会员信息表
        Tz888.Model.Register.MemberInfoModel model3 = new Tz888.Model.Register.MemberInfoModel();
        Tz888.BLL.Register.MemberInfoBLL     obj3   = new Tz888.BLL.Register.MemberInfoBLL();

        model3 = obj3.GetModel("LoginName='" + this.ViewState["LoginMemberName"].ToString() + "'");

        //判断是个人会员还是企业会员
        Tz888.BLL.Register.LoginInfoBLL dal1 = new Tz888.BLL.Register.LoginInfoBLL();

        string propertyid = dal1.GetPropertyID("wa");

        this.radiotype.Items.FindByValue(propertyid.Trim()).Selected = true;
        if (propertyid == "1")
        {
            lbManageType.Text = "项目方 (个人)";
        }
        else
        {
            lbManageType.Text = "项目方 (企业)";
        }

        DataTable dt1 = obj1.GetLoginInfoList("*", "LoginName='" + this.ViewState["LoginMemberName"].ToString() + "'", "LoginName");

        this.ViewState["ManageTypeID"] = dt1.Rows[0]["ManageTypeID"].ToString();
        model2 = obj2.getContactModel(this.ViewState["LoginMemberName"].ToString());

        if (dt1.Rows.Count > 0)
        {
            txtEmail.Text    = dt1.Rows[0]["Email"].ToString();
            lbLoginName.Text = dt1.Rows[0]["LoginName"].ToString();

            if (dt1.Rows[0]["Tel"] != DBNull.Value && dt1.Rows[0]["Tel"].ToString() != "")
            {
                try
                {
                    string[] tel = dt1.Rows[0]["Tel"].ToString().Split('-');
                    txtTelCountry.Text  = tel[0].ToString();
                    txtTelZoneCode.Text = tel[1].ToString();
                    txtTelNumber.Text   = tel[2].ToString();
                }
                catch
                {
                    txtTelCountry.Text  = "+86";
                    txtTelZoneCode.Text = "";
                    //因以前数据格式不同原因,没有用‘-’分格
                    txtTelNumber.Text = dt1.Rows[0]["Tel"].ToString();
                }
            }
            txtNickName.Text     = dt1.Rows[0]["NickName"].ToString();
            txtCompany.Text      = dt1.Rows[0]["CompanyName"].ToString();
            txtContactTitle.Text = dt1.Rows[0]["ContactTitle"].ToString();
            txtContactName.Text  = dt1.Rows[0]["ContactName"].ToString();

            if (model2 != null)
            {
                txtMobile.Text   = model2.Mobile;
                txtAddress.Text  = model2.address;
                txtPostCode.Text = model2.PostCode;
            }

            ///---------------------------------
            ///design by ww (20090526)
            ///---------------------------------

            if (model3 != null)
            {
                //modelInfo3.Address = txtAddress.Text;
                //modelInfo3.Birthday = DateTime.Now;
                //modelInfo3.Email = txtEmail.Text;
                //modelInfo3.Mobile = txtMobile.Text;
                //modelInfo3.NickName = txtNickName.Text;
                //modelInfo3.PostCode = txtPostCode.Text;
                txtAddress.Text     = model3.Address.ToString();
                txtEmail.Text       = model3.Email.ToString();
                txtMobile.Text      = model3.Mobile.ToString();
                txtNickName.Text    = model3.NickName.ToString();
                txtPostCode.Text    = model3.PostCode.ToString();
                txtContactName.Text = model3.MemberName;
            }


            this.ViewState["tag"] = "update";
        }
        else
        {
            this.ViewState["tag"] = "add";
        }
    }
    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, "信息修改成功!");
        }
    }