protected void btnModifyPwd_Click(object sender, EventArgs e)
    {
        //验证用户名与密码是否正确
        int       ErrorID      = 0;
        string    ErrorMsg     = "";
        DataTable dt           = new DataTable();
        string    strLoginName = Page.User.Identity.Name;
        string    strPassword  = txtOldPwd.Text.Trim();

        Tz888.BLL.Login.LoginInfoBLL           obj  = new Tz888.BLL.Login.LoginInfoBLL();
        Tz888.SQLServerDAL.LoginInfo.LoginInfo obj2 = new Tz888.SQLServerDAL.LoginInfo.LoginInfo();
        dt = obj.Authenticate(strLoginName, 0, strPassword, true, ref ErrorID, ref ErrorMsg);

        if (dt.Rows.Count > 0)
        {
            string strNewPassword = txtNewPwd.Text.Trim();
            //修改密码
            if (obj2.ChangePassword(strLoginName, strNewPassword))
            {
                Tz888.Common.MessageBox.Show(this.Page, "修改成功!");
            }
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "您输入的旧密码不正确!");
        }
    }
Example #2
0
    protected void IbtnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        int       ErrorID      = 0;
        string    ErrorMsg     = "";
        DataTable dt           = new DataTable();
        string    strLoginName = Page.User.Identity.Name;
        string    strPassword  = txtUserPwd.Value.ToString().Trim();

        Tz888.BLL.Login.LoginInfoBLL            obj            = new Tz888.BLL.Login.LoginInfoBLL();
        Tz888.SQLServerDAL.LoginInfo.LoginInfo  obj2           = new Tz888.SQLServerDAL.LoginInfo.LoginInfo();
        List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>(); //融资行业实体列表

        dt = obj.Authenticate(strLoginName, 0, strPassword, true, ref ErrorID, ref ErrorMsg);

        if (dt.Rows.Count > 0)
        {
            industryModels = this.SelectIndustryControl1.IndustryModels;

            SHA1     sha1      = SHA1.Create();
            byte[]   passWord2 = sha1.ComputeHash(Encoding.Unicode.GetBytes(this.txtUserPwd.Value.ToString().Trim()));
            string   name      = Page.User.Identity.Name;
            string[] num       = member.SelMemberNews(name).Split('&');

            company.UserName    = name;                                                                                                                              //用户名
            company.UserPwd     = passWord2;                                                                                                                         //密码
            company.TelPhone    = txtTelCountry.Value.ToString().Trim() + "-" + txtTelZoneCode.Value.ToString().Trim() + "-" + txtTelNumber.Value.ToString().Trim(); //电话号码
            company.Mobile      = txtMobile.Value.ToString().Trim();                                                                                                 //手机号码
            company.Email       = txtEmail.Value.ToString().Trim();                                                                                                  //电子邮箱
            company.Audit       = 0;                                                                                                                                 //审核状态
            company.StartTime   = DateTime.Now;                                                                                                                      //发布时间
            company.Valid       = 0;                                                                                                                                 //展厅有效期
            company.CompanyName = txtCompanyName.Value.ToString().Trim();                                                                                            //企业名称
            company.Typename    = num[6].ToString();                                                                                                                 //所属类型
            company.Countrycode = ZoneSelectControl1.CountryID;
            company.Provinceid  = ZoneSelectControl1.ProvinceID;
            company.Cityid      = ZoneSelectControl1.CityID;
            company.Countyid    = ZoneSelectControl1.CountyID;
            company.OrderId     = 0;
            //结束处
            foreach (Tz888.Model.Common.IndustryModel model in industryModels)
            {
                company.Industry += model.IndustryBID + ",";
            }

            company.Recomm = "推荐地方";
            int add = show.tzAddShow(company);
            if (add != 1)
            {
                Tz888.Common.MessageBox.Show(this.Page, "添加失败");
            }
            else
            {
                Tz888.Common.MessageBox.ShowAndHref("添加成功", "tzPost.aspx");
            }
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "您输入密码不正确,请重新输入!");
        }
    }
    private void SetTopInfo()
    {
        //string name = "liulixing";
        string name = "tz888admin";
        // string name = Page.User.Identity.Name;
        DataTable dtUser = dal.GetList("LoginInfoTab", "NickName,ManageTypeID,MemberGradeID", "LoginId", 1, 1, 0, 1, "LoginName='" + name + "'");

        if (!string.IsNullOrEmpty(dtUser.Rows[0]["NickName"].ToString()))
        {
            lblUserName.Text = dtUser.Rows[0]["NickName"].ToString();
        }
        else
        {
            lblUserName.Text = name.Trim();
        }

        DataTable dt = new DataTable();

        Tz888.BLL.Login.LoginInfoBLL bllLoginInfo = new Tz888.BLL.Login.LoginInfoBLL();
        dt = bllLoginInfo.GetLoginInfoByLoginName(name.Trim());
        try
        {
            if (dt != null && dt.Rows.Count > 0)
            {
                lblInfoCount.Text   = "(" + dt.Rows[0]["TodayInfoCount"].ToString().Trim() + ")";
                lblMemberCount.Text = "(" + dt.Rows[0]["TodayMemberCount"].ToString().Trim() + ")";
            }
        }
        catch { }
    }
Example #4
0
    //登陆
    public void doLogin()
    {
        #region //会员登录


        //验证用户名与密码是否正确
        int    ErrorID  = 0;
        string ErrorMsg = "";
        Tz888.BLL.Login.LoginInfoBLL loginRule = new Tz888.BLL.Login.LoginInfoBLL();
        DataTable dt = new DataTable();
        strLoginName = txtLoginName.Value.Trim();
        strPassword  = txtPassWord.Value.Trim();
        dt           = loginRule.Authenticate(
            strLoginName,
            0,
            strPassword,
            false,
            ref ErrorID,
            ref ErrorMsg);
        if (dt.Rows.Count > 0)
        {
            strRoleName = dt.Rows[0]["RoleName"].ToString().Trim();
        }
        if ((dt.Rows.Count > 0) && (strRoleName == "0")) //
        {
            InsertLoginLog(strLoginName, strRoleName);
            //BBS登录
            //Tz888DZLogin.BBSLogin(dt.Rows[0]["NickName"].ToString().Trim(), txtPsd.Text.Trim(), dt.Rows[0]["email"].ToString().Trim());
            //分配验证票,同时建立角色信息
            LoginInfoBLL.SetUserFormsCookie(strLoginName, dt.Rows[0]["MemberGradeID"].ToString().Trim(), dt.Rows[0]["ManageTypeID"].ToString().Trim(), true);

            if (!(HttpContext.Current.User == null))
            {
                if (HttpContext.Current.User.Identity.AuthenticationType == "Forms")
                {
                    System.Web.Security.FormsIdentity id;
                    id = (System.Web.Security.FormsIdentity)HttpContext.Current.User.Identity;
                    String[] myRoles = new String[4];
                    myRoles[0] = "1001";
                    myRoles[1] = "1002";
                    myRoles[2] = "1003";
                    myRoles[3] = "1004";
                    HttpContext.Current.User = new System.Security.Principal.GenericPrincipal(id, myRoles);
                }
            }
            divLogin.Visible   = false;
            divLoginOk.Visible = true;
            lblNickName.Text   = dt.Rows[0]["NickName"].ToString();
        }
        else
        {
            InsertLoginErrorLog(strLoginName);

            if (dt.Rows.Count == 0)
            {
                Tz888.Common.MessageBox.ShowAndHref("您输入的用户名或密码不正确,请重新登录!", this.Request.Url.ToString());
            }
        }
        #endregion
    }
