Пример #1
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));
        }

        if (!IsPostBack)
        {
            //查询是否己有过公司登记

            Tz888.BLL.Register.EnterpriseRegisterBLL obj = new Tz888.BLL.Register.EnterpriseRegisterBLL();
            DataTable dt = obj.getEnterpriseModel(Page.User.Identity.Name);
            if (dt.Rows.Count < 0)
            {
                Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "您还没有进行公司登记,请先登记!", "EnterpriseRegister.aspx");
                return;
            }
        }

        imgLoad();

        #region 组织机构代码 OrganizationCode
        //组织机构代码

        Tz888.BLL.Register.EnterpriseRegisterBLL objOrgCode = new Tz888.BLL.Register.EnterpriseRegisterBLL();
        string strCode = objOrgCode.GetOrganizationCode(Page.User.Identity.Name);
        if (strCode != "")
        {
            string[] Code = strCode.Split('-');
            TextBox1.Text = Code[0];
            TextBox2.Text = Code[1];
        }
        #endregion
    }
Пример #2
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));
        //}

        //if (Page.User.IsInRole("MT1004"))
        //    Response.Redirect("GovernmentRegisterResult.aspx");

        //buSend.Attributes.Add("onclick", "return chkPost();");
        //if (Page.User.IsInRole("MT1001"))
        //{
        //    Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "对不起,您是个人会员,不能进行公司登记", "/index.aspx");

        //    Response.Flush();
        //    Response.End();
        //    return;
        //}

        //if (Page.User.IsInRole("GT1001"))
        //{
        //    ImageUploadControl1.Count = 5;
        //    ImageUploadControl1.NoneCount = 3;
        //}
        //else
        //{
        //    ImageUploadControl1.Count = 5;
        //    ImageUploadControl1.NoneCount = 5;
        //}


        if (!Page.IsPostBack)
        {
            this.ViewState["MemberLoginName"] = Page.User.Identity.Name;   //

            //展厅
            System.Collections.Generic.IList <SelfCreateWeb.Model.MSelfCreateWebInfo> finduser = new SelfCreateWeb.BLL.BSelfCreateWebInfo().GetSelfCreateWebInfo(1, 100, new string[] { "LoginName" }, new string[] { this.ViewState["MemberLoginName"].ToString() });

            if (finduser.Count > 0)
            {
                string url = finduser[0].Domain.Trim();
                tbExhibitionHall.Text    = url;
                tbExhibitionHall.Enabled = false;
                finduser.Clear();
                this.ViewState["WebInfo"] = 0;
            }
            else
            {
                tbExhibitionHall.Text     = "";
                tbExhibitionHall.Enabled  = true;
                this.ViewState["WebInfo"] = 1;
            }

            //联系信息加载
            List <Tz888.Model.Register.OrgContactMan> contactMans  = new List <Tz888.Model.Register.OrgContactMan>(); //联系人实体列表
            Tz888.Model.Register.OrgContactModel      orgContact   = new Tz888.Model.Register.OrgContactModel();      //创建信息联系方式主体
            List <Tz888.Model.MemberResourceModel>    infoResource = new List <Tz888.Model.MemberResourceModel>();    //图片资料

            Tz888.BLL.Register.common com = new common();

            orgContact = com.getContactModel(this.ViewState["MemberLoginName"].ToString());
            try
            {
                contactMans = com.GetOrgContactMan(this.ViewState["MemberLoginName"].ToString());
            }
            catch
            {
                contactMans = null;
            }
            ///0 公司介绍(多图片)

            ///1营业执照
            ///2税务登记证(国税)
            ///3税务登记证(地税)
            ///4荣誉和证书


            ///5其它*/
            try
            {
                infoResource = com.GetMemberResourceModel(this.ViewState["MemberLoginName"].ToString(), 0);
            }
            catch
            {
                infoResource = null;
            }

            OrgContactControl1.OrgContact  = orgContact;  //联系信息
            OrgContactControl1.ContactMans = contactMans; //联系人

            ImageUploadControl1.InfoList = infoResource;


            //企业性质
            obj = new EnterpriseRegisterBLL();
            ddManageType.DataSource     = obj.getEnterpriceManageType();
            ddManageType.DataTextField  = "SetComTypeName";
            ddManageType.DataValueField = "SetComTypeID";
            ddManageType.DataBind();


            //判断操作性质:添加,修改
            Tz888.BLL.Register.EnterpriseRegisterBLL obj2 = new EnterpriseRegisterBLL();
            DataTable dt = obj2.getEnterpriseModel(this.ViewState["MemberLoginName"].ToString());
            this.ViewState["Domain"]       = "Add";
            this.ViewState["EnterpriseID"] = 0;

            if (dt != null && dt.Rows.Count > 0) //修改
            {
                this.ViewState["EnterpriseID"] = dt.Rows[0]["EnterpriseID"].ToString();;
                //基本信息
                tbEnterpriseName.Text      = dt.Rows[0]["EnterpriseName"].ToString();
                ddManageType.SelectedValue = dt.Rows[0]["SetComTypeID"].ToString();
                tbRegisterDate.Text        = dt.Rows[0]["RegisterDate"].ToString();

                //网上展厅(按LoginName读取展厅地址)
                if (dt.Rows[0]["ExhibitionHall"].ToString() != "")
                {
                    // tbExhibitionHall.Text = dt.Rows[0]["ExhibitionHall"].ToString();
                    // tbExhibitionHall.Enabled = false;
                    Hidden1.Value            = "不可修改";
                    this.ViewState["Domain"] = "不可修改";
                }
                else
                {
                    // tbExhibitionHall.Enabled = true;
                }

                // 地区
                ZoneSelectControl1.CountryID  = dt.Rows[0]["CountryCode"].ToString().Trim();
                ZoneSelectControl1.ProvinceID = dt.Rows[0]["ProvinceID"].ToString().Trim();
                ZoneSelectControl1.CityID     = dt.Rows[0]["CityID"].ToString().Trim();
                ZoneSelectControl1.CountyID   = dt.Rows[0]["CountyID"].ToString().Trim();


                ddlCapitalCurrency.SelectedValue = dt.Rows[0]["currency"].ToString();
                tbRegCapital.Text = dt.Rows[0]["RegCapital"].ToString();

                //行业
                SelectIndustryControl1.IndustryString = dt.Rows[0]["Industrylist"].ToString();

                ContentPlaceHolder content = (ContentPlaceHolder)Master.FindControl("ContentPlaceHolder1");
                string             mp      = dt.Rows[0]["MainProduct"].ToString();
                string[]           Product = null;
                Product = mp.Split(',');
                if (mp != "" || mp != null)
                {
                    Product = mp.Split(',');
                    for (int i = 0; i < mp.Length; i++)
                    {
                        try
                        {
                            string value = Product[i].ToString();
                            int    j     = i + 1;
                            System.Web.UI.WebControls.TextBox tb = (TextBox)content.FindControl("tbMainProduct" + j.ToString());
                            tb.Text = value;
                        }
                        catch { }
                    }
                }

                tbComAbout.Text = Tz888.Common.Utility.PageValidate.HtmlToTxt(dt.Rows[0]["ComAbout"].ToString());
            }//添加
            else
            {
                //读取注册信息
                //Tz888.BLL.Conn obCon = new Tz888.BLL.Conn();
                //DataTable dtContact = obCon.GetList("OrgContactTab", "*", "LoginName", 1, 1, 0, 1, "LoginName='" + Page.User.Identity.Name + "'");
                //if (dtContact != null)
                //{
                //    tbEnterpriseName.Text = dtContact.Rows[0]["OrganizationName"].ToString();
                //}
                this.ViewState["EnterpriseID"] = 0;
            }
        }

        AjaxPro.Utility.RegisterTypeForAjax(typeof(Tz888.Common.Ajax.AjaxMethod));
        tbExhibitionHall.Attributes.Add("onblur", "CheckDomain(this.value,'" + this.ViewState["MemberLoginName"].ToString() + "');");
    }
