//修改
 public int GovernmentUpdate(Tz888.Model.Register.GovernmentInfoModel model,
                             Tz888.Model.Register.OrgContactModel ContactModel,
                             List <Tz888.Model.Register.OrgContactMan> ContactManModels,
                             List <Tz888.Model.MemberResourceModel> infoResourceModels)
 {
     return(dal.GovernmentUpdate(model, ContactModel, ContactManModels, infoResourceModels));
 }
 //修改
 public int EnterpriseUpdate(Tz888.Model.Register.EnterpriseInfoModel model,
                             Tz888.Model.Register.OrgContactModel ContactModel,
                             List <Tz888.Model.Register.OrgContactMan> ContactManModels,
                             List <Tz888.Model.MemberResourceModel> infoResourceModels)
 {
     return(dal.EnterpriseUpdate(model, ContactModel, ContactManModels, infoResourceModels));
 }
    private Tz888.Model.Info.InfoContactModel GetInfoContact()
    {
        //string loginName = Page.User.Identity.Name;
        string loginName = Page.User.Identity.Name;

        Tz888.BLL.Register.common            bll   = new Tz888.BLL.Register.common();
        Tz888.Model.Register.OrgContactModel model = new Tz888.Model.Register.OrgContactModel();

        model = bll.getContactModel(loginName);
        Tz888.Model.Info.InfoContactModel model1 = new Tz888.Model.Info.InfoContactModel();

        if (model == null)
        {
            return(model1);
        }
        model1.OrganizationName = this.txtGovName.Text;
        model1.OrgIntro         = this.txtGovIntro.Value;
        model1.Name             = model.Name.Trim();
        model1.Mobile           = model.Mobile.Trim();
        model1.PostCode         = model.PostCode.Trim();
        model1.TelCountryCode   = model.TelCountryCode.Trim();
        model1.TelNum           = model.TelNum.Trim();
        model1.TelStateCode     = model.TelStateCode.Trim();
        model1.WebSite          = model.Website.Trim();
        model1.FaxCountryCode   = model.FaxCountryCode.Trim();
        model1.FaxNum           = model.FaxNum.Trim();
        model1.FaxStateCode     = model.FaxStateCode.Trim();
        model1.Email            = model.Email.Trim();
        model1.Address          = model.address.Trim();
        model1.Career           = model.Career.Trim();
        return(model1);
    }
    //初始化联络人信息
    private void InitInfoContact()
    {
        //string loginName = Page.User.Identity.Name;\
        string loginName = strLoginName; //#

        Tz888.BLL.Register.common            bll   = new Tz888.BLL.Register.common();
        Tz888.Model.Register.OrgContactModel model = new Tz888.Model.Register.OrgContactModel();
        model = bll.getContactModel(loginName);
        if (model == null)
        {
            return;
        }
        txtCompanyName.Value = model.OrganizationName.Trim();
        txtLinkMan.Value     = model.Name.Trim();
        txtMobile.Value      = model.Mobile.Trim();
        telArea1.Value       = model.TelCountryCode.Trim(); //国际号


        txtTelStateCode.Value = model.TelStateCode.Trim(); //区号
        txtTel.Value          = model.TelNum.Trim();       //电话号


        txtWebSite.Value = model.Website.Trim();
        txtEmail.Value   = model.Email.Trim();
        txtAddress.Value = model.address.Trim();
        txtCareer.Value  = model.Career.Trim();
    }
    private void LoadInfoContact()
    {
        string loginName = Page.User.Identity.Name;

        Tz888.BLL.Register.common            bll   = new Tz888.BLL.Register.common();
        Tz888.Model.Register.OrgContactModel model = new Tz888.Model.Register.OrgContactModel();
        model = bll.getContactModel(loginName);
        if (model == null)
        {
            return;
        }

        this.txtLinkMan.Text     = model.Name;
        this.txtMobile.Text      = model.Mobile;
        this.txtTelCountry.Text  = model.TelCountryCode;
        this.txtTelZoneCode.Text = model.TelStateCode;
        this.txtTelNumber.Text   = model.TelNum;

        //this.txtFaxCountry.Text = model.FaxCountryCode;
        //this.txtFaxZoneCode.Text = model.FaxStateCode;
        //this.txtFaxNumber.Text = model.FaxNum;

        this.txtEmail.Text   = model.Email;
        this.txtAddress.Text = model.address;
        //this.txtPostCode.Text = model.PostCode;
        this.txtWebSite.Text = model.Website;
        //以下是职位
        this.txtPosition.Text = model.Position;

        //ViewState["OrganizationName"] = model.OrganizationName;
        //这里是换为投资机构名称
        this.txtGovName.Text = model.OrganizationName;
    }
Пример #6
0
    private void InitInfoContact()
    {
        //string loginName = CON_LoginName;
        string loginName = fz_LoginName;//Page.User.Identity.Name;

        Tz888.BLL.Register.common            bll   = new Tz888.BLL.Register.common();
        Tz888.Model.Register.OrgContactModel model = new Tz888.Model.Register.OrgContactModel();

        model = bll.getContactModel(loginName);

        if (model == null)
        {
            return;
        }
        Tz888.Model.Info.InfoContactModel model1 = new Tz888.Model.Info.InfoContactModel();

        model1.OrganizationName = model.OrganizationName.Trim();
        model1.Name             = model.Name.Trim();
        model1.Mobile           = model.Mobile.Trim();
        model1.PostCode         = model.PostCode.Trim();
        model1.TelCountryCode   = model.TelCountryCode.Trim();
        model1.TelNum           = model.TelNum.Trim();
        model1.TelStateCode     = model.TelStateCode.Trim();
        model1.WebSite          = model.Website.Trim();
        model1.FaxCountryCode   = model.FaxCountryCode.Trim();
        model1.FaxNum           = model.FaxNum.Trim();
        model1.FaxStateCode     = model.FaxStateCode.Trim();
        model1.Email            = model.Email.Trim();
        model1.Address          = model.address.Trim();
        model1.Career           = model.Career.Trim();

        this.ProjectAddressInfo1.InfoContact = model1;
    }
Пример #7
0
    //初始化联络人信息
    private void InitInfoContact()
    {
        string    loginName = Page.User.Identity.Name;
        DataTable dt1       = obj1.GetLoginInfoList("*", "LoginName='" + loginName + "'", "LoginName");

        Tz888.BLL.Register.common            bll   = new Tz888.BLL.Register.common();
        Tz888.Model.Register.OrgContactModel model = new Tz888.Model.Register.OrgContactModel();

        model = bll.getContactModel(loginName);
        if (model == null)
        {
            return;
        }
        txtCompanyName.Value = model.OrganizationName.Trim();
        txtLinkMan.Value     = model.Name.Trim();
        txtMobile.Value      = model.Mobile.Trim();
        //telArea1.Value = model.TelCountryCode.Trim(); //国际号
        //txtTelStateCode.Value = model.TelStateCode.Trim();  //区号
        //txtTel.Value = model.TelNum.Trim(); //电话号

        txtWebSite.Value = model.Website.Trim();
        txtEmail.Value   = model.Email.Trim();
        txtAddress.Value = model.address.Trim();
        // txtCareer.Value = model.Career.Trim();
        if (dt1.Rows.Count > 0)
        {
            if (dt1.Rows[0]["Tel"] != DBNull.Value && dt1.Rows[0]["Tel"].ToString() != "")
            {
                try
                {
                    string[] tel = dt1.Rows[0]["Tel"].ToString().Split('-');
                    telArea1.Value        = tel[0].ToString();
                    txtTelStateCode.Value = tel[1].ToString();
                    txtTel.Value          = tel[2].ToString();
                }
                catch
                {
                    telArea1.Value        = "+86";
                    txtTelStateCode.Value = "";
                    //因以前数据格式不同原因,没有用‘-’分格
                    txtTel.Value = dt1.Rows[0]["Tel"].ToString();
                }
            }
        }

        Tz888.Model.Register.MemberInfoModel model3 = new Tz888.Model.Register.MemberInfoModel();
        Tz888.BLL.Register.MemberInfoBLL     obj3   = new Tz888.BLL.Register.MemberInfoBLL();
        string name = Page.User.Identity.Name;

        model3 = obj3.GetModel(" LoginName='" + name + "'");
        this.ZoneSelectControl1.CountryID = model3.CountryCode.ToString().Trim(); //国别
        ZoneSelectControl1.CityID         = model3.CityID.ToString().Trim();      //市
        ZoneSelectControl1.ProvinceID     = model3.ProvinceID.ToString().Trim();  //省
        ZoneSelectControl1.CountyID       = model3.CountyID.ToString().Trim();    //县
    }