Example #5
0
    private void InsertLoginLog(string strLoginName, string strRoleName)
    {
        DateTime dtLoginTime = DateTime.Now;
        string   strLoginIP  = Request.UserHostAddress;

        Tz888.BLL.Login.LoginInfoBLL loginRule = new Tz888.BLL.Login.LoginInfoBLL();
        loginRule.CreateLoginLog(strLoginName, strRoleName, dtLoginTime, strLoginIP);
    }
    private void SetTopInfo()
    {
        DataTable dtUser = dal.GetList("LoginInfoTab", "NickName,ManageTypeID,MemberGradeID", "LoginId", 1, 1, 0, 1, "LoginName='262734254'");

        if (!string.IsNullOrEmpty(dtUser.Rows[0]["NickName"].ToString()))
        {
            lblUserName.Text = dtUser.Rows[0]["NickName"].ToString();
        }
        else
        {
            lblUserName.Text = Page.User.Identity.Name.Trim();
        }

        //try
        //{
        //    if (!string.IsNullOrEmpty(dtUser.Rows[0]["NickName"].ToString()))
        //    {
        //        lblUserName.Text = dtUser.Rows[0]["NickName"].ToString();
        //    }
        //    else { lblUserName.Text = Page.User.Identity.Name.Trim(); }

        //    if (dtUser.Rows[0]["MemberGradeID"].ToString() == "1")
        //    {
        //        lblMemberGrade.Text = "拓富通试用会员";
        //    }
        //    //else
        //    //{
        //    //    lblMemberGrade.Text = "拓富通会员";
        //    //    if (memgrade == "3")
        //    //    {
        //    //        lblMemberGrade.Text = "拓富通银牌会员";
        //    //    }
        //    //    if (memgrade == "4")
        //    //    {
        //    //        lblMemberGrade.Text = "拓富通金牌会员";
        //    //    }
        //    //    if (memgrade == "5")
        //    //    {
        //    //        lblMemberGrade.Text = "拓富通钻石会员";
        //    //    }

        //    //}
        //}
        //catch { lblUserName.Text = Page.User.Identity.Name.Trim(); }
        DataTable dt = new DataTable();

        Tz888.BLL.Login.LoginInfoBLL bllLoginInfo = new Tz888.BLL.Login.LoginInfoBLL();
        dt = bllLoginInfo.GetLoginInfoByLoginName("262734254");
        try
        {
            if (dt != null && dt.Rows.Count > 0)
            {
                lblInfoCount.Text   = "(" + dt.Rows[0]["TodayInfoCount"].ToString().Trim() + ")";
                lblMemberCount.Text = "(" + dt.Rows[0]["TodayMemberCount"].ToString().Trim() + ")";
            }
        }
        catch { }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        model2 = new Tz888.Model.Register.MemberInfoModel();
        obj1   = new Tz888.BLL.Login.LoginInfoBLL();                 //注册信息
        obj2   = new Tz888.BLL.Register.MemberInfoBLL();             //会员信息表

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

        if (!IsPostBack)
        {
            //databind();
            databind2();
        }
    }
    //初始化联络人信息
    private void InitInfoContact()
    {
        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();
        Tz888.BLL.Login.LoginInfoBLL         obj1  = new Tz888.BLL.Login.LoginInfoBLL();
        DataTable dt1 = obj1.GetLoginInfoList("*", "LoginName='" + this.ViewState["LoginMemberName"].ToString() + "'", "LoginName");

        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();
                }
            }
        }
    }
Example #9
0
    private int GetUserGrad(string InfoID)
    {
        Tz888.BLL.Conn Conobj = new Tz888.BLL.Conn();
        DataTable      dt     = Conobj.GetList("MainInfoTab", "LoginName", "InfoID", 1, 1, 0, 0, "infoid=" + InfoID);

        if (dt != null && dt.Rows.Count > 0)
        {
            string LoginName = Convert.ToString(dt.Rows[0]["LoginName"]);
            Tz888.BLL.Login.LoginInfoBLL loginBll = new Tz888.BLL.Login.LoginInfoBLL();
            string UserGradeTypeID = loginBll.GetUserGradeTypeIDByLoginName(LoginName);
            if (UserGradeTypeID == "1001")
            {
                //普通用户模板
                return(0);
            }
            else
            {
                //VIP会员模板
                return(1);
            }
        }
        return(-1);
    }