Пример #3
0
    protected void buSend_Click(object sender, ImageClickEventArgs e)
    {
        obj  = new EnterpriseRegisterBLL();
        mode = new EnterpriseInfoModel();

        List <Tz888.Model.Common.IndustryModel>   industryModels   = new List <Tz888.Model.Common.IndustryModel>();    //行业实体列表
        List <Tz888.Model.Register.OrgContactMan> ContactManModels = new  List <Tz888.Model.Register.OrgContactMan>(); //联系人实体列表

        Tz888.Model.Register.OrgContactModel   ContactModel       = new Tz888.Model.Register.OrgContactModel();        //创建信息联系方式主体
        List <Tz888.Model.MemberResourceModel> infoResourceModels = new List <Tz888.Model.MemberResourceModel>();      //图片资料

        mode.LoginName      = this.ViewState["MemberLoginName"].ToString();
        mode.EnterpriseName = tbEnterpriseName.Text;
        mode.SetComTypeID   = Convert.ToInt32(ddManageType.SelectedValue);
        try
        {
            mode.RegisterDate = Convert.ToDateTime(tbRegisterDate.Text);
        }
        catch
        {
            Tz888.Common.MessageBox.Show(this.Page, "注册时间输入错误");
            return;
        }
        mode.CountryCode = this.ZoneSelectControl1.CountryID;
        mode.ProvinceID  = this.ZoneSelectControl1.ProvinceID;
        mode.CityID      = this.ZoneSelectControl1.CityID;
        mode.CountyID    = this.ZoneSelectControl1.CountyID;
        if (mode.ProvinceID == "" && mode.CountryCode.Trim() == "CN")
        {
            Tz888.Common.MessageBox.Show(this.Page, "请选取更详细的注册地址");
            return;
        }

        industryModels = this.SelectIndustryControl1.IndustryModels;
        if (industryModels == null)
        {
            Tz888.Common.MessageBox.Show(this.Page, "行业不能为空");
            return;
        }
        foreach (Tz888.Model.Common.IndustryModel IM in industryModels)
        {
            mode.Industrylist += IM.IndustryBID + ",";
        }
        mode.currency = ddlCapitalCurrency.SelectedValue;//币种
        try
        {
            mode.RegCapital = Convert.ToDecimal(tbRegCapital.Text);//注册资金
        }
        catch
        {
            Tz888.Common.MessageBox.Show(this.Page, "请正确输入注册资金!");
            return;
        }
        #region 主营产品或服务

        string MainProduct = "";
        if (!string.IsNullOrEmpty(this.tbMainProduct1.Text.Trim()))
        {
            MainProduct += this.tbMainProduct1.Text.Trim() + ",";
        }
        if (!string.IsNullOrEmpty(this.tbMainProduct2.Text.Trim()))
        {
            MainProduct += this.tbMainProduct2.Text.Trim() + ",";
        }
        if (!string.IsNullOrEmpty(this.tbMainProduct3.Text.Trim()))
        {
            MainProduct += this.tbMainProduct3.Text.Trim() + ",";
        }
        mode.MainProduct = MainProduct;
        #endregion

        #region  读取意向
        Tz888.BLL.Conn objReq = new Tz888.BLL.Conn();
        string         req    = "";
        DataTable      dtReq  = objReq.GetList("logininfotab", "RequirInfo", "LoginName", 1, 1, 0, 1, "LoginName='" + this.ViewState["MemberLoginName"].ToString() + "'");
        if (dtReq != null)
        {
            req = dtReq.Rows[0]["RequirInfo"].ToString().Trim();
        }
        #endregion

        mode.RequirInfo     = req; //意向(从注册表里读取)
        mode.AuditingStatus = 0;   //审核状态

        if (tbComAbout.Text.Length < 50 || tbComAbout.Text.Length > 2000)
        {
            Tz888.Common.MessageBox.Show(this.Page, "请输入50-2000的公司介绍信息!");
            return;
        }

        mode.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(tbComAbout.Text);//公司介绍

        mode.ComAboutBrief  = "";
        mode.ExhibitionHall = tbExhibitionHall.Text; //展厅tbExhibitionHall
        mode.hits           = 0;                     //点击数

        mode.remark = "";

        ContactModel     = this.OrgContactControl1.OrgContact;  //联系信息
        ContactManModels = this.OrgContactControl1.ContactMans; //联系人


        if (ContactModel.Name.Trim() == "" && ContactModel.TelNum.Trim() == "" && ContactModel.Mobile.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "请输入完整的联系信息!");
            return;
        }

        //将已上传的图片从临时目录迁移到正式目录
        //infoResourceModels = Tz888.Common.InfoResourceManage.MemberImageTransfer("Image", "EnterpriseRegister", Tz888.Common.ResourceType.Image, Tz888.Common.MemberResourceProperty.RP0, ImageUploadControl1.InfoList);
        infoResourceModels = ImageUploadControl1.InfoList;

        ////展厅
        //if (this.ViewState["WebInfo"].ToString() == "1")
        //{
        //    bool IsVip = false;
        //    if (Page.User.IsInRole("GT1002")) IsVip = true;

        //    SelfCreateWeb.Model.DatabaseOperationStatus dos = new SelfCreateWeb.BLL.BSelfCreateWebInfo().AddSelfCreateWebInfo(new SelfCreateWeb.Model.MSelfCreateWebInfo(0, this.ViewState["MemberLoginName"].ToString(), "", 0, tbExhibitionHall.Text.Trim(), DateTime.Now, DateTime.Now), new SelfCreateWeb.ParameterMap.PSelfCreateWebInfo(false, true, false, false, true, false, false));
        //    if (dos == SelfCreateWeb.Model.DatabaseOperationStatus.Success)
        //    {
        //        new SelfCreateWeb.BLL.BSelfCreateWebInfo().InitPageParameter(this.ViewState["MemberLoginName"].ToString(), IsVip, false);
        //    }
        //    else
        //    {
        //        Tz888.Common.MessageBox.Show(this.Page, "此域名不可用,请重新输入!");
        //        return;
        //    }
        //}

        //信息
        int EnterpriseId = Convert.ToInt32(this.ViewState["EnterpriseID"]);

        int type = 0;
        //if (Page.User.IsInRole("GT1001"))   //普通会员

        //    type = 0;
        //else
        type = 1;


        if (EnterpriseId == 0)
        {
            int rv = obj.EnterpriseAdd(mode, ContactModel, ContactManModels, infoResourceModels);
            if (rv > 0)
            {
                Response.Redirect("OrgRegisterSucceed.aspx?type=" + type + "&reg=Ent_Add&web=" + tbExhibitionHall.Text + ".co.");
                // string para="type=" + type + "&reg=Ent_Add&web=" + tbExhibitionHall.Text + ".co.";
                //   Response.Redirect("EnterpriseRegister_additive.aspx?reg=Ent_Add&web=" + tbExhibitionHall.Text + ".co.");
            }
        }
        else
        {
            mode.EnterpriseID = EnterpriseId;
            int rv = obj.EnterpriseUpdate(mode, ContactModel, ContactManModels, infoResourceModels);
            Response.Redirect("OrgRegisterSucceed.aspx?type=" + type + "&reg=Ent_Update&web=" + tbExhibitionHall.Text + ".co.");
            // string para ="type=" + type + "&reg=Ent_Update&web=" + tbExhibitionHall.Text + ".co.";
            // Response.Redirect("EnterpriseRegister_additive.aspx?reg=Ent_Update&web=" + tbExhibitionHall.Text + ".co.");
        }
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ///------------------------------
        ///--design by AdSystem_20090620
        ///------------------------------
        bool   isBuy     = false;
        string viewid    = "0";
        string loginName = "";

        if (Request.QueryString["v"] != null && Request.QueryString["v"].ToString() != "")
        {
            viewid = Request.QueryString["v"].ToString().Trim();
        }
        if (Request.QueryString["LoginName"] != null && Request.QueryString["LoginName"].ToString() != "")
        {
            loginName = Request.QueryString["LoginName"].ToString().Trim();
        }
        AdSystem.Logic loc = new AdSystem.Logic();
        isBuy = loc.ViewInfo_IsBuy(Convert.ToInt64(viewid), loginName);
        if (!isBuy)
        {
            Response.Write("<script language=javascript>alert('您没有查看的权限,查询此信息需要花费1元,请先购买!');window.close();</script>");
            return;
        }


        //要传的值 ManageTypeID = 1003  LoginName
        if (Request.QueryString["LoginName"] != null)
        {
            LoginName = Request.QueryString["LoginName"].ToString();
            //注册信息
            Tz888.BLL.Login.LoginInfoBLL obj1 = new Tz888.BLL.Login.LoginInfoBLL();
            DataTable dt1 = obj1.GetLoginInfoList("*", "LoginName='" + LoginName + "'", "LoginName");
            //登记联系人

            Tz888.BLL.Register.common            obj2   = new Tz888.BLL.Register.common();
            Tz888.Model.Register.OrgContactModel model2 = new Tz888.Model.Register.OrgContactModel();
            model2 = obj2.getContactModel(LoginName);
            //会员信息表

            Tz888.Model.Register.MemberInfoModel model3 = new Tz888.Model.Register.MemberInfoModel();
            Tz888.BLL.Register.MemberInfoBLL     obj3   = new Tz888.BLL.Register.MemberInfoBLL();
            model3 = obj3.GetModel("LoginName='" + LoginName + "'");
            //会员登陆信息
            Tz888.SQLServerDAL.Conn obj4 = new Tz888.SQLServerDAL.Conn();
            // DataTable dt4 = obj4.GetList("LoginLogTab", "LoginTime", "LoginTime", 10000, 1, 0, 1, "LoginName='" + LoginName + "'");
            //会员发布信息
            // DataTable dt5 = obj4.GetList("MainInfoViw", "Title,PublishT,HtmlFile", "PublishT", 1000, 1, 0, 1, "LoginName='" + LoginName + "'");
            //公司登记信息
            Tz888.BLL.Register.EnterpriseRegisterBLL obj6 = new Tz888.BLL.Register.EnterpriseRegisterBLL();
            DataTable dt6 = obj6.getEnterpriseModel(LoginName);
            //公司附加信息
            // DataTable dt7 = obj4.GetList("MemberResourceTab", "*", "LoginName", 1, 1, 0, 1, "LoginName='kittycat'");

            if (dt1 != null)
            {
                #region 信息绑定
                lbRealName.Text        = dt1.Rows[0]["RealName"].ToString() == "" ? dt1.Rows[0]["NickName"].ToString() : dt1.Rows[0]["RealName"].ToString();
                lbLoginName.Text       = dt1.Rows[0]["LoginName"].ToString();
                lbNickName.Text        = dt1.Rows[0]["NickName"].ToString();
                lblNickName2.Text      = dt1.Rows[0]["NickName"].ToString();
                HyperLink1.NavigateUrl = "http://member.topfo.com/helper/FriendManager/FriendFore.aspx?name=" + lbLoginName.Text;
                HyperLink2.NavigateUrl = "http://member.topfo.com/InnerInfo/SendView.aspx?name=" + lbNickName.Text;

                switch (dt1.Rows[0]["ManageTypeID"].ToString().Trim())
                {
                case "1001":
                    lbManageType.Text = "个人会员";
                    break;

                case "1003":
                    lbManageType.Text = "企业会员";
                    break;

                case "1004":
                    lbManageType.Text = "政府会员";
                    break;

                default:
                    break;
                }
                switch (dt1.Rows[0]["MemberGradeID"].ToString().Trim())
                {
                case "1001":
                    GradeDiv.Visible = false;
                    break;

                case "1002":
                    GradeDiv.Visible = true;
                    break;

                default:
                    GradeDiv.Visible = false;
                    break;
                }
                string   req       = dt1.Rows[0]["RequirInfo"].ToString();
                string[] strReq    = req.Split(',');
                string   strRequar = "";
                for (int i = 0; i < strReq.Length; i++)
                {
                    switch (strReq[i].Trim())
                    {
                    case "1001":
                        strRequar += "政府招商 ";
                        break;

                    case "1002":
                        strRequar += "企业招商 ";
                        break;

                    case "1003":
                        strRequar += "项目融资 ";
                        break;

                    case "1004":
                        strRequar += "项目投资 ";
                        break;

                    case "1005":
                        strRequar += "创业合作 ";
                        break;

                    case "1006":
                        strRequar += "产品供求 ";
                        break;

                    default:
                        break;
                    }
                }

                lbRequar.Text = strRequar;//会员意向

                lbRegTime.Text = dt1.Rows[0]["RegisterTime"].ToString();


                if (model3 != null)
                {
                    lbSex.Text       = model3.Sex ? "(女)" : "(男)";
                    imgHead.ImageUrl = model3.HeadPortrait.ToString() != "" ? ConfigurationManager.AppSettings["ImageDomain"].ToString() + "/" + model3.HeadPortrait.ToString() : "../images/MemberData/nopic.gif";
                }

                if (model2 != null)
                {
                    lbCareer.Text           = model2.Career;
                    lbOrganizationName.Text = model2.OrganizationName != "" ? model2.OrganizationName : "暂无";

                    lbtAddress.Text = model2.address != "" ? model2.address : "暂无";

                    string tel = model2.TelCountryCode + model2.TelStateCode + model2.TelNum;
                    lbTel.Text = tel != "" ? tel : "暂无";

                    lbMoble.Text = model2.Mobile != "" ? model2.Mobile : "暂无";

                    string fax = model2.FaxCountryCode + model2.FaxStateCode + model2.FaxNum;
                    lbFax.Text = fax != "" ? fax : "暂无";

                    lbSite.Text = model2.Website != "" ? model2.Website : "暂无";
                }

                int rowCount = Convert.ToInt32(obj4.GetList("LoginLogTab", "LoginTime", "LoginTime", 1, 1, 1, 1, "LoginName='" + LoginName + "'").Rows[0][0]);

                if (rowCount > 0)
                {
                    DataTable dt4 = obj4.GetList("LoginLogTab", "LoginTime", "LoginTime", 1, 1, 0, 1, "LoginName='" + LoginName + "'");
                    lbLoginCount.Text = rowCount.ToString();
                    lbLoginB.Text     = dt4.Rows[0]["LoginTime"].ToString();
                }
                else
                {
                    lbLoginCount.Text = "1";
                    lbLoginB.Text     = DateTime.Now.ToShortDateString();
                }

                lbPublishCount.Text = obj4.GetList("MainInfoViw", "Title,PublishT,HtmlFile", "PublishT", 1, 1, 1, 1, "LoginName='" + LoginName + "' ").Rows[0][0].ToString();

                if (dt6 != null)
                {
                    string strMP       = dt6.Rows[0]["MainProduct"].ToString();
                    string MainProduct = "";
                    if (strMP.Trim() != "")
                    {
                        MainProduct = strMP.Remove(strMP.Length - 1);
                    }
                    lbMainProduct.Text = MainProduct != "" ? MainProduct : "暂无";
                    string   str     = dt6.Rows[0]["Industrylist"].ToString();
                    string[] strList = str.Split(',');
                    Tz888.BLL.Common.IndustryBLL obj7 = new Tz888.BLL.Common.IndustryBLL();
                    string strIndustry = "";
                    for (int i = 0; i < strList.Length; i++)
                    {
                        if (strList[i] != "")
                        {
                            strIndustry += obj7.GetNameByID(strList[i]) + " ";
                        }
                    }
                    lbIndustryModels.Text = strIndustry != "" ? strIndustry : "暂无";

                    //  2已审核(已审基本信息),0未审核、1审核通过、3审核不通过、4退款
                    if (dt6.Rows[0]["AuditingStatus"].ToString() == "1")
                    {
                        //查询认证信息
                        DataTable ddt6 = obj4.GetList("OrgAuditTab", "*", "AuditingDate", 1, 1, 0, 1, "LoginName='" + LoginName + "'");

                        lbAuditingStatus.Text = ddt6.Rows[0]["AuditingDate"].ToString() + "通过认证";
                    }
                    else
                    {
                        lbAuditingStatus.Text = "暂未通过认证";
                    }

                    lbExhibitionHall.Text = dt6.Rows[0]["ExhibitionHall"].ToString() != "" ? "http://www." + dt6.Rows[0]["ExhibitionHall"].ToString() + ".co.tz888.cn " : "暂无";
                }
                /// 资源类型
                /// 0 -其他文档
                /// 1 -图片
                /// 2 -视频
                /// <summary>
                /// 资源性质
                /// 0 --其他
                /// 1--立项批文
                ///2--商业计划书

                ///3 --项目视频展播
                /// 附:(公司登记附件 4-8)

                ///4营业执照
                ///5税务登记证(国税)
                ///6税务登记证(地税)
                ///7荣誉和证书

                ///8其它
                if (Page.User.IsInRole("GT1001"))   //普通会员

                {
                    spanRM.Visible = false;
                }
                else
                {
                    DataTable dtmr4 = obj4.GetList("MemberResourceTab", "*", "LoginName", 1, 1, 0, 1, "LoginName='" + LoginName + "' AND ResourceType=4");
                    if (dtmr4 != null)
                    {
                        lbResourceType4.Text = dtmr4.Rows.Count == 0 ? "暂无" : dtmr4.Rows.Count + "张己上传";
                    }
                    else
                    {
                        lbResourceType4.Text = "暂无";
                    }
                    DataTable dtmr56 = obj4.GetList("MemberResourceTab", "*", "LoginName", 1, 1, 0, 1, "LoginName='" + LoginName + "' AND ResourceType=5 OR ResourceType=6");
                    if (dtmr56 != null)
                    {
                        lbResourceType56.Text = dtmr56.Rows.Count == 0 ? "暂无" : dtmr4.Rows.Count + "张己上传";
                    }
                    else
                    {
                        lbResourceType56.Text = "暂无";
                    }

                    DataTable dtmr7 = obj4.GetList("MemberResourceTab", "*", "LoginName", 1, 1, 0, 1, "LoginName='" + LoginName + "' AND ResourceType=7");
                    if (dtmr7 != null)
                    {
                        lbResourceType7.Text = dtmr7.Rows.Count == 0 ? "暂无" : dtmr4.Rows.Count + "张己上传";
                    }
                    else
                    {
                        lbResourceType7.Text = "暂无";
                    }
                }
            }

            #endregion
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "请求出错");
        }
    }