Пример #8
0
    /// <summary>
    /// 添加数据
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    #region
    // protected void btnSubmit_ServerClick(object sender, EventArgs e)
    //{
    //Response.Write("<script>alert('ok1')</script>");

    ////20090811 判断权限
    //Tz888.BLL.Login.LoginInfoBLL loginbll = new Tz888.BLL.Login.LoginInfoBLL();
    //bool yanzheng = loginbll.yanzheng(Page.User.Identity.Name);
    //if (!yanzheng)
    //{
    //    Tz888.Common.MessageBox.Show(this.Page, "发布失败,你没有发布信息的权限!\\n可能是你发布违规信息帐户被锁定了。\\n详情请联系客服。");
    //    return;
    //}
    ////-----end--

    ////获取投资资源的信息
    //Tz888.Model.Info.MainInfoModel mainInfoModel = new Tz888.Model.Info.MainInfoModel();  //创建主体信息实体
    //Tz888.Model.Info.V124.CapitalInfoModel capitalInfoModel = new Tz888.Model.Info.V124.CapitalInfoModel(); //创建投资信息实体
    //List<Tz888.Model.Info.CapitalInfoAreaModel> capitalInfoAreaModels = new List<Tz888.Model.Info.CapitalInfoAreaModel>();//投资区域信息实体列表
    //Tz888.Model.Info.ShortInfoModel shortInfoModel = new Tz888.Model.Info.ShortInfoModel(); //创建短信息实体
    ////以下是文件上传的实体声明
    //List<Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List<Tz888.Model.Info.InfoResourceModel>();

    //DateTime time_now = DateTime.Now;

    ////拟投向区域
    //capitalInfoAreaModels = this.ZoneSelect1.CapitalInfoAreaModels;

    ////主体信息实体付值


    //#region 投资信息实体赋值

    ////投资意向详细说明
    //capitalInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtCapitalIntent.Value.Trim());
    ////资本类型
    ////capitalInfoModel.CapitalTypeID = this.rblfinancingTarget.SelectedValue;
    //for (int i = 0; rblfinancingTarget.Items.Count > i; i++)
    //{
    //    if (rblfinancingTarget.Items[i].Selected)
    //    {
    //        capitalInfoModel.CapitalTypeID += rblfinancingTarget.Items[i].Value + ",";
    //    }
    //}
    ////单项目可投资金额
    //capitalInfoModel.CapitalID = this.rblCurreny.SelectedValue;
    ////项目介绍提炼
    //capitalInfoModel.ComBreif = "";

    //capitalInfoModel.CooperationDemandType = "";

    ////拟投资行业
    //capitalInfoModel.IndustryBID = this.SelectIndustryControl1.IndustryString;
    ////投资项目阶段
    //capitalInfoModel.stageID = Convert.ToInt32(this.rblStage.SelectedValue);
    //// 是否参与项目方管理
    //capitalInfoModel.joinManageID = Convert.ToInt32(this.rdlJoinManage.SelectedValue);

    //投资方式
    //for (int i = 0; chkLstCooperationDemand.Items.Count > i; i++)
    //{
    //    if (chkLstCooperationDemand.Items[i].Selected)
    //    {
    //        capitalInfoModel.CooperationDemandType += chkLstCooperationDemand.Items[i].Value + ",";
    //    }
    //}

    ////以下是需要添加的参数
    ////注册资金
    //capitalInfoModel.RegisteredCapital = this.rblRegisterdollar.SelectedValue;
    ////团队规模
    //capitalInfoModel.TeamScale = this.rblTeam.SelectedValue;
    ////机构年平均投资事件数
    //capitalInfoModel.AverageInvestment = this.rblPinJ.SelectedValue;
    ////机构成功投资事件总数
    //capitalInfoModel.SuccessfulInvestment = this.rblSucess.SelectedValue;
    ////投资需求摘要
    //capitalInfoModel.InvestmentDemand = this.txtDemand.Value;
    ////添加所属区域

    //capitalInfoModel.SCountryID = this.ZoneSelectControl1.CountryID;
    //capitalInfoModel.SProvinceID = this.ZoneSelectControl1.ProvinceID;
    //capitalInfoModel.SCityID = this.ZoneSelectControl1.CityID;
    //capitalInfoModel.SCountyID = this.ZoneSelectControl1.CountyID;
    ////项目承办单位
    //capitalInfoModel.Prorganizers = "no";
    ////文件上传的
    //infoResourceModels = FilesUploadControl1.InfoList;


    //#endregion


    ////这里是其他的实体值
    //if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
    //    mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());

    //string CountryCode;
    //try
    //{
    //    CountryCode = capitalInfoAreaModels[0].CountryCode;
    //}
    //catch
    //{
    //    CountryCode = "ALL";
    //}
    //mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Capital", capitalInfoModel.IndustryBID.Split(',')[0], CountryCode, time_now);
    //mainInfoModel.publishT = time_now;
    //mainInfoModel.Hit = 0;

    //mainInfoModel.IsCore = true;
    //mainInfoModel.LoginName = "cxj";

    ////mainInfoModel.LoginName = Page.User.Identity.Name; //用户名称
    //mainInfoModel.InfoOriginRoleName = "0"; //用户角色
    //mainInfoModel.GradeID = "0";
    //mainInfoModel.FixPriceID = "1";
    //mainInfoModel.FeeStatus = 0;

    //string keyword = "";
    //if (!string.IsNullOrEmpty(this.txtKeyword1.Text.Trim()))
    //    keyword += Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtKeyword1.Text.Trim()) + ",";
    //if (!string.IsNullOrEmpty(this.txtKeyword2.Text.Trim()))
    //    keyword += Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtKeyword2.Text.Trim()) + ",";
    //if (!string.IsNullOrEmpty(this.txtKeyword3.Text.Trim()))
    //    keyword += Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtKeyword3.Text.Trim()) + ",";

    //mainInfoModel.KeyWord = keyword;
    //mainInfoModel.Descript = "";
    //if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
    //    mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
    //mainInfoModel.FrontDisplayTime = time_now;
    //mainInfoModel.ValidateStartTime = time_now;
    ////意向有效期限
    //mainInfoModel.ValidateTerm = Convert.ToInt32(this.rdlValiditeTerm.SelectedValue.Trim());
    //mainInfoModel.TemplateID = "001";
    //mainInfoModel.HtmlFile = "";

    //shortInfoModel.ShortInfoControlID = "CapitalIndex1";
    //if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
    //    shortInfoModel.ShortTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
    //shortInfoModel.ShortContent = "";
    //shortInfoModel.Remark = "";

    //Tz888.BLL.Info.V124.CapitalInfoBLL bll = new Tz888.BLL.Info.V124.CapitalInfoBLL();

    ////这里是插入资源投资信息
    ////long infoID = bll.Insert(mainInfoModel, capitalInfoModel, this.GetInfoContact(), shortInfoModel, capitalInfoAreaModels, null, infoResourceModels);
    //long infoID = bll.Insert(mainInfoModel, capitalInfoModel, this.GetInfoContact(), shortInfoModel, capitalInfoAreaModels, infoResourceModels);
    ////以下进行图片的插入


    //if (infoID > 0)
    //{
    //    bool isTof = Page.User.IsInRole("GT1002");
    //    if (isTof)
    //    {
    //        string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Capital", mainInfoModel.InfoCode, infoID);
    //        Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
    //        Page.Response.Write(infoID.ToString() + HtmlFile.ToString());
    //        mainBll.HasHtmlFile(infoID, HtmlFile);
    //        string actionMsg = "";
    //        Tz888.BLL.PageStatic.CapitalPageStatic staticobj = new Tz888.BLL.PageStatic.CapitalPageStatic();
    //        staticobj.CreateStaticPageCapital(infoID.ToString(), ref actionMsg);
    //    }
    //    // Response.Redirect("publishCapital_step2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Capital|" + this.txtCapitalName.Text.Trim() + "|" + txtGovName.Text.Trim()));
    //    Response.Redirect("publishCapital_step2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Capital|" + this.txtCapitalName.Text.Trim() + "|" + "no"));
    //}
    //else
    //{
    //    Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
    //}

    //}
    #endregion
    #region 信息初始化绑定
    private void LoadInfoContact()
    {
        string    loginName = Page.User.Identity.Name;
        DataTable dt1       = obj1.GetLoginInfoList("*", "LoginName='" + loginName + "'", "LoginName");

        Tz888.BLL.Register.common            bll   = new Tz888.BLL.Register.common();
        Tz888.Model.Register.OrgContactModel model = new Tz888.Model.Register.OrgContactModel();
        model = bll.getContactModel(loginName);
        if (model == null)
        {
            return;
        }

        this.txtLinkMan.Text = model.Name;
        this.txtMobile.Text  = model.Mobile;
        //this.txtTelCountry.Text = model.TelCountryCode;
        //this.txtTelZoneCode.Text = model.TelStateCode;
        //this.txtTelNumber.Text = model.TelNum;

        //this.txtFaxCountry.Text = model.FaxCountryCode;
        //this.txtFaxZoneCode.Text = model.FaxStateCode;
        //this.txtFaxNumber.Text = model.FaxNum;

        this.txtEmail.Text   = model.Email;
        this.txtAddress.Text = model.address;
        //this.txtPostCode.Text = model.PostCode;
        this.txtWebSite.Text = model.Website;
        //以下是职位
        //this.txtPosition.Text = model.Position;

        //ViewState["OrganizationName"] = model.OrganizationName;
        //这里是换为投资机构名称
        this.txtGovName.Text = model.OrganizationName;
        if (dt1.Rows.Count > 0)
        {
            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();
                }
            }
        }
    }