Example #10
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, "信息修改成功!");
        }
    }
    protected void btnDC_Click(object sender, EventArgs e)
    {
        //单位名称    联系人         手机     电话     邮箱     会员类型
        //contacname  membername     mobile        tel      Email    managetypeid
        RetureWhere();
        Tz888.BLL.Visit.VisitInfoBLL visit = new Tz888.BLL.Visit.VisitInfoBLL();
        DataTable dt = visit.SelDataTable(ViewState["Criteria"].ToString());

        Tz888.BLL.Login.LoginInfoBLL obj1 = new Tz888.BLL.Login.LoginInfoBLL();
        HSSFWorkbook hssfworkbook         = new HSSFWorkbook();
        DocumentSummaryInformation dsi    = PropertySetFactory.CreateDocumentSummaryInformation();

        dsi.Company = "深圳拓富投资有限公司";
        SummaryInformation si = PropertySetFactory.CreateSummaryInformation();

        si.Subject = "会员管理";
        si.Author  = "颜品庄";


        si.CreateDateTime = DateTime.Now;
        hssfworkbook.DocumentSummaryInformation = dsi;
        hssfworkbook.SummaryInformation         = si;

        HSSFSheet sheet1 = hssfworkbook.CreateSheet("Sheet1");
        //sheet1.DefaultColumnWidth=10;设置列宽
        HSSFRow row = sheet1.CreateRow(0);


        row.CreateCell(0).SetCellValue("单位名称");
        row.CreateCell(1).SetCellValue("联系人");
        row.CreateCell(2).SetCellValue("手机");
        row.CreateCell(3).SetCellValue("电话");
        row.CreateCell(4).SetCellValue("邮件");
        row.CreateCell(5).SetCellValue("会员类型");

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            HSSFRow row0 = sheet1.CreateRow(i + 1);

            DataTable dt1 = obj1.GetLoginInfoList("*", " LoginID=" + dt.Rows[i]["LoginID"].ToString() + " ", "LoginName");
            row0.CreateCell(0).SetCellValue(dt1.Rows[0]["contactname"].ToString());
            row0.CreateCell(1).SetCellValue(dt.Rows[i]["membername"].ToString());
            row0.CreateCell(2).SetCellValue(dt.Rows[i]["mobile"].ToString());
            row0.CreateCell(3).SetCellValue(dt.Rows[i]["tel"].ToString());
            row0.CreateCell(4).SetCellValue(dt.Rows[i]["Email"].ToString());
            row0.CreateCell(5).SetCellValue(visit.SelManageType(dt.Rows[i]["managetypeid"].ToString()));
        }
        string t1 = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString();

        string filename = "attachment;filename=" + System.Web.HttpUtility.UrlEncode("会员表" + t1, System.Text.Encoding.UTF8) + ".xls";

        Response.ContentType = "application/vnd.ms-excel";
        Response.AppendHeader("Content-Disposition", filename);
        Response.Clear();

        MemoryStream filestream = new MemoryStream();

        hssfworkbook.Write(filestream);

        Response.BinaryWrite(filestream.GetBuffer());
        Response.End();

        #region

        //RetureWhere();
        //DataTable d = new DataTable();
        //DataTable dt = new DataTable();
        //dt.Columns.Add("编号", typeof(String));
        //dt.Columns.Add("用户名", typeof(String));
        //dt.Columns.Add("邮箱", typeof(String));
        //dt.Columns.Add("座机", typeof(String));
        //dt.Columns.Add("手机", typeof(String));
        //dt.Columns.Add("会员类型", typeof(String));

        //string sql = "select * from MemberLoginInfoView" + (string.IsNullOrEmpty(ViewState["Criteria"].ToString()) ? "" : " where " + ViewState["Criteria"].ToString());
        //this.Page.RegisterStartupScript("K", "<script>alert('" + sql + "')</script>");
        //string connStr = ConfigurationManager.ConnectionStrings["SQLConnString1"].ToString();
        //using (SqlConnection con = new SqlConnection(connStr))
        //{
        //    SqlCommand com = new SqlCommand();
        //    com.CommandText = sql;
        //    com.Connection = con;
        //    con.Open();
        //    SqlDataAdapter dp = new SqlDataAdapter();
        //    dp.SelectCommand = com;
        //    dp.Fill(d);
        //};

        //foreach (DataRow r in d.Rows)
        //{
        //    DataRow dr = dt.NewRow();
        //    dr["编号"] = r["MemberID"].ToString();
        //    dr["用户名"] = r["LoginName"].ToString();
        //    dr["邮箱"] = r["Email"].ToString();
        //    dr["座机"] = r["Tel"].ToString();
        //    dr["手机"] = r["Mobile"].ToString();
        //    dr["会员类型"] = GetType(r["ManageTypeID"].ToString());
        //    dt.Rows.Add(dr);
        //}

        //HSSFWorkbook hssfworkbook = new HSSFWorkbook();
        //DocumentSummaryInformation dsi = PropertySetFactory.CreateDocumentSummaryInformation();
        //dsi.Company = "深圳拓富投资有限公司";
        //SummaryInformation si = PropertySetFactory.CreateSummaryInformation();
        //si.Subject = "会员管理";
        //si.Author = "颜品庄";

        //si.CreateDateTime = DateTime.Now;
        //hssfworkbook.DocumentSummaryInformation = dsi;
        //hssfworkbook.SummaryInformation = si;

        //HSSFSheet sheet1 = hssfworkbook.CreateSheet("Sheet1");
        //HSSFRow row = sheet1.CreateRow(0);
        //row.CreateCell(0).SetCellValue("编号");
        //row.CreateCell(1).SetCellValue("用户名");
        //row.CreateCell(2).SetCellValue("邮箱");
        //row.CreateCell(3).SetCellValue("座机");
        //row.CreateCell(4).SetCellValue("手机");
        //row.CreateCell(5).SetCellValue("会员类型");

        ////单位名称    联系人         手机     电话     邮箱     会员类型
        ////contacname  membername     mobile        tel      Email    managetypeid
        //for (int i = 0; i < dt.Rows.Count; i++)
        //{
        //    HSSFRow row0 = sheet1.CreateRow(i + 1);
        //    row0.CreateCell(0).SetCellValue(dt.Rows[i]["编号"].ToString());
        //    row0.CreateCell(1).SetCellValue(dt.Rows[i]["用户名"].ToString());
        //    row0.CreateCell(2).SetCellValue(dt.Rows[i]["邮箱"].ToString());
        //    row0.CreateCell(3).SetCellValue(dt.Rows[i]["座机"].ToString());
        //    row0.CreateCell(4).SetCellValue(dt.Rows[i]["手机"].ToString());
        //    row0.CreateCell(5).SetCellValue(dt.Rows[i]["会员类型"].ToString());
        //}
        //string t1 = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString();

        //string filename = "attachment;filename=" + System.Web.HttpUtility.UrlEncode("会员表" + t1, System.Text.Encoding.UTF8) + ".xls";
        //Response.ContentType = "application/vnd.ms-excel";
        //Response.AppendHeader("Content-Disposition", filename);
        //Response.Clear();

        //MemoryStream filestream = new MemoryStream();
        //hssfworkbook.Write(filestream);

        //Response.BinaryWrite(filestream.GetBuffer());
        //Response.End();

        #endregion
    }
Example #12
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, "请求出错");
        }
    }
Example #13
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));
    }
    protected void IbtnSubmit_Click(object sender, EventArgs e)
    {
        //20090811 判断权限
        Tz888.BLL.Login.LoginInfoBLL loginbll = new Tz888.BLL.Login.LoginInfoBLL();
        bool yanzheng = loginbll.yanzheng(fz_LoginName);

        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();                  //创建投资信息实体

        Tz888.Model.Info.InfoContactModel infoContactModel = new Tz888.Model.Info.InfoContactModel();                            //创建信息联系方式主体

        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;

        //主体信息实体付值
        //联系2010-06-29
        infoContactModel = this.CapitalAddressInfo1.InfoContact;

        #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;
        //投资项目阶段
        //2010-06-23

        capitalInfoModel.stageID = Convert.ToInt32(this.rblStage.SelectedValue);
        // 是否参与项目方管理
        //2010-06-23
        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 = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtDemand.Value.Trim());

        //添加所属区域

        //capitalInfoModel.SCountryID = this.ZoneSelectControl1.CountryID;
        //capitalInfoModel.SProvinceID = this.ZoneSelectControl1.ProvinceID;
        //capitalInfoModel.SCityID = this.ZoneSelectControl1.CityID;
        //capitalInfoModel.SCountyID = this.ZoneSelectControl1.CountyID;
        capitalInfoModel.SCountryID  = "001";
        capitalInfoModel.SProvinceID = "001";
        capitalInfoModel.SCityID     = "001";
        capitalInfoModel.SCountyID   = "001";



        //项目承办单位
        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          = fz_LoginName; //用户名称
        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;
        //意向有效期限
        //20100623
        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, infoContactModel, 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, "发布失败!");
        }
    }
    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";
            }
        }
    }