Пример #5
0
    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() + "'");

        ////头像
        //if (model3 != null)
        //{
        //    rblSex.SelectedValue = model3.Sex.ToString();
        //    if (model3.HeadPortrait != "" && model3.HeadPortrait != null)
        //    {
        //        FileUploader1.Img = ConfigurationManager.AppSettings["ImageDomain"].ToString() + "/" + model3.HeadPortrait;
        //        FileUploader1.ButtonName = "修改";
        //        FileUploader1.MaxPics = 0;
        //        FileUploader1.IsUp = "0";//是否通过控件上传
        //        //  this.ViewState["HeadPortrait"] = model3.HeadPortrait;
        //        this.ViewState["HeadPortrait"] = model3.HeadPortrait;
        //    }
        //    else
        //    {
        //        FileUploader1.Img = "../images/MemberData/nopic.gif";
        //        FileUploader1.ButtonName = "修改";
        //        FileUploader1.MaxPics = 1;
        //        FileUploader1.IsUp = "0";//是否通过控件上传
        //    }
        //}

        if (!IsPostBack)
        {
            DataTable dt1 = obj1.GetLoginInfoList("*", "LoginName='" + this.ViewState["LoginMemberName"].ToString() + "'", "LoginName");
            model2 = obj2.getContactModel(this.ViewState["LoginMemberName"].ToString());
            if (dt1.Rows.Count > 0)
            {
                #region 信息绑定
                txtEmail.Text    = dt1.Rows[0]["Email"].ToString();
                lbLoginName.Text = dt1.Rows[0]["LoginName"].ToString();

                switch (dt1.Rows[0]["ManageTypeID"].ToString().Trim())
                {
                case "1001":
                    lbManageType.Text = "个人会员";
                    ChkLstRequirInfo.Items[0].Enabled = false;
                    Label1.Text            = "公司网址";
                    hlView.NavigateUrl     = "MemberMessage_P.aspx?LoginName=" + this.ViewState["LoginMemberName"].ToString();
                    HyperLink1.NavigateUrl = "MemberMessage_P.aspx?LoginName=" + this.ViewState["LoginMemberName"].ToString();
                    break;

                case "1003":
                    lbManageType.Text = "企业会员";
                    ChkLstRequirInfo.Items[0].Enabled = false;
                    Label1.Text            = "公司网址";
                    hlView.NavigateUrl     = "MemberMessage_E.aspx?LoginName=" + this.ViewState["LoginMemberName"].ToString();
                    HyperLink1.NavigateUrl = "MemberMessage_E.aspx?LoginName=" + this.ViewState["LoginMemberName"].ToString();
                    break;

                case "1004":
                    lbManageType.Text = "政府会员";
                    ChkLstRequirInfo.Items[1].Enabled = false;
                    ChkLstRequirInfo.Items[2].Enabled = false;
                    ChkLstRequirInfo.Items[3].Enabled = false;
                    ChkLstRequirInfo.Items[4].Enabled = false;
                    ChkLstRequirInfo.Items[5].Enabled = false;
                    Label1.Text            = "机构网址";
                    hlView.NavigateUrl     = "MemberMessage_G.aspx?LoginName=" + this.ViewState["LoginMemberName"].ToString();
                    HyperLink1.NavigateUrl = "MemberMessage_G.aspx?LoginName=" + this.ViewState["LoginMemberName"].ToString();
                    break;

                default:
                    break;
                }
                this.ViewState["ManageTypeID"] = dt1.Rows[0]["ManageTypeID"].ToString();
                string[] code = dt1.Rows[0]["RequirInfo"].ToString().Split(new char[] { ',' }, 6);
                foreach (ListItem li in ChkLstRequirInfo.Items)
                {
                    for (int i = 0; i < code.Length; i++)
                    {
                        if (li.Value == code[i].Trim())
                        {
                            li.Selected = true;
                        }
                    }
                }

                if (dt1.Rows[0]["Tel"] != "")
                {
                    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();
                txtMemberName.Text = dt1.Rows[0]["RealName"].ToString();


                //公司,机构登记    公司网址
                if (Page.User.IsInRole("MT1004"))//机构
                {
                    Tz888.BLL.Register.GovernmentRegisterBLL obj = new Tz888.BLL.Register.GovernmentRegisterBLL();
                    DataTable dtGov = obj.getGovernmentModel(this.ViewState["LoginMemberName"].ToString());
                    if (dtGov == null)
                    {
                        Label2.Text = "<span class='hui'> 您还没有登记您的机构信息<a href='/Register/GovernmentRegister.aspx'>立即登记</a></span>";
                        Label3.Text = "<span class='hui'>如果您的机构还没有网站</span><a href='http://co.topfo.com/manager/intro.aspx' target='blank'>请点此建立您的网上展厅</a>";
                    }
                    else
                    {
                        Label3.Text = "<span class='hui'>您的展厅地址为:www." + dtGov.Rows[0]["ExhibitionHall"].ToString().Trim() + ".co.tz888.cn <span class='hui'>,如果您的公司还没有网站,可用此网址。</span> ";
                    }
                }
                else if (Page.User.IsInRole("MT1003")) //企业
                {
                    Tz888.BLL.Register.EnterpriseRegisterBLL obj = new Tz888.BLL.Register.EnterpriseRegisterBLL();
                    DataTable dtEnt = obj.getEnterpriseModel(this.ViewState["LoginMemberName"].ToString());
                    if (dtEnt == null)
                    {
                        Label2.Text = "<span class='hui'> 您还没有登记您的公司信息<a href='/Register/EnterpriseRegister.aspx'>立即登记</a></span>";
                        Label3.Text = "<span class='hui'>如果您的公司还没有网站</span><a href='http://co.topfo.com/Manager/intro.aspx' target='blank'>请点此建立您的网上展厅</a>";
                    }
                    else
                    {
                        Label3.Text = "<span class='hui'>您的展厅地址为:www." + dtEnt.Rows[0]["ExhibitionHall"].ToString().Trim() + ".co.tz888.cn <span class='hui'>,如果您的公司还没有网站,可用此网址。</span> ";
                    }
                }
                else if (Page.User.IsInRole("MT1001")) //个人
                {
                    Label2.Text = "";
                }



                if (model2 != null)
                {
                    txtOrganizationName.Text = model2.OrganizationName;
                    txtMobile.Text           = model2.Mobile;
                    txtFaxCountry.Text       = model2.FaxCountryCode;
                    txtFaxZoneCode.Text      = model2.FaxStateCode;
                    txtFaxNumber.Text        = model2.FaxNum;
                    txtAddress.Text          = model2.address;
                    txtPostCode.Text         = model2.PostCode;
                }
                else
                {
                }

                #endregion

                this.ViewState["tag"] = "update";
            }
            else
            {
                this.ViewState["tag"] = "add";
            }
        }
        //会员是否存在
        AjaxPro.Utility.RegisterTypeForAjax(typeof(Tz888.Common.Ajax.AjaxMethod));
    }