Пример #9
0
    /// <summary>
    /// 加载用户联系信息
    /// </summary>
    public void InitInfoContact()
    {
        string Lname = Page.User.Identity.Name;

        this.ViewState["LoginMemberName"] = Page.User.Identity.Name;
        DataTable dt1 = obj1.GetLoginInfoList("*", "LoginName='" + Lname + "'", "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='" + this.ViewState["LoginMemberName"].ToString() + "'");

        this.ZoneSelectControl1.CountryID = model3.CountryCode.ToString().Trim(); //国别
        ZoneSelectControl1.CityID         = model3.CityID.ToString().Trim();      //市
        ZoneSelectControl1.ProvinceID     = model3.ProvinceID.ToString().Trim();  //省
        ZoneSelectControl1.CountyID       = model3.CountyID.ToString().Trim();    //县
        Tz888.Model.Register.OrgContactModel org = new Tz888.Model.Register.OrgContactModel();
        Tz888.BLL.Info.MarchantInfoBLL       mar = new Tz888.BLL.Info.MarchantInfoBLL();
        org = mar.SelLoginName(Page.User.Identity.Name);
        // org = mar.SelLoginName("dishi");
        this.txtCompanyName.Text = org.OrganizationName;
        this.txtName.Text        = org.Name;
        //this.txtPosition.Text = org.Position;
        //this.txtTelCountry.Text = org.TelCountryCode;
        //this.txtTelZoneCode.Text = org.TelStateCode;
        //this.txtTelNumber.Text = org.TelNum;
        this.txtMobile.Text  = org.Mobile;
        this.txtEmail.Text   = org.Email;
        this.txtAddress.Text = org.address;
        if (dt1.Rows.Count > 0)
        {
            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();
                }
            }
        }
    }
Пример #10
0
    //protected void IbtnSubmit_Click(object sender, ImageClickEventArgs e)
    //{
    //    //这里是判断验证码
    //    try//验证验证码
    //    {
    //        if (Session["valationNo"] == null || ImageCode.Text.ToUpper().Trim() != Session["valationNo"].ToString().ToUpper().Trim() || Session["valationNo"].ToString().Trim() == "")
    //        {
    //            Tz888.Common.MessageBox.Show(this.Page, "验证码错误!");
    //            return;
    //        }
    //    }
    //    catch
    //    {
    //        Tz888.Common.MessageBox.Show(this.Page, "未知错误!");
    //    }

    //}

    private void SelInver()
    {
        Tz888.Model.Register.OrgContactModel org = new Tz888.Model.Register.OrgContactModel();
        Tz888.BLL.Info.MarchantInfoBLL       mar = new Tz888.BLL.Info.MarchantInfoBLL();
        org = mar.SelLoginName(Page.User.Identity.Name);
        this.txtCompanyName.Text = org.OrganizationName;
        this.txtName.Text        = org.Name;
        this.txtPosition.Text    = org.Position;
        this.txtTelCountry.Text  = org.TelCountryCode;
        this.txtTelZoneCode.Text = org.TelStateCode;
        this.txtTelNumber.Text   = org.TelNum;
        this.txtMobile.Text      = org.Mobile;
        this.txtEmail.Text       = org.Email;
        this.txtAddress.Text     = org.address;
    }