Example #16
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 btnSubmit_ServerClick(object sender, EventArgs 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, "未知错误!");
        }
        //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();                                  //创建短信息实体


        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;
        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 + ",";
            }
        }
        #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          = 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);


        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()));
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
Example #18
0
    protected void BtnOk_Click(object sender, ImageClickEventArgs e)
    {
        //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.ProjectSetModel model = new Tz888.Model.Info.ProjectSetModel();


        model.ProjectInfoModel.CountryCode           = this.ZoneSelectControl1.CountryID;
        model.ProjectInfoModel.ProvinceID            = this.ZoneSelectControl1.ProvinceID;
        model.ProjectInfoModel.CityID                = this.ZoneSelectControl1.CityID;
        model.ProjectInfoModel.CountyID              = this.ZoneSelectControl1.CountyID;
        model.ProjectInfoModel.ProjectName           = this.txtProjectName.Value.Trim();
        model.ProjectInfoModel.RecTime               = DateTime.Now;
        model.ProjectInfoModel.CapitalCurrency       = "CNY";
        model.ProjectInfoModel.ProjectCurrency       = "CNY";
        model.ProjectInfoModel.CooperationDemandType = "10";
        //新属性

        model.ProjectInfoModel.financingID    = rbtnObj.SelectedValue;
        model.ProjectInfoModel.SellStockShare = Convert.ToInt32(txtSellStockShare.Text);
        string returnmodelid = "4";//退出方式

        for (int i = 0; i < chkReturn.Items.Count; i++)
        {
            if (chkReturn.Items[i].Selected)
            {
                returnmodelid += chkReturn.Items[i].Value + ",";
            }
        }
        model.ProjectInfoModel.ReturnModeID       = returnmodelid;
        model.ProjectInfoModel.ProjectAbout       = txtProjectAbout.Value.Trim();
        model.ProjectInfoModel.marketAbout        = txtMarketAbout.Value.Trim();
        model.ProjectInfoModel.competitioAbout    = txtCompetitioAbout.Value.Trim();
        model.ProjectInfoModel.BussinessModeAbout = txtBussinessModeAbout.Value.Trim();
        model.ProjectInfoModel.ManageTeamAbout    = txtManageTeamAbout.Value.Trim();

        if (!string.IsNullOrEmpty(this.txtCapitalTotal.Text.Trim()))
        {
            model.ProjectInfoModel.CapitalTotal = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim());
        }
        model.ProjectInfoModel.CapitalID = this.rbtnCapital.SelectedValue;

        model.ProjectInfoModel.ComAbout    = Tz888.Common.Utility.PageValidate.TxtToHtml(Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProIntro.Value.Trim()));
        model.ProjectInfoModel.IndustryBID = this.SelectIndustryControl1.IndustryString;



        model.ProjectInfoModel.ProjectNameBrief = ViewState["ProjectNameBrief"].ToString();

        model.MainInfoModel.InfoID = Convert.ToInt64(this.ViewState["InfoID"]);
        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
        {
            model.MainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        }
        model.MainInfoModel.publishT  = Convert.ToDateTime(this.ViewState["PublishT"]);
        model.MainInfoModel.LoginName = Page.User.Identity.Name;
        //model.MainInfoModel.KeyWord = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(keyword);
        model.MainInfoModel.Descript          = "";
        model.MainInfoModel.DisplayTitle      = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        model.MainInfoModel.FrontDisplayTime  = System.DateTime.Now;
        model.MainInfoModel.ValidateStartTime = System.DateTime.Now;
        model.MainInfoModel.ValidateTerm      = Convert.ToInt32(this.rbtnValiDate.SelectedValue.Trim());
        model.MainInfoModel.TemplateID        = "001";
        model.MainInfoModel.HtmlFile          = ViewState["HtmlFile"].ToString();

        model.ShortInfoModel.ShortInfoControlID = Convert.ToString(ViewState["ShortInfoControlID"]);
        model.ShortInfoModel.ShortTitle         = ViewState["ShortTitle"].ToString();
        model.ShortInfoModel.ShortContent       = ViewState["ShortContent"].ToString();
        model.ShortInfoModel.Remark             = "";

        //联系信息
        model.InfoContactModel.OrganizationName = txtCompanyName.Value.Trim();
        model.InfoContactModel.Name             = txtLinkMan.Value.Trim();
        model.InfoContactModel.Career           = txtCareer.Value.Trim();
        model.InfoContactModel.TelStateCode     = txtTelStateCode.Value.Trim();
        model.InfoContactModel.TelNum           = txtTel.Value.Trim();
        model.InfoContactModel.Mobile           = txtMobile.Value.Trim();
        model.InfoContactModel.Email            = txtEmail.Value.Trim();
        model.InfoContactModel.Address          = txtAddress.Value.Trim();
        model.InfoContactModel.WebSite          = txtWebSite.Value.Trim();

        Tz888.BLL.Info.ProjectInfoBLL bll = new Tz888.BLL.Info.ProjectInfoBLL();

        // bool b = bll.ProjectInfoGQ_Update(model);

        //修改附件
        Tz888.BLL.Info.InfoResourceBLL obj2 = new Tz888.BLL.Info.InfoResourceBLL();
        obj2.DeleteByInfoID(_infoid);
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>();

        infoResourceModels = this.FilesUploadControl1.InfoList;
        if (infoResourceModels != null)
        {
            model.InfoResourceModels.AddRange(infoResourceModels);
        }
        if (infoResourceModels != null)
        {
            foreach (Tz888.Model.Info.InfoResourceModel ResModel in infoResourceModels)
            {
                ResModel.InfoID = _infoid;
                obj2.Insert(ResModel);
            }
        }


        //if (b)
        //{
        //    bool isTof = Page.User.IsInRole("GT1002");
        //    if (isTof)
        //    {
        //        if (string.IsNullOrEmpty(model.MainInfoModel.HtmlFile.Trim()))
        //            model.MainInfoModel.HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Project", model.MainInfoModel.InfoCode, model.MainInfoModel.InfoID);
        //        Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
        //        mainBll.HasHtmlFile(model.MainInfoModel.InfoID, model.MainInfoModel.HtmlFile);
        //        string actionMsg = "";
        //        Tz888.BLL.PageStatic.ProjectPageStatic staticobj = new Tz888.BLL.PageStatic.ProjectPageStatic();
        //        staticobj.CreateStaticPageProject(model.MainInfoModel.InfoID.ToString(), ref actionMsg);
        //    }
        //    Tz888.Common.MessageBox.ShowAndHref("修改信息成功!", Request.Url.ToString());

        //}
        //else
        //    Tz888.Common.MessageBox.ShowAndHref("修改信息失败!", Request.Url.ToString());
    }