Пример #6
0
    protected void btSend_Click(object sender, EventArgs e)
    {
        #region 营业执照fuYYZZ
        string[] YYZZName = fuYYZZ.SaveImages("EnterpriseRegister");
        string   PicYYZZ  = "";
        if (YYZZName.Length > 0)
        {
            modelYYZZ = new Tz888.Model.MemberResourceModel();
            PicYYZZ   = YYZZName[0];

            modelYYZZ.ResourceID       = 0;
            modelYYZZ.LoginName        = Page.User.Identity.Name.Trim();
            modelYYZZ.ResourceName     = "营业执照";
            modelYYZZ.ResourceTitle    = "营业执照";
            modelYYZZ.ResourceDescrib  = "营业执照";       //资源介绍
            modelYYZZ.ResourceType     = 1;            //资源类型
            modelYYZZ.ResourceAddr     = PicYYZZ;
            modelYYZZ.ResourceProperty = 1;            //资源性质
            modelYYZZ.ResourcePassword = null;         //资源密码
            modelYYZZ.UpDate           = DateTime.Now; //上传日期
            modelYYZZ.IsDel            = false;        //是否删除
            modelYYZZ.remark           = "营业执照";
            UpLoadImage(modelYYZZ);
        }
        #endregion

        #region 税务登记证(国税)fuGS
        string[] GSName = fuGS.SaveImages("EnterpriseRegister");
        string   PicGS  = "";
        if (GSName.Length > 0)
        {
            modelGS = new Tz888.Model.MemberResourceModel();
            PicGS   = GSName[0];

            modelGS.ResourceID       = 0;
            modelGS.LoginName        = Page.User.Identity.Name.Trim();
            modelGS.ResourceName     = "税务登记证(国税)";
            modelGS.ResourceTitle    = "国税";
            modelGS.ResourceDescrib  = "税务登记证(国税)";  //资源介绍
            modelGS.ResourceType     = 1;            //资源类型
            modelGS.ResourceAddr     = PicGS;
            modelGS.ResourceProperty = 2;            //资源性质
            modelGS.ResourcePassword = null;         //资源密码
            modelGS.UpDate           = DateTime.Now; //上传日期
            modelGS.IsDel            = false;        //是否删除
            modelGS.remark           = "税务登记证(国税)";
            UpLoadImage(modelGS);
        }
        #endregion

        #region 税务登记证(地税)fuDS
        string[] DSName = fuDS.SaveImages("EnterpriseRegister");
        string   PicDS  = "";
        if (DSName.Length > 0)
        {
            modelDS = new Tz888.Model.MemberResourceModel();
            PicDS   = DSName[0];

            modelDS.ResourceID       = 0;
            modelDS.LoginName        = Page.User.Identity.Name.Trim();
            modelDS.ResourceName     = "税务登记证(地税)";
            modelDS.ResourceTitle    = "地税";
            modelDS.ResourceDescrib  = "税务登记证(地税)";  //资源介绍
            modelDS.ResourceType     = 1;            //资源类型
            modelDS.ResourceAddr     = PicDS;
            modelDS.ResourceProperty = 3;            //资源性质
            modelDS.ResourcePassword = null;         //资源密码
            modelDS.UpDate           = DateTime.Now; //上传日期
            modelDS.IsDel            = false;        //是否删除
            modelDS.remark           = "税务登记证(地税)";
            UpLoadImage(modelDS);
        }
        #endregion

        #region 其它荣誉和证书fuRYZS
        string[] RYZSName = fuRYZS.SaveImages("EnterpriseRegister");
        string   PicRYZS  = "";
        if (RYZSName.Length > 0)
        {
            modelRYZS = new Tz888.Model.MemberResourceModel();
            PicRYZS   = RYZSName[0];

            modelRYZS.ResourceID       = 0;
            modelRYZS.LoginName        = Page.User.Identity.Name.Trim();
            modelRYZS.ResourceName     = "其它荣誉和证书";
            modelRYZS.ResourceTitle    = "其它荣誉和证书";
            modelRYZS.ResourceDescrib  = "其它荣誉和证书";    //资源介绍
            modelRYZS.ResourceType     = 1;            //资源类型
            modelRYZS.ResourceAddr     = PicRYZS;
            modelRYZS.ResourceProperty = 4;            //资源性质
            modelRYZS.ResourcePassword = null;         //资源密码
            modelRYZS.UpDate           = DateTime.Now; //上传日期
            modelRYZS.IsDel            = false;        //是否删除
            modelRYZS.remark           = "其它荣誉和证书";
            UpLoadImage(modelRYZS);
        }
        #endregion

        //组织机构代码

        Tz888.BLL.Register.EnterpriseRegisterBLL objOrgCode = new Tz888.BLL.Register.EnterpriseRegisterBLL();
        string strCode = objOrgCode.GetOrganizationCode(Page.User.Identity.Name);
        if (strCode != "")
        {
            string[] Code = strCode.Split('-');
            TextBox1.Text = Code[0];
            TextBox2.Text = Code[1];
        }

        if (TextBox1.Text.Trim() != "" && TextBox2.Text.Trim() != "")
        {
            string Code = TextBox1.Text.Trim() + "-" + TextBox2.Text.Trim();
            if (objOrgCode.UpdateOrganizationCode(Page.User.Identity.Name, Code) < 0)
            {
                Tz888.Common.MessageBox.Show(this.Page, "组织机构代码修改出错!");
                return;
            }
        }

        //string reg=Request.QueryString["reg"].Trim();
        //string web=Request.QueryString["web"].Trim();

        //int type = 0;
        //if (Page.User.IsInRole("GT1001"))   //普通会员

        //    type = 0;
        //else
        //    type = 1;
        //  Response.Redirect("OrgRegisterSucceed.aspx?type=" + type + "&reg="+reg+"&web=" + web);


        Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "上传成功!", "EnterpriseRegister_additive.aspx");
        imgLoad();
    }