Пример #11
0
        //会员信息修改时 添加登记默认联系人
        public long OrgContactMan_FromMemberMessage(Tz888.Model.Register.OrgContactModel model)
        {
            int rowsAffected;

            SqlParameter[] parameters =
            {
                new SqlParameter("@ContactID",        SqlDbType.BigInt,    8),
                new SqlParameter("@LoginName",        SqlDbType.Char,     16),
                new SqlParameter("@OrganizationName", SqlDbType.VarChar, 100),
                new SqlParameter("@Name",             SqlDbType.VarChar,  20),
                new SqlParameter("@Career",           SqlDbType.VarChar,  20),
                new SqlParameter("@TelCountryCode",   SqlDbType.Char,      6),
                new SqlParameter("@TelStateCode",     SqlDbType.Char,      8),
                new SqlParameter("@TelNum",           SqlDbType.VarChar, 100),
                new SqlParameter("@FaxCountryCode",   SqlDbType.Char,      6),
                new SqlParameter("@FaxStateCode",     SqlDbType.Char,      8),
                new SqlParameter("@FaxNum",           SqlDbType.VarChar, 100),
                new SqlParameter("@Email",            SqlDbType.VarChar,  50),
                new SqlParameter("@Mobile",           SqlDbType.VarChar,  30),
                new SqlParameter("@address",          SqlDbType.VarChar, 100),
                new SqlParameter("@PostCode",         SqlDbType.VarChar,  10),
                new SqlParameter("@Website",          SqlDbType.VarChar, 200),
                new SqlParameter("@IsDel",            SqlDbType.Bit,       1),
                new SqlParameter("@remark",           SqlDbType.VarChar, 100)
            };
            parameters[0].Direction = ParameterDirection.Output;
            parameters[1].Value     = model.LoginName;
            parameters[2].Value     = model.OrganizationName;
            parameters[3].Value     = model.Name;
            parameters[4].Value     = model.Career;
            parameters[5].Value     = model.TelCountryCode;
            parameters[6].Value     = model.TelStateCode;
            parameters[7].Value     = model.TelNum;
            parameters[8].Value     = model.FaxCountryCode;
            parameters[9].Value     = model.FaxStateCode;
            parameters[10].Value    = model.FaxNum;
            parameters[11].Value    = model.Email;
            parameters[12].Value    = model.Mobile;
            parameters[13].Value    = model.address;
            parameters[14].Value    = model.PostCode;
            parameters[15].Value    = model.Website;
            parameters[16].Value    = model.IsDel;
            parameters[17].Value    = model.remark;

            DbHelperSQL.RunProcedure("UP_OrgContactTab_FormMemberMessage", parameters, out rowsAffected);
            return(1);// (long)parameters[0].Value;
        }
Пример #12
0
 /// <summary>
 /// 加载用户联系信息
 /// </summary>
 public void InitInfoContact()
 {
     Tz888.Model.Register.OrgContactModel org = new Tz888.Model.Register.OrgContactModel();
     Tz888.BLL.Info.MarchantInfoBLL       mar = new Tz888.BLL.Info.MarchantInfoBLL();
     //org = mar.SelLoginName(Page.User.Identity.Name);
     org = mar.SelLoginName("8ming");
     this.txtComName.Text     = org.OrganizationName;
     this.txtLinkMan.Text     = org.Name;
     this.txtTelCountry.Text  = org.TelCountryCode;
     this.txtTelZoneCode.Text = org.TelStateCode;
     this.txtTelNumber.Text   = org.TelNum;
     this.txtMobile.Text      = org.Mobile;
     this.txtAddress.Text     = org.address;
     this.txtEmail.Text       = org.Email;
     this.txtPostCode.Text    = org.PostCode;
     this.txtWebSite.Text     = org.Website;
 }
Пример #13
0
    /// <summary>
    /// 加载用户联系信息
    /// </summary>
    private void InitInfoContact()
    {
        //string loginName = CON_LoginName;

        string loginName = fz_LoginName;

        // string loginName = "111111";
        Tz888.BLL.Register.common            bll   = new Tz888.BLL.Register.common();
        Tz888.Model.Register.OrgContactModel model = new Tz888.Model.Register.OrgContactModel();

        model = bll.getContactModel(loginName);

        if (model == null)
        {
            return;
        }
        Tz888.Model.Info.InfoContactModel model1 = new Tz888.Model.Info.InfoContactModel();

        model1.OrganizationName = model.OrganizationName.Trim();
        model1.Name             = model.Name.Trim();
        model1.Mobile           = model.Mobile.Trim();
        // model1.PostCode = model.PostCode.Trim();
        model1.TelCountryCode = model.TelCountryCode.Trim();
        model1.TelNum         = model.TelNum.Trim();
        model1.TelStateCode   = model.TelStateCode.Trim();
        // model1.WebSite = model.Website.Trim();
        // model1.FaxCountryCode = model.FaxCountryCode.Trim();
        // model1.FaxNum = model.FaxNum.Trim();
        // model1.FaxStateCode = model.FaxStateCode.Trim();
        model1.Email   = model.Email.Trim();
        model1.Address = model.address.Trim();
        model1.Career  = model.Career.Trim();
        //新添加的职位
        model1.Position = model.Position.Trim();


        //用户控件这里是联系方式的获取值
        this.MerchantInfoAddressInfo1.InfoContact = model1;
    }
Пример #14
0
    private Tz888.Model.Info.InfoContactModel GetInfoContact()
    {
        //string loginName = "cn001";
        string loginName = bp.LoginName;

        Tz888.BLL.Register.common            bll   = new Tz888.BLL.Register.common();
        Tz888.Model.Register.OrgContactModel model = new Tz888.Model.Register.OrgContactModel();

        model = bll.getContactModel(loginName);
        Tz888.Model.Info.InfoContactModel model1 = new Tz888.Model.Info.InfoContactModel();

        if (model == null)
        {
            return(model1);
        }
        // 这里改变投资机构名称到联系方式中
        //model1.OrganizationName = this.txtGovName.Text;

        model1.OrganizationName = " ";
        model1.OrgIntro         = " ";
        model1.Name             = model.Name.Trim();
        model1.Mobile           = model.Mobile.Trim();
        model1.PostCode         = model.PostCode.Trim();
        model1.TelCountryCode   = model.TelCountryCode.Trim();
        model1.TelNum           = model.TelNum.Trim();
        model1.TelStateCode     = model.TelStateCode.Trim();
        model1.WebSite          = model.Website.Trim();
        model1.FaxCountryCode   = model.FaxCountryCode.Trim();
        model1.FaxNum           = model.FaxNum.Trim();
        model1.FaxStateCode     = model.FaxStateCode.Trim();
        model1.Email            = model.Email.Trim();
        model1.Address          = model.address.Trim();
        model1.Career           = model.Career.Trim();


        return(model1);
    }
    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";
        }
    }
Пример #16
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() + "');");
    }
Пример #17
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.");
        }
    }
Пример #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //btnOk.Attributes.Add("onclick", "return chkPost();");

        this.ViewState["LoginMemberName"] = "262734254ee"; //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 (!IsPostBack)
        {
            #region 加载获取信息
            this.ZoneSelectControl1.CountryID = model3.CountryCode.ToString().Trim(); //国别
            ZoneSelectControl1.CityID         = model3.CityID.ToString().Trim();      //市
            ZoneSelectControl1.ProvinceID     = model3.ProvinceID.ToString().Trim();  //省
            ZoneSelectControl1.CountyID       = model3.CountyID.ToString().Trim();    //县
            txtAddress.Text     = model3.Address.ToString();                          //联系地址
            txtEmail.Text       = model3.Email.ToString();                            //邮箱
            txtContactName.Text = model3.MemberName.ToString();                       //联系人姓名
            txtMobile.Text      = model3.Mobile.ToString();                           //手机号码
            txtPostCode.Text    = model3.PostCode.ToString().Trim();                  //邮编
            txtNickName.Text    = model3.NickName.ToString();                         //昵称
            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().Trim();

                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();
                    }
                }
                lbManageType.Text    = ShenFen(dt1.Rows[0]["ManageTypeID"].ToString().Trim());
                txtCompany.Text      = dt1.Rows[0]["CompanyName"].ToString();
                txtContactTitle.Text = dt1.Rows[0]["ContactTitle"].ToString();

                if (model2 != null)
                {
                    txtCompany.Text = model2.OrganizationName;
                }

                this.ViewState["tag"] = "update";
            }
            else
            {
                this.ViewState["tag"] = "add";
            }
            #endregion
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //btnOk.Attributes.Add("onclick", "return chkPost();");

        //this.ViewState["LoginMemberName"] = Page.User.Identity.Name;
        this.ViewState["LoginMemberName"] = "xiongmaozi";
        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 (!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();
                    }
                }
                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;
                }

                this.ViewState["tag"] = "update";
            }
            else
            {
                this.ViewState["tag"] = "add";
            }
        }
    }