Example #19
0
    protected void BtnOk_Click(object sender, ImageClickEventArgs e)
    {
        //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-


        ///--------------------------------------------------
        ///--验证提交的验证码并清空验证码
        ///--------------------------------------------------
        string vercode   = Request.Form["vercode"];
        string strRndNum = "";

        //SESSION丢失
        if (Session["valationNo"] == null)
        {
            Response.Write("<script>alert('操作超时!请刷新页面!');</script>");
            return;
        }
        else
        {
            if (vercode.Trim() == "")
            {
                Response.Write("<script>alert('验证码不能为空,请重新提交!');</script>");
                return;
            }
            else
            {
                strRndNum = Session["valationNo"].ToString();
                if (vercode.Trim() != "" && vercode.Trim().ToLower() == strRndNum.ToLower())
                {
                    Session["valationNo"] = "";
                }
                else
                {
                    Response.Write("<script>alert('验证码错误,请重新提交!');</script>");
                    return;
                }
            }
        }



        string IPAddress = String.Empty;

        IPAddress = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (null == IPAddress || IPAddress == String.Empty)
        {
            IPAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
        }
        if (null == IPAddress || IPAddress == String.Empty)
        {
            IPAddress = HttpContext.Current.Request.UserHostAddress;
        }

        ipAddressForInfo.ipAddressForInfo obj = new ipAddressForInfo.ipAddressForInfo();

        DataSet ds = new DataSet();

        ds = obj.readIPAddress(Page.User.Identity.Name, IPAddress);

        if (ds.Tables["projectinfoIP"].Rows.Count != 0)
        {
            DateTime dtForDB     = Convert.ToDateTime(ds.Tables["projectinfoIP"].Rows[0]["postdate"].ToString());
            DateTime dtForClient = Convert.ToDateTime(DateTime.Now);

            TimeSpan ts = dtForClient - dtForDB;

            if ((int)ts.TotalMinutes <= 3)
            {
                Response.Write("三分钟内不允许重复发布信息!");
                Response.End();
            }

            //if (ds.Tables["projectinfoIP"].Rows.Count >= 5)
            //{
            //    Response.Write("当天只能发布5条记录");
            //    Response.End();
            //}
        }

        Tz888.BLL.Info.ProjectInfoBLL           projectObj       = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.MainInfoModel          mainInfoModel    = new Tz888.Model.Info.MainInfoModel();          //创建主体信息实体
        Tz888.Model.Info.ProjectInfoModel       projectInfoModel = new Tz888.Model.Info.ProjectInfoModel();       //创建融资信息实体
        Tz888.Model.Info.ShortInfoModel         sortInfoModel    = new Tz888.Model.Info.ShortInfoModel();         //创建短信息实体
        List <Tz888.Model.Common.IndustryModel> industryModels   = new List <Tz888.Model.Common.IndustryModel>(); //融资行业实体列表
        DateTime time_Now = DateTime.Now;

        industryModels = this.SelectIndustryControl1.IndustryModels;

        projectInfoModel.CountryCode     = this.ZoneSelectControl1.CountryID;
        projectInfoModel.ProvinceID      = this.ZoneSelectControl1.ProvinceID;
        projectInfoModel.CityID          = this.ZoneSelectControl1.CityID;
        projectInfoModel.CountyID        = this.ZoneSelectControl1.CountyID;
        projectInfoModel.ProjectName     = this.txtProjectName.Value.Trim();
        projectInfoModel.RecTime         = DateTime.Now;
        projectInfoModel.CapitalCurrency = "CNY";
        projectInfoModel.ProjectCurrency = "CNY";

        if (!string.IsNullOrEmpty(this.txtCapitalTotal.Text.Trim()))
        {
            projectInfoModel.CapitalTotal = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim()); //投资总额
        }
        projectInfoModel.CapitalID = this.rbtnCapital.SelectedValue.Trim();                      //融资金额
        //项目说明
        projectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtProIntro.Value.Trim());
        //行业
        foreach (Tz888.Model.Common.IndustryModel model in industryModels)
        {
            projectInfoModel.IndustryBID += model.IndustryBID + ",";
        }
        projectInfoModel.CooperationDemandType = "9";//债券融资

        projectInfoModel.financingID = rbtnObj.SelectedValue;

        projectInfoModel.warrant = txtWarrant.Value.Trim();   //融资担保

        projectInfoModel.financingID = rbtnObj.SelectedValue; //融资对象

        //-----------------------------------主表信息-------------
        if (!string.IsNullOrEmpty(this.txtProjectName.Value))
        {
            mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value);
        }

        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Project", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, time_Now);
        mainInfoModel.publishT = time_Now;
        mainInfoModel.Hit      = 0;

        mainInfoModel.IsCore             = true;
        mainInfoModel.LoginName          = Page.User.Identity.Name;
        mainInfoModel.InfoOriginRoleName = "0"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = "1";
        mainInfoModel.FeeStatus          = 0;
        mainInfoModel.ValidateTerm       = Convert.ToInt32(rbtnValiDate.SelectedValue);
        string keyword = "";

        mainInfoModel.Descript = "";
        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        }
        mainInfoModel.FrontDisplayTime  = time_Now;
        mainInfoModel.ValidateStartTime = time_Now;
        mainInfoModel.ValidateTerm      = Convert.ToInt32(this.rbtnValiDate.SelectedValue.Trim());
        mainInfoModel.TemplateID        = "001";
        mainInfoModel.HtmlFile          = "";

        //------------------------
        sortInfoModel.ShortInfoControlID = "ProjectIndex1";
        sortInfoModel.ShortTitle         = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        sortInfoModel.ShortContent       = "";
        sortInfoModel.Remark             = "";

        string theURL = Request.CurrentExecutionFilePath;

        long infoID = projectObj.PublishProjectZQ1(mainInfoModel, projectInfoModel, sortInfoModel);

        obj.insertIPAddress(infoID, Page.User.Identity.Name, theURL, IPAddress, DateTime.Now); //将用户IP地址入库

        if (infoID > 0)
        {
            bool isTof = Page.User.IsInRole("GT1002");
            if (isTof)
            {
                string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Project", mainInfoModel.InfoCode, infoID);
                Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
                mainBll.HasHtmlFile(infoID, HtmlFile);
                string actionMsg = "";
                Tz888.BLL.PageStatic.ProjectPageStatic staticobj = new Tz888.BLL.PageStatic.ProjectPageStatic();
                staticobj.CreateStaticPageProject(infoID.ToString(), ref actionMsg);
            }
            Response.Redirect("zq2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Project|" + this.txtProjectName.Value.Trim() + "|" + projectInfoModel.CooperationDemandType));
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
Example #20
0
    //注册
    private void SaveUserDoc()
    {
        //检查登录名是否重名
        if (CheckLoginUserName(txtLoginName.Text.Trim()))
        {
            Tz888.Common.MessageBox.Show(this, "该用户名已经存在,请使用其它用户名!");
            txtLoginName.Focus();
            //txtLoginName.Text = "";
            return;
        }

        //Employeeinfotab表
        Tz888.BLL.Sys.EmployeeInfoTab   empBll   = new Tz888.BLL.Sys.EmployeeInfoTab();
        Tz888.Model.Sys.EmployeeInfoTab empModel = new Tz888.Model.Sys.EmployeeInfoTab();


        empModel.LoginName    = txtLoginName.Text.Trim();
        empModel.EmployeeName = txtEmployeeName.Text.Trim();
        string strSex = rblSex.SelectedValue.Trim();

        empModel.Sex      = Convert.ToBoolean(strSex);
        empModel.NickName = txtNickName.Text.Trim();
        if (string.IsNullOrEmpty(tbDate.Value.Trim()))
        {
            empModel.Birthday = Convert.ToDateTime(tbDate.Value.Trim());
        }
        else
        {
            empModel.Birthday = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd"));
        }
        empModel.CertificateID     = ddlCertificateID.SelectedValue.ToString().Trim();
        empModel.CertificateNumber = txtCertificateNumber.Text.Trim();
        empModel.CountryCode       = "CN";
        empModel.ProvinceID        = "1098";
        empModel.CityID            = "1099";
        empModel.CountyID          = "1100";
        empModel.Address           = txtAddress.Text.Trim();
        empModel.PostCode          = txtPostCode.Text.Trim();
        empModel.Tel      = txtCountryCode.Text.Trim() + "-" + txtAreaCode.Text.Trim() + "-" + txtTelPhone.Text.Trim();
        empModel.Mobile   = txtMobile.Text.Trim();
        empModel.FAX      = txtFax.Text.Trim();
        empModel.Email    = txtEmail.Text.Trim();
        empModel.DeptID   = ddlDept.SelectedValue.Trim();
        empModel.WorkType = ddlWorkType.SelectedValue.Trim();
        empModel.DegreeID = ddlDegree.SelectedValue.Trim();
        empModel.Enable   = true; //有效


        //logininfotab表
        Tz888.BLL.Login.LoginInfoBLL loginBll   = new Tz888.BLL.Login.LoginInfoBLL();
        Tz888.Model.LoginInfo        loginModel = new Tz888.Model.LoginInfo();
        SHA1 sha1 = SHA1.Create();

        byte[] bytePassword = sha1.ComputeHash(Encoding.Unicode.GetBytes(txtPassword.Text.Trim()));

        loginModel.LoginName = txtLoginName.Text.Trim();
        loginModel.Password  = bytePassword;
        //loginModel.PasswordQuestion = txtPasswordQuestion.Text.Trim();
        //loginModel.PasswordAnswer = txtPasswordAnswer.Text.Trim();
        loginModel.RoleName      = "2";
        loginModel.IsCheckUp     = false;
        loginModel.NickName      = txtNickName.Text.Trim();
        loginModel.Tel           = txtCountryCode.Text.Trim() + "-" + txtAreaCode.Text.Trim() + "-" + txtTelPhone.Text.Trim();
        loginModel.Email         = txtEmail.Text.Trim();
        loginModel.RequirInfo    = "";
        loginModel.RealName      = "";
        loginModel.ManageTypeID  = "1001";
        loginModel.MemberGradeID = "1001"; //和以前的项目一样
        loginModel.Enable        = true;   //有效

        string sTem = ddlRole.SelectedValue.Trim();

        if (empBll.Add(loginModel, empModel, sTem) > 0)
        {
            //Tz888.Common.MessageBox.Show(this, "注册成功!");
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", "alert('注册成功!'); location.href='SysUser.aspx'", true);
        }
        else
        {
            Tz888.Common.MessageBox.Show(this, "注册失败!");
        }
    }
    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 btnLogin_Click(object sender, EventArgs e)
    {
        int    ErrorID  = 0;
        string ErrorMsg = "";

        Tz888.BLL.Login.LoginInfoBLL loginRule = new Tz888.BLL.Login.LoginInfoBLL();
        DataTable dt = new DataTable();

        strLoginName = txtLoginName.Value.Trim();
        strPassword  = txtPassWord.Value.Trim();

        dt = loginRule.Authenticate(
            strLoginName,
            0,
            strPassword,
            false,
            ref ErrorID,
            ref ErrorMsg);

        if (dt.Rows.Count > 0) //
        {
            strRoleName = dt.Rows[0]["RoleName"].ToString().Trim();

            InsertLoginLog(strLoginName, strRoleName);

            //写登陆cookie开始
            HttpCookie loginedUser = new HttpCookie("loginedUser");
            loginedUser.Expires = DateTime.Now.AddDays(1);
            loginedUser.Value   = strLoginName;

            Response.Cookies.Add(loginedUser);
            ////写登陆cookie结束
            //Tz888.BLL.Login.LoginInfoBLL.Logout();

            //分配验证票,同时建立角色信息
            // LoginInfoBLL.SetUserFormsCookie(strLoginName, dt.Rows[0]["MemberGradeID"].ToString().Trim(), dt.Rows[0]["ManageTypeID"].ToString().Trim(), true);
            // #region  登录后SESSION记录 用户名,用户角色以及 角色组
            // Tz888.BLL.Conn dal = new Tz888.BLL.Conn();
            // DataTable dtUser = dal.GetList("VipApplyTab", "BuyTerm", "ApplyID", 1, 1, 0, 1, "LoginName='" + strLoginName + "'");
            // string MemberType = "";
            // if (dtUser != null && dtUser.Rows.Count > 0)
            // {
            //     MemberType = dtUser.Rows[0]["BuyTerm"].ToString();
            // }
            // else { MemberType = "1"; }

            // string[] obj = { strLoginName, dt.Rows[0]["ManageTypeID"].ToString().Trim(), MemberType };

            // Session["MemberObj"] = obj;

            //#endregion

            //if (!(HttpContext.Current.User == null))
            //{
            //    if (HttpContext.Current.User.Identity.AuthenticationType == "Forms")
            //    {
            //        System.Web.Security.FormsIdentity id;
            //        id = (System.Web.Security.FormsIdentity)HttpContext.Current.User.Identity;
            //        String[] myRoles = new String[6];
            //        myRoles[0] = "2001";
            //        myRoles[1] = "2002";
            //        myRoles[2] = "2003";
            //        myRoles[3] = "2004";
            //        myRoles[4] = "2006";
            //        myRoles[5] = "2007";

            //        HttpContext.Current.User = new System.Security.Principal.GenericPrincipal(id, myRoles);
            //    }
            //}
            // Response.Write("<script>window.close();</script>");
            //Response.Write("<script>alert('sssssssss!')</script>");
            Response.Write("<script>alert('1');</script>");
        }
        else
        {
            InsertLoginErrorLog(strLoginName);

            if (dt.Rows.Count == 0)
            {
                divText.InnerHtml = "您输入的用户名或密码不正确,请重新登录!";
            }
        }
    }