Пример #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #if DEBUG
        #else
        if (Page.User.Identity.Name == "")
        {
            Response.Redirect("Login.aspx");
        }
        if (Page.User.IsInRole("GT1002"))
        {
            Response.Redirect("indexTof.aspx");
        }
        #endif
        if (!Page.IsPostBack)
        {
            #if DEBUG
            LoginName = "hujie2010";
#else
            LoginName = Page.User.Identity.Name.Trim();
            #endif
            Tz888.BLL.Conn dal    = new Conn();
            DataTable      dtUser = dal.GetList("LoginInfoTab", "NickName,isCheckUp,Email", "LoginId", 1, 1, 0, 1, "LoginName='" + LoginName + "'");
            Tz888.BLL.Login.LoginInfoBLL bllLoginInfo = new Tz888.BLL.Login.LoginInfoBLL();
            try
            {
                lblUserName.Text = dtUser.Rows[0]["NickName"].ToString();
                isCheckup        = Convert.ToBoolean(dtUser.Rows[0]["isCheckUp"].ToString());
                email            = dtUser.Rows[0]["Email"].ToString();
            }
            catch
            {
                lblUserName.Text = LoginName.Trim();
                isCheckup        = false;
                email            = "";
            }

            GetBulletion();
            ShowPublishInfo();
            CheckUsrRes();
            //读取公司登记
            Tz888.BLL.Register.EnterpriseRegisterBLL obj = new Tz888.BLL.Register.EnterpriseRegisterBLL();
            DataTable dt = obj.getEnterpriseModel(LoginName);

            if (dt != null && dt.Rows.Count > 0)
            {
                string strInnerHtml = "";
                //根据会员类型转向不同的登记页面


                if (dt.Rows[0]["AuditingStatus"].ToString() == "0")
                {
                    strInnerHtml = "您的公司/招商机构已经登记,正在审核中。<a href='register/GovernmentRegisterResult.aspx' class='blue'>点击查看</a>";
                }

                if (dt.Rows[0]["AuditingStatus"].ToString() == "1")
                {
                    ShowExhibit();
                }

                if (dt.Rows[0]["AuditingStatus"].ToString() == "2")
                {
                    strInnerHtml = "您的公司/招商机构未通过审核。<a href='register/GovernmentRegisterResult.aspx' class='blue'>点击查看</a>";
                }

                forOrgReg.InnerHtml = strInnerHtml;
            }
            else
            {
                string strInnerHtml = "";
                //根据会员类型转向不同的登记页面



                if (Page.User.IsInRole("MT1003")) //企业
                {
                    strInnerHtml = " <b>公司登记:</b>您还没有登记公司,无法更好地宣传自己。<span><a href='Register/EnterpriseRegisterResult.aspx' class='blue'>立即登记</a></span>";
                }
                if (Page.User.IsInRole("MT1004")) //机构
                {
                    strInnerHtml = " <b>机构登记:</b>您还没有登记招商机构,无法更好地宣传自己。<span><a href='Register/EnterpriseRegisterResult.aspx' class='blue'>立即登记</a></span>";
                }
                if (Page.User.IsInRole("MT1001")) //个人
                {
                    strInnerHtml = "";
                }

                forOrgReg.InnerHtml += strInnerHtml;
            }

            string validUrl = "";             //邮箱验证地址

            if (Page.User.IsInRole("MT1003")) //企业
            {
                validUrl = "Register/ValidEMailEnterprise.aspx?logname={0}&email={1}";
            }
            if (Page.User.IsInRole("MT1004")) //机构
            {
                validUrl = "Register/ValidEMailGov.aspx?logname={0}&email={1}";
            }
            if (Page.User.IsInRole("MT1001")) //个人
            {
                validUrl = "Register/ValidEMailPersonal.aspx?logname={0}&email={1}";
            }
            if (!isCheckup &&
                (!string.IsNullOrEmpty(LoginName) || !string.IsNullOrEmpty(email)))
            {
                validUrl = validUrl.Replace("{0}", Server.UrlEncode(Tz888.Common.DEncrypt.DEncrypt.Encrypt(LoginName)));
                validUrl = validUrl.Replace("{1}", Server.UrlEncode(Tz888.Common.DEncrypt.DEncrypt.Encrypt(email))) +
                           "&act=" + Tz888.Common.DEncrypt.DEncrypt.Encrypt("valid");
                forOrgReg.InnerHtml += "<br>您还没有进行邮箱验证,为了您的账户安全,请<a class='blue' href='" + validUrl + "' target='_blank'>点此立即验证</a>";
            }
        }
    }