Пример #20
0
        //修改
        public int EnterpriseUpdate(Tz888.Model.Register.EnterpriseInfoModel model,
                                    Tz888.Model.Register.OrgContactModel ContactModel,
                                    List <Tz888.Model.Register.OrgContactMan> ContactManModels,
                                    List <Tz888.Model.MemberResourceModel> infoResourceModels)
        {
            SqlParameter[] parameters =
            {
                #region  公司基本信息
                new SqlParameter("@EnterpriseID",     SqlDbType.Int,         4),
                new SqlParameter("@LoginName",        SqlDbType.Char,       16),
                new SqlParameter("@EnterpriseName",   SqlDbType.VarChar,   200),
                new SqlParameter("@ComAbout",         SqlDbType.VarChar,    -1),
                new SqlParameter("@ComAboutBrief",    SqlDbType.VarChar,    -1),
                new SqlParameter("@SetComTypeID",     SqlDbType.Char,       10),
                new SqlParameter("@Industrylist",     SqlDbType.Char,       10),
                new SqlParameter("@RegisterDate",     SqlDbType.DateTime),
                new SqlParameter("@CountryCode",      SqlDbType.Char,       10),
                new SqlParameter("@ProvinceID",       SqlDbType.Char,       10),
                new SqlParameter("@CityID",           SqlDbType.Char,       10),
                new SqlParameter("@CountyID",         SqlDbType.Char,       10),
                new SqlParameter("@currency",         SqlDbType.Char,       10),
                new SqlParameter("@RegCapital",       SqlDbType.Float,       8),
                new SqlParameter("@MainProduct",      SqlDbType.VarChar,    30),
                new SqlParameter("@RequirInfo",       SqlDbType.Char,       30),
                new SqlParameter("@AuditingStatus",   SqlDbType.TinyInt,     1),
                new SqlParameter("@ExhibitionHall",   SqlDbType.VarChar,   100),
                new SqlParameter("@hits",             SqlDbType.VarChar,   100),
                new SqlParameter("@remark",           SqlDbType.VarChar,   100),
                #endregion

                #region 联系方式

                new SqlParameter("@OrganizationName", SqlDbType.VarChar,   100),
                new SqlParameter("@Name",             SqlDbType.VarChar,    20),
                new SqlParameter("@Career",           SqlDbType.VarChar,    20),
                new SqlParameter("@TelCountryCode",   SqlDbType.Char,        6),
                new SqlParameter("@TelStateCode",     SqlDbType.Char,        8),
                new SqlParameter("@TelNum",           SqlDbType.VarChar,   100),
                new SqlParameter("@FaxCountryCode",   SqlDbType.Char,        6),
                new SqlParameter("@FaxStateCode",     SqlDbType.Char,        8),
                new SqlParameter("@FaxNum",           SqlDbType.VarChar,   100),
                new SqlParameter("@Email",            SqlDbType.VarChar,    50),
                new SqlParameter("@Mobile",           SqlDbType.VarChar,    30),
                new SqlParameter("@address",          SqlDbType.VarChar,   100),
                new SqlParameter("@PostCode",         SqlDbType.VarChar,    10),
                new SqlParameter("@Website",          SqlDbType.VarChar,   200),
                new SqlParameter("@IsDel",            SqlDbType.Bit,         1),
                new SqlParameter("@remark1",          SqlDbType.VarChar, 100)
                #endregion
            };
            parameters[0].Value  = model.EnterpriseID;
            parameters[1].Value  = model.LoginName;
            parameters[2].Value  = model.EnterpriseName;
            parameters[3].Value  = model.ComAbout;
            parameters[4].Value  = model.ComAboutBrief;
            parameters[5].Value  = model.SetComTypeID;
            parameters[6].Value  = model.Industrylist;
            parameters[7].Value  = model.RegisterDate;
            parameters[8].Value  = model.CountryCode;
            parameters[9].Value  = model.ProvinceID;
            parameters[10].Value = model.CityID;
            parameters[11].Value = model.CountyID;
            parameters[12].Value = model.currency;
            parameters[13].Value = model.RegCapital;
            parameters[14].Value = model.MainProduct;
            parameters[15].Value = model.RequirInfo;
            parameters[16].Value = model.AuditingStatus;
            parameters[17].Value = model.ExhibitionHall;
            parameters[18].Value = model.hits;
            parameters[19].Value = model.remark;

            parameters[20].Value = model.EnterpriseName;; //ContactModel.Name;
            parameters[21].Value = ContactModel.Name;
            parameters[22].Value = ContactModel.Career;
            parameters[23].Value = ContactModel.TelCountryCode;
            parameters[24].Value = ContactModel.TelStateCode;
            parameters[25].Value = ContactModel.TelNum;
            parameters[26].Value = ContactModel.FaxCountryCode;
            parameters[27].Value = ContactModel.FaxStateCode;
            parameters[28].Value = ContactModel.FaxNum;
            parameters[29].Value = ContactModel.Email;
            parameters[30].Value = ContactModel.Mobile;
            parameters[31].Value = ContactModel.address;
            parameters[32].Value = ContactModel.PostCode;
            parameters[33].Value = ContactModel.Website;
            parameters[34].Value = ContactModel.IsDel;
            parameters[35].Value = ContactModel.remark;

            int rowsAffected;
            int EnterpriseID;

            using (SqlConnection sqlConn = DbHelperSQL.GetSqlConnection())
            {
                sqlConn.Open();
                SqlTransaction sqlTran = sqlConn.BeginTransaction();
                try
                {
                    //插入信息
                    DbHelperSQL.RunProcedure(sqlConn, sqlTran, "UP_EnterpriseTab_Update", parameters, out rowsAffected);
                    if (rowsAffected > 0)
                    {
                        EnterpriseID = (int)parameters[0].Value;
                    }
                    else
                    {
                        EnterpriseID = 0;
                    }

                    Tz888.SQLServerDAL.Register.common obj2 = new common();
                    if (ContactManModels != null)
                    {
                        for (int i = 0; i < ContactManModels.Count; i++)
                        {
                            if (ContactManModels[i].Name != "" && ContactManModels[i].Name != null)
                            {
                                foreach (Tz888.Model.Register.OrgContactMan cm in ContactManModels)
                                {
                                    // model.ContactID = ContactID;
                                    if (!obj2.InsertContactMan(sqlConn, sqlTran, cm))
                                    {
                                        throw new Exception();
                                    }
                                }
                            }
                        }
                    }

                    if (infoResourceModels != null)
                    {
                        //图片资源
                        Tz888.SQLServerDAL.MemberResourceDAL obj3 = new MemberResourceDAL();
                        foreach (Tz888.Model.MemberResourceModel modelRes in infoResourceModels)
                        {
                            modelRes.LoginName = model.LoginName;
                            int i = obj3.Add(sqlConn, sqlTran, modelRes);
                        }
                    }
                    sqlTran.Commit();
                }
                catch
                {
                    sqlTran.Rollback();
                    EnterpriseID = -1;
                }
                finally
                {
                    sqlConn.Close();
                }
            }
            return(EnterpriseID);
        }
    protected void buSend_Click(object sender, ImageClickEventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }
        obj  = new GovernmentRegisterBLL();
        mode = new GovernmentInfoModel();

        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      = Page.User.Identity.Name;
        mode.GovernmentName = tbGovernmentName.Text;
        mode.GovAbout       = Tz888.Common.Utility.PageValidate.TxtToHtml(tbGovAbout.Text);//公司介绍
        mode.GovAboutBrief  = "";
        mode.SubjectType    = ddlSubjectType.SelectedValue;
        mode.CountryCode    = this.ZoneSelectControl1.CountryID;
        mode.ProvinceID     = this.ZoneSelectControl1.ProvinceID;
        mode.CityID         = this.ZoneSelectControl1.CityID;
        mode.CountyID       = this.ZoneSelectControl1.CountyID;
        mode.AuditingStatus = 0;//审核状态



        //if (mode.ProvinceID == "" && mode.CountryCode.Trim() == "CN")
        //{
        //    Tz888.Common.MessageBox.Show(this.Page, "请选取更详细的注册地址");
        //    return;
        //}

        mode.ExhibitionHall = tbExhibitionHall.Text; //展厅
        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", "GovernmentRegister", 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, Page.User.Identity.Name, "", 0, tbExhibitionHall.Text.Trim(), DateTime.Now, DateTime.Now, 0, ""), new SelfCreateWeb.ParameterMap.PSelfCreateWebInfo(false, true, false, false, true, false, false, false, false));
            if (dos == SelfCreateWeb.Model.DatabaseOperationStatus.Success)
            {
                new SelfCreateWeb.BLL.BSelfCreateWebInfo().InitPageParameter(Page.User.Identity.Name, IsVip, true);
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "此域名不可用,请重新输入!");
                return;
            }
        }

        int type = 0;

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

        {
            type = 0;
        }
        else
        {
            type = 1;
        }

        int GovernmentId = Convert.ToInt32(ViewState["GovermentID"].ToString());

        if (GovernmentId == 0)
        {
            int rv = obj.GovernmentAdd(mode, ContactModel, ContactManModels, infoResourceModels);
            if (rv > 0)
            {
                Response.Redirect("OrgRegisterSucceed.aspx?type=" + type + "&reg=Gov_Add&web=" + tbExhibitionHall.Text + ".gov.");
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "此域名不可用,请重新输入!");
                return;
            }
        }
        else
        {
            mode.GovernmentID = GovernmentId;
            int rv = obj.GovernmentUpdate(mode, ContactModel, ContactManModels, infoResourceModels);
            Response.Redirect("OrgRegisterSucceed.aspx?type=" + type + "&reg=Gov_Update&web=" + tbExhibitionHall.Text + ".gov.");
        }
    }
    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";
            }
        }
    }
    protected void IbtnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        bool IsVip = false;

        if (Page.User.IsInRole("GT1002"))
        {
            IsVip = true;
        }

        //SelfCreateWeb.Model.DatabaseOperationStatus dos = new SelfCreateWeb.BLL.BSelfCreateWebInfo().AddSelfCreateWebInfo(new SelfCreateWeb.Model.MSelfCreateWebInfo(0, Page.User.Identity.Name, "", 0, this.txtExhibitionHall.Text.Trim(), DateTime.Now, DateTime.Now), new SelfCreateWeb.ParameterMap.PSelfCreateWebInfo(false, true, false, false, true,false,false));
        //2010-06-22注释掉以上的
        SelfCreateWeb.Model.DatabaseOperationStatus dos = new SelfCreateWeb.BLL.BSelfCreateWebInfo().AddSelfCreateWebInfo(new SelfCreateWeb.Model.MSelfCreateWebInfo(0, Page.User.Identity.Name, "", 0, this.txtExhibitionHall.Text.Trim(), DateTime.Now, DateTime.Now, 0, ""), new SelfCreateWeb.ParameterMap.PSelfCreateWebInfo(false, true, false, false, true, false, false, false, false));//之前的版本

        if (dos == SelfCreateWeb.Model.DatabaseOperationStatus.Success)
        {
            new SelfCreateWeb.BLL.BSelfCreateWebInfo().InitPageParameter(Page.User.Identity.Name, IsVip, true);
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "此域名不可用,请重新输入!");
            return;
        }

        Tz888.Model.Register.GovernmentInfoModel model = new GovernmentInfoModel();
        Tz888.BLL.Register.GovernmentRegisterBLL bll   = new GovernmentRegisterBLL();

        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>();     //图片资料

        //基本信息
        //model.LoginName = "heyi";
        model.LoginName = Page.User.Identity.Name;
        if (!string.IsNullOrEmpty(this.txtMerchantName.Text.Trim()))
        {
            model.GovernmentName = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtMerchantName.Text.Trim());
        }
        model.GovAbout       = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtMerchantIntro.Value.Trim());
        model.GovAboutBrief  = "";
        model.SubjectType    = ddlSubjectType.SelectedValue;
        model.CountryCode    = this.ZoneSelectControl1.CountryID;
        model.ProvinceID     = this.ZoneSelectControl1.ProvinceID;
        model.CityID         = this.ZoneSelectControl1.CityID;
        model.CountyID       = this.ZoneSelectControl1.CountyID;
        model.AuditingStatus = 0;//审核状态

        model.GovernmentID   = 0;
        model.ExhibitionHall = this.txtExhibitionHall.Text.Trim(); //展厅
        model.Hits           = 0;                                  //点击数

        model.remark = "";

        //联系信息
        ContactModel     = this.MerchantAddressInfo1.OrgContactModel;     //联系信息
        ContactManModels = this.MerchantAddressInfo1.OrgContactManModels; //联系人

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

        int rv = bll.GovernmentAdd(model, ContactModel, ContactManModels, infoResourceModels);

        if (rv > 0)
        {
            Session["IsShowTitle"] = true;
            Response.Redirect("./PublishMerchant2.aspx");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "招商机构登记失败!");
        }
    }