Example #23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #if DEBUG
        #else
        if (Page.User.Identity.Name == "")
        {
            Response.Redirect("Login.aspx");
        }
        if (Page.User.IsInRole("GT1002"))
        {
            Response.Redirect("indexTof.aspx");
        }
        #endif
        if (!Page.IsPostBack)
        {
            #if DEBUG
            LoginName = "hujie2010";
#else
            LoginName = Page.User.Identity.Name.Trim();
            #endif
            Tz888.BLL.Conn dal    = new Conn();
            DataTable      dtUser = dal.GetList("LoginInfoTab", "NickName,isCheckUp,Email", "LoginId", 1, 1, 0, 1, "LoginName='" + LoginName + "'");
            Tz888.BLL.Login.LoginInfoBLL bllLoginInfo = new Tz888.BLL.Login.LoginInfoBLL();
            try
            {
                lblUserName.Text = dtUser.Rows[0]["NickName"].ToString();
                isCheckup        = Convert.ToBoolean(dtUser.Rows[0]["isCheckUp"].ToString());
                email            = dtUser.Rows[0]["Email"].ToString();
            }
            catch
            {
                lblUserName.Text = LoginName.Trim();
                isCheckup        = false;
                email            = "";
            }

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

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


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

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

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

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



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

                forOrgReg.InnerHtml += strInnerHtml;
            }

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

            if (Page.User.IsInRole("MT1003")) //企业
            {
                validUrl = "Register/ValidEMailEnterprise.aspx?logname={0}&email={1}";
            }
            if (Page.User.IsInRole("MT1004")) //机构
            {
                validUrl = "Register/ValidEMailGov.aspx?logname={0}&email={1}";
            }
            if (Page.User.IsInRole("MT1001")) //个人
            {
                validUrl = "Register/ValidEMailPersonal.aspx?logname={0}&email={1}";
            }
            if (!isCheckup &&
                (!string.IsNullOrEmpty(LoginName) || !string.IsNullOrEmpty(email)))
            {
                validUrl = validUrl.Replace("{0}", Server.UrlEncode(Tz888.Common.DEncrypt.DEncrypt.Encrypt(LoginName)));
                validUrl = validUrl.Replace("{1}", Server.UrlEncode(Tz888.Common.DEncrypt.DEncrypt.Encrypt(email))) +
                           "&act=" + Tz888.Common.DEncrypt.DEncrypt.Encrypt("valid");
                forOrgReg.InnerHtml += "<br>您还没有进行邮箱验证,为了您的账户安全,请<a class='blue' href='" + validUrl + "' target='_blank'>点此立即验证</a>";
            }
        }
    }
    protected void IbtnSubmit_Click(object sender, EventArgs e)
    {
        //if (Session["valationNo"] == null || ImageCode.Text.ToUpper().Trim() != Session["valationNo"].ToString().ToUpper().Trim() || Session["valationNo"].ToString().Trim() == "")
        //{
        //    //Tz888.Common.MessageBox.Show(this.Page, "验证码错误!");
        //    //Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", "alert('验证码错误!');", false);

        //    Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", "ValidErr();", true);
        //    return;
        //}
        //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.RegisteredCapital = this.txtHBao.Text.ToString().Trim();
        //项目介绍提炼
        capitalInfoModel.ComBreif = "";

        capitalInfoModel.CooperationDemandType = "";

        //拟投资行业
        capitalInfoModel.IndustryBID = this.SelectIndustryControl1.IndustryString;
        //投资项目阶段
        //2010-06-23

        capitalInfoModel.stageID = Convert.ToInt32(1);//(this.rblStage.SelectedValue);
        // 是否参与项目方管理
        //2010-06-23
        capitalInfoModel.joinManageID = Convert.ToInt32(1); //(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 = Tz888.Common.Utility.PageValidate.TxtToHtml("");

        //添加所属区域

        //capitalInfoModel.SCountryID = this.ZoneSelectControl1.CountryID;
        //capitalInfoModel.SProvinceID = this.ZoneSelectControl1.ProvinceID;
        //capitalInfoModel.SCityID = this.ZoneSelectControl1.CityID;
        //capitalInfoModel.SCountyID = this.ZoneSelectControl1.CountyID;
        capitalInfoModel.SCountryID  = "001";
        capitalInfoModel.SProvinceID = "001";
        capitalInfoModel.SCityID     = "001";
        capitalInfoModel.SCountyID   = "001";



        //项目承办单位
        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;
        //意向有效期限
        //20100623
        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);
            }
            long   _infoID = Convert.ToInt64(infoID);
            string title   = Convert.ToString("投资发布");
            Tz888.Model.Info.InfoContactModel infoContactModel = new Tz888.Model.Info.InfoContactModel(); //创建信息联系方式主体

            string email       = this.txtEmail.Text.Trim();
            string telCountry  = this.txtTelCountry.Text.Trim();
            string telZoneCode = this.txtTelZoneCode.Text.Trim();
            string telNumber   = this.txtTelNumber.Text.Trim();
            //注释掉传真
            string faxCountry  = "0";
            string faxZoneCode = "0";
            string faxNumber   = "0";
            string webSite     = this.txtWebSite.Text.Trim();
            string name        = this.txtLinkMan.Text.Trim();
            string mobile      = this.txtMobile.Text.Trim();
            string address     = this.txtAddress.Text.Trim();
            //注释右邮编
            string postCode = "0";

            //以下是职位
            string position = ""; //this.txtPosition.Text.Trim();
            //投资机构名称
            string organizationName = this.txtGovName.Text.Trim();

            // if (ViewState["OrganizationName"] != null)
            // {
            // infoContactModel.OrganizationName = ViewState["OrganizationName"].ToString();
            // }
            infoContactModel.OrganizationName = organizationName;
            infoContactModel.InfoID           = _infoID;
            infoContactModel.Email            = email;
            infoContactModel.WebSite          = webSite;
            infoContactModel.TelCountryCode   = telCountry;
            infoContactModel.TelStateCode     = telZoneCode;
            infoContactModel.TelNum           = telNumber;
            infoContactModel.FaxCountryCode   = faxCountry;
            infoContactModel.FaxStateCode     = faxZoneCode;
            infoContactModel.FaxNum           = faxNumber;
            infoContactModel.Name             = name;
            infoContactModel.Mobile           = mobile;
            infoContactModel.Address          = address;
            infoContactModel.PostCode         = postCode;
            //以下是职位
            infoContactModel.Position = position;

            Tz888.BLL.Info.InfoContact obj = new Tz888.BLL.Info.InfoContact();

            //这里是更新联系信息
            if (obj.Update(infoContactModel))
            {
                Response.Redirect("publishCapital_step3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(_infoID.ToString() + "|Capital|" + title));
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "更新联系方式失败!");
            }
            //以下是单独将信息完整度分数插入到Captialinfo中

            Tz888.BLL.Info.V124.CapitalInfoBLL InformationIntegrityUpdate = new Tz888.BLL.Info.V124.CapitalInfoBLL();
            InformationIntegrityUpdate.InsertInformationIntegrity(infoContactModel);


            // 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, "发布失败!");
        }
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        //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.V124.CapitalSetModel model = new Tz888.Model.Info.V124.CapitalSetModel();

        //model.InfoContactModel = this.CapitalAddressInfo1.InfoContact;
        model.CapitalInfoAreaModels = ZoneMoreSelectControl1.CapitalInfoAreaModels;

        //model.InfoContactModel.OrganizationName = this.txtGovName.Text;


        #region 投资信息实体赋值
        model.CapitalInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtCapitalIntent.Value.Trim());
        //if (!string.IsNullOrEmpty(this.rblfinancingTarget.SelectedValue.ToString()))
        //{
        //    model.CapitalInfoModel.CapitalTypeID = this.rblfinancingTarget.SelectedValue;
        //}
        if (!string.IsNullOrEmpty(this.rblCurreny.SelectedValue.ToString()))
        {
            model.CapitalInfoModel.CapitalID = this.rblCurreny.SelectedValue;
        }
        model.CapitalInfoModel.CooperationDemandType = "";
        model.CapitalInfoModel.IndustryBID           = this.SelectIndustryControl1.IndustryString;
        //if (!string.IsNullOrEmpty(rdlStage.SelectedValue.ToString()))
        //{
        //    model.CapitalInfoModel.stageID = Convert.ToInt32(this.rdlStage.SelectedValue.Trim());
        //}
        //if (!string.IsNullOrEmpty(this.rdlJoinManage.SelectedValue.ToString()))
        //{
        //    model.CapitalInfoModel.joinManageID = Convert.ToInt32(this.rdlJoinManage.SelectedValue.Trim());
        //}
        for (int i = 0; chkLstCooperationDemand.Items.Count > i; i++)
        {
            if (chkLstCooperationDemand.Items[i].Selected)
            {
                model.CapitalInfoModel.CooperationDemandType += chkLstCooperationDemand.Items[i].Value + ",";
            }
        }
        //以下是需要添加的参数
        //注册资金
        model.CapitalInfoModel.RegisteredCapital = "";// this.rblRegisterdollar.SelectedValue;
        model.CapitalInfoModel.ComBreif          = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(Tz888.Common.Utility.PageValidate.HtmlToTxt(""));
        //团队规模
        model.CapitalInfoModel.TeamScale = "";            //;this.rblTeam.SelectedValue;
        //机构年平均投资事件数
        model.CapitalInfoModel.AverageInvestment = "";    //this.rblPinJ.SelectedValue;
        //机构成功投资事件总数
        model.CapitalInfoModel.SuccessfulInvestment = ""; //this.rblSucess.SelectedValue;
        //投资需求摘要
        model.CapitalInfoModel.InvestmentDemand = "";     // this.txtDemand.Value;
        //添加所属区域

        //model.CapitalInfoModel.SCountryID = this.ZoneSelectControl1.CountryID;
        //model.CapitalInfoModel.SProvinceID = this.ZoneSelectControl1.ProvinceID;
        //model.CapitalInfoModel.SCityID = this.ZoneSelectControl1.CityID;
        //model.CapitalInfoModel.SCountyID = this.ZoneSelectControl1.CountyID;
        #endregion
        //2010-08-04

        model.MainInfoModel.InfoID = Convert.ToInt64(this.ViewState["InfoID"]);
        if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
        {
            model.MainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        }
        model.MainInfoModel.publishT = Convert.ToDateTime(this.ViewState["PublishT"]);

        model.MainInfoModel.LoginName = ""; //用户名称

        //这里是换为投资机构名称
        model.InfoContactModel.OrganizationName = this.txtGovName.Text;
        model.InfoContactModel.OrgIntro         = Tz888.Common.Utility.PageValidate.TxtToHtml("");
        model.InfoContactModel.Name             = this.txtLinkMan.Text;
        model.InfoContactModel.TelCountryCode   = this.txtTelCountry.Text;
        model.InfoContactModel.TelStateCode     = this.txtTelZoneCode.Text;
        model.InfoContactModel.TelNum           = this.txtTelNumber.Text;

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

        model.InfoContactModel.Mobile  = this.txtMobile.Text;
        model.InfoContactModel.Address = this.txtAddress.Text;
        //model.InfoContactModel.PostCode = this.txtPostCode.Text;
        model.InfoContactModel.Email = this.txtEmail.Text;

        model.InfoContactModel.WebSite = this.txtWebSite.Text;



        //以下是职位
        //model.InfoContactModel.Position = this.txtPosition.Text;


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

        model.MainInfoModel.KeyWord           = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(keyword);
        model.MainInfoModel.Descript          = "";
        model.MainInfoModel.DisplayTitle      = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        model.MainInfoModel.FrontDisplayTime  = System.DateTime.Now;
        model.MainInfoModel.ValidateStartTime = System.DateTime.Now;
        //意向有效期限
        model.MainInfoModel.ValidateTerm        = int.Parse(this.rdlValiditeTerm.SelectedValue.Trim());
        model.MainInfoModel.TemplateID          = "001";
        model.MainInfoModel.HtmlFile            = ViewState["HtmlFile"].ToString();
        model.MainInfoModel.AuditingStatus      = Convert.ToInt32(ViewState["AuditingStatus"].ToString());
        model.ShortInfoModel.ShortInfoControlID = Convert.ToString(ViewState["ShortInfoControlID"]);
        model.ShortInfoModel.ShortTitle         = ViewState["ShortTitle"].ToString();
        model.ShortInfoModel.ShortContent       = ViewState["ShortContent"].ToString();
        model.ShortInfoModel.Remark             = "";


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

        string navUrl = "";
        bool   isTof  = Page.User.IsInRole("GT1002");
        if (isTof)
        {
            navUrl = "http://member.topfo.com/indexTof.aspx";
        }
        else
        {
            navUrl = "http://member.topfo.com/index.aspx";
        }

        bool b = bll.Update(model);

        //修改附件
        Tz888.BLL.Info.InfoResourceBLL obj2 = new Tz888.BLL.Info.InfoResourceBLL();
        obj2.DeleteByInfoID(long.Parse(this.ViewState["InfoID"].ToString()));
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>();
        infoResourceModels = this.FilesUploadControl1.InfoList;
        if (infoResourceModels != null)
        {
            model.InfoResourceModels.AddRange(infoResourceModels);
        }
        if (infoResourceModels != null)
        {
            foreach (Tz888.Model.Info.InfoResourceModel ResModel in infoResourceModels)
            {
                ResModel.InfoID = long.Parse(this.ViewState["InfoID"].ToString());
                obj2.Insert(ResModel);
            }
        }
        if (b)
        {
            if (isTof)
            {
                if (string.IsNullOrEmpty(model.MainInfoModel.HtmlFile.Trim()))
                {
                    model.MainInfoModel.HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Capital", model.MainInfoModel.InfoCode, model.MainInfoModel.InfoID);
                }
                Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
                mainBll.HasHtmlFile(model.MainInfoModel.InfoID, model.MainInfoModel.HtmlFile);
                string actionMsg = "";
                Tz888.BLL.PageStatic.V124.CapitalPageStatic staticobj = new Tz888.BLL.PageStatic.V124.CapitalPageStatic();
                staticobj.CreateStaticPageCapital(model.MainInfoModel.InfoID.ToString(), ref actionMsg);
            }
            Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "修改投资资源成功!", navUrl);
        }
        else
        {
            Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "修改投资资源失败!", navUrl);
        }
    }
    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";
        }
    }