Пример #24
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, "请求出错");
        }
    }
Пример #25
0
        //修改
        public int GovernmentUpdate(Tz888.Model.Register.GovernmentInfoModel model,
                                    Tz888.Model.Register.OrgContactModel ContactModel,
                                    List <Tz888.Model.Register.OrgContactMan> ContactManModels,
                                    List <Tz888.Model.MemberResourceModel> infoResourceModels)
        {
            SqlParameter[] parameters =
            {
                #region 基本信息
                new SqlParameter("@GovernmentID",     SqlDbType.Int,       4),
                new SqlParameter("@LoginName",        SqlDbType.Char,     16),
                new SqlParameter("@GovernmentName",   SqlDbType.VarChar, 200),
                new SqlParameter("@GovAbout",         SqlDbType.VarChar,  -1),
                new SqlParameter("@GovAboutBrief",    SqlDbType.VarChar,  -1),
                new SqlParameter("@SubjectType",      SqlDbType.Char,     10),
                new SqlParameter("@CountryCode",      SqlDbType.Char,     10),
                new SqlParameter("@ProvinceID",       SqlDbType.Char,     10),
                new SqlParameter("@CityID",           SqlDbType.Char,     10),
                new SqlParameter("@CountyID",         SqlDbType.Char,     10),
                new SqlParameter("@AuditingStatus",   SqlDbType.TinyInt,   1),
                new SqlParameter("@hits",             SqlDbType.Int,       4),
                new SqlParameter("@ExhibitionHall",   SqlDbType.VarChar, 100),
                new SqlParameter("@remark",           SqlDbType.VarChar, 100),
                #endregion
                #region 联系方式
                new SqlParameter("@OrganizationName", SqlDbType.VarChar, 100),
                new SqlParameter("@Name",             SqlDbType.VarChar,  20),
                new SqlParameter("@Career",           SqlDbType.VarChar,  20),
                new SqlParameter("@TelCountryCode",   SqlDbType.Char,      3),
                new SqlParameter("@TelStateCode",     SqlDbType.Char,      4),
                new SqlParameter("@TelNum",           SqlDbType.VarChar,  60),
                new SqlParameter("@FaxCountryCode",   SqlDbType.Char,      3),
                new SqlParameter("@FaxStateCode",     SqlDbType.Char,      4),
                new SqlParameter("@FaxNum",           SqlDbType.VarChar,  60),
                new SqlParameter("@Email",            SqlDbType.VarChar,  50),
                new SqlParameter("@Mobile",           SqlDbType.VarChar,  30),
                new SqlParameter("@address",          SqlDbType.VarChar, 100),
                new SqlParameter("@PostCode",         SqlDbType.VarChar,  10),
                new SqlParameter("@Website",          SqlDbType.VarChar, 200),
                new SqlParameter("@IsDel",            SqlDbType.Bit,       1),
                new SqlParameter("@remark1",          SqlDbType.VarChar, 100)
                #endregion
            };
            parameters[0].Value  = model.GovernmentID;
            parameters[1].Value  = model.LoginName;
            parameters[2].Value  = model.GovernmentName;
            parameters[3].Value  = model.GovAbout;
            parameters[4].Value  = model.GovAboutBrief;
            parameters[5].Value  = model.SubjectType;
            parameters[6].Value  = model.CountryCode;
            parameters[7].Value  = model.ProvinceID;
            parameters[8].Value  = model.CityID;
            parameters[9].Value  = model.CountyID;
            parameters[10].Value = model.AuditingStatus;
            parameters[11].Value = model.Hits;
            parameters[12].Value = model.ExhibitionHall;
            parameters[13].Value = model.remark;

            parameters[14].Value = model.GovernmentName;
            parameters[15].Value = ContactModel.Name;
            parameters[16].Value = ContactModel.Career;
            parameters[17].Value = ContactModel.TelCountryCode;
            parameters[18].Value = ContactModel.TelStateCode;
            parameters[19].Value = ContactModel.TelNum;
            parameters[20].Value = ContactModel.FaxCountryCode;
            parameters[21].Value = ContactModel.FaxStateCode;
            parameters[22].Value = ContactModel.FaxNum;
            parameters[23].Value = ContactModel.Email;
            parameters[24].Value = ContactModel.Mobile;
            parameters[25].Value = ContactModel.address;
            parameters[26].Value = ContactModel.PostCode;
            parameters[27].Value = ContactModel.Website;
            parameters[28].Value = ContactModel.IsDel;
            parameters[29].Value = ContactModel.remark;


            int rowsAffected;
            int GovernmentID;

            using (SqlConnection sqlConn = DbHelperSQL.GetSqlConnection())
            {
                sqlConn.Open();
                SqlTransaction sqlTran = sqlConn.BeginTransaction();
                try
                {
                    //插入信息
                    DbHelperSQL.RunProcedure(sqlConn, sqlTran, "UP_GovernmentTab_Update", parameters, out rowsAffected);
                    if (rowsAffected > 0)
                    {
                        GovernmentID = (int)parameters[0].Value;
                    }
                    else
                    {
                        GovernmentID = 0;
                    }
                    //添加多个联系人(检查原联系人列表中是否己存在 LoginName = model.LoginName的联系人,
                    //如果己存就,将先删除全部后重新添加,obj2.InsertContactMan代码逻辑中)
                    Tz888.SQLServerDAL.Register.common obj2 = new common();
                    if (ContactManModels != null)
                    {
                        for (int i = 0; i < ContactManModels.Count; i++)
                        {
                            if (ContactManModels[i].Name != "" && ContactManModels[i].Name != null)
                            {
                                foreach (Tz888.Model.Register.OrgContactMan cm in ContactManModels)
                                {
                                    if (!obj2.InsertContactMan(sqlConn, sqlTran, cm))
                                    {
                                        throw new Exception();
                                    }
                                }
                            }
                        }
                    }
                    if (infoResourceModels != null)
                    {
                        //图片资源
                        Tz888.SQLServerDAL.MemberResourceDAL obj3 = new MemberResourceDAL();
                        foreach (Tz888.Model.MemberResourceModel modelRes in infoResourceModels)
                        {
                            modelRes.LoginName = model.LoginName;
                            int i = obj3.Add(sqlConn, sqlTran, modelRes);
                        }
                    }
                    sqlTran.Commit();
                }
                catch
                {
                    sqlTran.Rollback();
                    GovernmentID = -1;
                }
                finally
                {
                    sqlConn.Close();
                }
            }

            return(GovernmentID);
        }
    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 (Page.User.IsInRole("MT1003"))
        {
            Response.Redirect("EnterpriseRegisterResult.aspx");
        }

        if (Page.User.IsInRole("MT1001"))
        {
            Tz888.Common.MessageBox.Show(this.Page, "对不起,您是个人会员,不能进行机构登记!");
            return;
        }

        //buSend.Attributes.Add("onclick", "return chkPost();");

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

        this.ImageUploadControl1.InfoType    = "GovernmentRegister";
        this.ImageUploadControl1.IsTopfoUser = (Page.User.IsInRole("GT1002"));

        if (!Page.IsPostBack)
        {
            //展厅

            System.Collections.Generic.IList <SelfCreateWeb.Model.MSelfCreateWebInfo> finduser = new SelfCreateWeb.BLL.BSelfCreateWebInfo().GetSelfCreateWebInfo(1, 100, new string[] { "LoginName" }, new string[] { Page.User.Identity.Name });
            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;
            }

            this.ViewState["MemberLoginName"] = Page.User.Identity.Name;
            //页面信息加载
            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();

            try
            {
                contactMans = com.GetOrgContactMan(Page.User.Identity.Name);
                orgContact  = com.getContactModel(Page.User.Identity.Name);

                ///0 公司介绍(多图片)


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


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

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


            ImageUploadControl1.InfoList = infoResource;
            //机构主体
            obj = new GovernmentRegisterBLL();
            ddlSubjectType.DataSource     = obj.getMerchantTypeTab();
            ddlSubjectType.DataTextField  = "MerchantTypeName";
            ddlSubjectType.DataValueField = "MerchantTypeID";
            ddlSubjectType.DataBind();

            //文件上传
            string GM = "1001";
            switch (GM)
            {
            case "1001":
                fileDiv.Style.Add("display", "none");
                break;

            case "1002":
                fileDiv.Style.Add("display", "none");
                break;
            }

            //判断操作性质:添加,修改
            Tz888.BLL.Register.GovernmentRegisterBLL obj2 = new GovernmentRegisterBLL();
            DataTable dt = obj2.getGovernmentModel(Page.User.Identity.Name);
            this.ViewState["Domain"]      = "Add";
            this.ViewState["GovermentID"] = 0;

            if (dt != null && dt.Rows.Count > 0)//修改
            {
                ViewState["GovermentID"] = Convert.ToInt32(dt.Rows[0]["GovernmentID"]);
                //基本信息
                tbGovernmentName.Text        = dt.Rows[0]["GovernmentName"].ToString();
                ddlSubjectType.SelectedValue = dt.Rows[0]["SubjectType"].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();

                tbGovAbout.Text = Tz888.Common.Utility.PageValidate.HtmlToTxt(dt.Rows[0]["GovAbout"].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 &&dtContact.Rows.Count>0)
                //{
                //    tbGovernmentName.Text = dtContact.Rows[0]["OrganizationName"].ToString();
                //}
                this.ViewState["GovernmentID"] = 0;
            }
        }


        string loginName = this.ViewState["MemberLoginName"].ToString();

        AjaxPro.Utility.RegisterTypeForAjax(typeof(Tz888.Common.Ajax.AjaxMethod));
        tbExhibitionHall.Attributes.Add("onblur", "CheckDomain(this.value,'" + this.ViewState["MemberLoginName"].ToString() + "');");
    }
Пример #27
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));
    }
Пример #28
0
    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();

        #region  信息赋值



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

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

        #region 注册信息
        modelInfo3.MemberID          = 0;
        modelInfo3.LoginName         = this.ViewState["LoginMemberName"].ToString();
        modelInfo3.MemberName        = MemberName;
        modelInfo3.Sex               = Sex;
        modelInfo3.NickName          = NickName;
        modelInfo3.Birthday          = DateTime.Now;
        modelInfo3.CertificateID     = "";
        modelInfo3.CertificateNumber = "";
        modelInfo3.CountryCode       = "";
        modelInfo3.ProvinceID        = "";
        modelInfo3.CountyID          = "";
        modelInfo3.Address           = Address;
        modelInfo3.PostCode          = PostCode;
        modelInfo3.Tel               = txtTelCountry.Text + "-" + txtTelZoneCode.Text + "-" + txtTelNumber.Text;
        modelInfo3.Mobile            = txtMobile.Text;
        modelInfo3.FAX               = txtFaxCountry.Text + "-" + txtFaxZoneCode.Text + "-" + txtFaxNumber.Text;
        modelInfo3.Email             = txtEmail.Text;
        modelInfo3.IsSecurity        = false;
        modelInfo3.ManageTypeID      = ManageTypeID;

        string strRequirInfo = "";
        foreach (ListItem li in ChkLstRequirInfo.Items)
        {
            if (li.Selected && li.Enabled)
            {
                strRequirInfo = strRequirInfo + li.Value.ToString().Trim() + ",";
            }
        }
        if (strRequirInfo == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "请选择您的用户意向。");
        }
        modelInfo3.RequirInfo = strRequirInfo;

        modelInfo3.RequirInfoDesc = "";

        //保存头像
        string Pic1 = "";
        try
        {
            string[] UploadImgFileName = FileUploader1.SaveImages("MemberHead");

            if (UploadImgFileName.Length > 0)
            {
                Pic1 = UploadImgFileName[0];
            }
        }
        catch (Exception aa) {
            //// Response.Write(aa.ToString());
            //return;
        }
        if (this.ViewState["HeadPortrait"] != null && this.ViewState["HeadPortrait"].ToString() != "")
        {
            modelInfo3.HeadPortrait = Pic1 != "" ? Pic1 : this.ViewState["HeadPortrait"].ToString();
        }
        else
        {
            modelInfo3.HeadPortrait = Pic1 != "" ? Pic1 : "";
        }

        this.ViewState["HeadPortrait"] = modelInfo3.HeadPortrait;

        //  Response.Write(Session["HeadPortrait"].ToString());

        FileUploader1.Img        = ConfigurationManager.AppSettings["ImageDomain"].ToString() + "/" + modelInfo3.HeadPortrait;
        FileUploader1.ButtonName = "修改";
        FileUploader1.MaxPics    = 1;
        FileUploader1.IsUp       = "0";//是否通过控件上传

        #endregion

        #region 公司登记信息
        modelInfo2.ContactID        = 0;
        modelInfo2.LoginName        = this.ViewState["LoginMemberName"].ToString();
        modelInfo2.OrganizationName = txtOrganizationName.Text;
        modelInfo2.Name             = LoginName;
        modelInfo2.Career           = tbCareer.Text;
        modelInfo2.TelCountryCode   = txtTelCountry.Text;
        modelInfo2.TelStateCode     = txtTelZoneCode.Text;
        modelInfo2.TelNum           = txtTelNumber.Text;
        modelInfo2.FaxCountryCode   = txtFaxCountry.Text;
        modelInfo2.FaxStateCode     = txtFaxZoneCode.Text;
        modelInfo2.FaxNum           = txtFaxNumber.Text;
        modelInfo2.Email            = txtEmail.Text;
        modelInfo2.Mobile           = txtMobile.Text;
        modelInfo2.address          = txtAddress.Text;
        modelInfo2.PostCode         = txtPostCode.Text;
        modelInfo2.Website          = txtWebSite.Text;
        modelInfo2.IsDel            = false;
        modelInfo2.remark           = "";

        #endregion
        #endregion

        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);

        if (int1 > 0 && int2 > 0)
        {
            Tz888.Common.MessageBox.Show(this.Page, "信息修改成功!");
        }
    }