Example #27
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
    }
    //更新数据
    private void UpdateUserDoc()
    {
        //Employeeinfotab表
        Tz888.BLL.Sys.EmployeeInfoTab   empBll   = new Tz888.BLL.Sys.EmployeeInfoTab();
        Tz888.Model.Sys.EmployeeInfoTab empModel = new Tz888.Model.Sys.EmployeeInfoTab();

        empModel.LoginName    = txtLoginName.Text;
        empModel.EmployeeName = txtEmployeeName.Text.Trim();
        string strSex = rblSex.SelectedValue.Trim();

        empModel.Sex               = Convert.ToBoolean(strSex);
        empModel.NickName          = txtNickName.Text.Trim();
        empModel.Birthday          = Convert.ToDateTime(tbDate.Value.Trim());
        empModel.CertificateID     = ddlCertificateID.SelectedValue.ToString().Trim();
        empModel.CertificateNumber = txtCertificateNumber.Text.Trim();

        //*区域,这是修改内部会员资料,所以不更新它
        //*empModel.CountryCode = "CN";
        //*empModel.ProvinceID = "1098";
        //*empModel.CityID = "1099";
        //*empModel.CountyID = "1100";

        empModel.Address  = txtAddress.Text.Trim();
        empModel.PostCode = txtPostCode.Text.Trim();
        empModel.Tel      = txtCountryCode.Text.Trim() + "-" + txtAreaCode.Text.Trim() + "-" + txtTelPhone.Text.Trim();
        empModel.Mobile   = txtMobile.Text.Trim();
        empModel.FAX      = txtFax.Text.Trim();
        empModel.Email    = txtEmail.Text.Trim();
        empModel.DeptID   = ddlDept.SelectedValue.Trim();
        empModel.WorkType = ddlWorkType.SelectedValue.Trim();
        empModel.DegreeID = ddlDegree.SelectedValue.Trim();


        //logininfotab表
        Tz888.BLL.Login.LoginInfoBLL loginBll   = new Tz888.BLL.Login.LoginInfoBLL();
        Tz888.Model.LoginInfo        loginModel = new Tz888.Model.LoginInfo();

        //######更新密码,暂不用
        //SHA1 sha1 = SHA1.Create();
        //byte[] bytePassword = sha1.ComputeHash(Encoding.Unicode.GetBytes(txtPassword.Text.Trim()));
        //loginModel.Password = bytePassword;
        //######

        loginModel.LoginName = txtLoginName.Text;
        //loginModel.PasswordQuestion = txtPasswordQuestion.Text.Trim();
        //loginModel.PasswordAnswer = txtPasswordAnswer.Text.Trim();
        loginModel.RoleName  = "2";
        loginModel.IsCheckUp = false;
        loginModel.NickName  = txtNickName.Text.Trim();
        loginModel.Tel       = txtCountryCode.Text.Trim() + "-" + txtAreaCode.Text.Trim() + "-" + txtTelPhone.Text.Trim();
        loginModel.Email     = txtEmail.Text.Trim();
        //*loginModel.RequirInfo = "";
        //*loginModel.RealName = "";
        //*loginModel.ManageTypeID = "1001";
        //*loginModel.MemberGradeID = "1001";//和以前的项目一样
        //*loginModel.Enable = true;  //有效

        string sTem = "";//不修改角色(有专门的修改页面)

        if (empBll.Update(loginModel, empModel, sTem) > 0)
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", "alert('资料修改成功!'); location.href='SysUser.aspx'", true);
        }
        else
        {
            Tz888.Common.MessageBox.Show(this, "资料修改失败!");
        }
    }