Пример #29
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 = 1001  LoginName
        if (Request.QueryString["LoginName"] != null)
        {
            // ManageTypeID=Request.QueryString["ManageTypeID"] ;
            LoginName = Request.QueryString["LoginName"].ToString().Trim();
            //注册信息
            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();
            //会员登陆信息
            Tz888.SQLServerDAL.Conn obj4 = new Tz888.SQLServerDAL.Conn();
            // DataTable dt4 = obj4.GetList("LoginLogTab", "LoginTime", "LoginTime", 1, 1, 1, 1, "LoginName='"+LoginName+"'");
            //会员发布信息
            //  DataTable dt5 = obj4.GetList("MainInfoViw", "Title,PublishT,HtmlFile", "PublishT", 1000, 1, 0, 1, "LoginName='" + LoginName + "' ");

            DataTable dt1 = obj1.GetLoginInfoList("*", "LoginName='" + LoginName + "'", "LoginName");
            model2 = obj2.getContactModel(LoginName);

            model3 = obj3.GetModel("LoginName='" + LoginName + "'");

            if (dt1.Rows.Count > 0)
            {
                #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:
                    break;
                }

                string   req       = dt1.Rows[0]["RequirInfo"].ToString().Trim();
                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 (model2 != null)
            {
                lbCareer.Text           = model2.Career;
                lbOrganizationName.Text = model2.OrganizationName != "" ? model2.OrganizationName : "暂无";

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

                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 (model3 != null)
            {
                lbSex.Text = model3.Sex ? "(女)" : "(男)";
                try
                {
                    imgHead.ImageUrl = model3.HeadPortrait.ToString() != "" ? ConfigurationManager.AppSettings["ImageDomain"].ToString() + "/" + model3.HeadPortrait.ToString() : @"../images/publish/noneimg.gif";
                }
                catch { imgHead.ImageUrl = @"../images/publish/noneimg.gif"; }
                lbTel.Text   = model3.Tel;
                lbMoble.Text = model3.Mobile;
                lbFax.Text   = model3.FAX;
            }
            else
            {
                imgHead.ImageUrl = @"../images/publish/noneimg.gif";
            }
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "请求出错");
        }
        #endregion
    }
Пример #30
0
 //会员信息修改时 添加登记默认联系人
 public long OrgContactMan_FromMemberMessage(Tz888.Model.Register.OrgContactModel model)
 {
     return(dal.OrgContactMan_FromMemberMessage(model));
 }