protected void btnRefresh_Click(object sender, EventArgs e)
    {
        string[] values = Request.Form.GetValues("cbxSelect");
        string   msg    = "";

        if (values == null || values.Length < 1)
        {
            Tz888.Common.MessageBox.Show(this.Page, "请选择要刷新的资源!");
            return;
        }

        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        foreach (string str in values)
        {
            long InfoID = Convert.ToInt64(str);
            if (!bll.UpdateRefresh(InfoID))
            {
                msg += "[" + InfoID.ToString() + "]刷新失败!\n";
            }
        }
        if (!string.IsNullOrEmpty(msg))
        {
            Tz888.Common.MessageBox.Show(this.Page, msg);
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "刷新成功!");
        }
    }
示例#2
0
    protected void myList_ItemCommand(object sender, RepeaterCommandEventArgs e)
    {
        long   InfoID = Convert.ToInt64(e.CommandArgument);
        string msg    = "";

        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        switch (e.CommandName)
        {
        case "Delete":
            string ErrorMsg = "";
            if (!bll.UpdatePromotionStatu(InfoID, 0))
            {
                msg += "[" + InfoID.ToString() + "]删除失败!" + ErrorMsg + "\n";
            }

            if (!string.IsNullOrEmpty(msg))
            {
                Tz888.Common.MessageBox.Show(this.Page, msg);
            }
            this.bind();
            break;

        default:
            break;
        }
    }
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        string[] values = Request.Form.GetValues("cbxSelect");
        string   msg    = "";

        // string loginName = "tz888admin";
        string loginName = Page.User.Identity.Name; //注释2010-06-13

        if (values == null || values.Length < 1)
        {
            Tz888.Common.MessageBox.Show(this.Page, "请选择要删除的资源!");
            return;
        }
        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        foreach (string str in values)
        {
            long   InfoID   = Convert.ToInt64(str);
            int    ErrorID  = 0;
            string ErrorMsg = "";
            if (!bll.UserDelete(InfoID, loginName, ref ErrorID, ref ErrorMsg))
            {
                msg += "[" + InfoID.ToString() + "]删除失败!" + ErrorMsg + "\n";
            }
        }
        if (!string.IsNullOrEmpty(msg))
        {
            Tz888.Common.MessageBox.Show(this.Page, msg);
        }
        string neirong = member.AjaxStatus(name, Convert.ToInt32(state), Convert.ToInt32(pageID), type, title);
        string fenye   = member.pageCont(name, Convert.ToInt32(state), Convert.ToInt32(pageID), type, title);

        StatuID.InnerHtml  = neirong;
        spanPage.InnerHtml = fenye;
    }
示例#4
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        Tz888.BLL.Info.InfoContact        dal   = new Tz888.BLL.Info.InfoContact();
        Tz888.Model.Info.InfoContactModel model = new Tz888.Model.Info.InfoContactModel();

        model.InfoID           = _infoID;
        model.OrganizationName = txtCompanyName.Value.Trim();
        model.Name             = txtLinkMan.Value.Trim();
        model.Career           = txtCareer.Value.Trim();
        model.TelStateCode     = txtTelStateCode.Value.Trim();
        model.TelNum           = txtTel.Value.Trim();
        model.Mobile           = txtMobile.Value.Trim();
        model.Address          = txtAddress.Value.Trim();
        model.WebSite          = txtWebSite.Value.Trim();
        model.Email            = txtEmail.Value.Trim();
        bool b = dal.Add(model);

        if (b)
        {
            Tz888.Model.Info.MainInfoModel mainInfoModel = new Tz888.Model.Info.MainInfoModel();
            Tz888.BLL.Info.MainInfoBLL     mainDAL       = new Tz888.BLL.Info.MainInfoBLL();
            mainInfoModel = mainDAL.GetModel(_infoID);
            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 dalPage = new Tz888.BLL.PageStatic.ProjectPageStatic();
            dalPage.CreateStaticPageProject_New(_infoID.ToString(), ref actionMsg);
            Response.Redirect("/Publish/Publishproject3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(_infoID.ToString() + "|Project|" + title));
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "联系信息添加失败..");
        }
    }
    private void Del(long infoId)
    {
        string msg = "";
        // string name = "tz888admin";
        string name = Page.User.Identity.Name;

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

        int    ErrorID  = 0;
        string ErrorMsg = "";

        if (!bll.UserDelete(infoId, name, ref ErrorID, ref ErrorMsg))
        {
            msg += "[" + infoId.ToString() + "]删除失败!" + ErrorMsg + "\n";
        }

        if (!string.IsNullOrEmpty(msg))
        {
            Tz888.Common.MessageBox.Show(this.Page, msg);
        }
        string neirong = member.AjaxStatus(name, Convert.ToInt32(state), Convert.ToInt32(pageID), type, title);
        string fenye   = member.pageCont(name, Convert.ToInt32(state), Convert.ToInt32(pageID), type, title);

        StatuID.InnerHtml  = neirong;
        spanPage.InnerHtml = fenye;
    }
示例#6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //本地调试时使用默认值
        //InfoID = "103";
        if (string.IsNullOrEmpty(Page.User.Identity.Name))
        {
            Response.Redirect("/Login.aspx?ReturnUrl=" + Server.UrlEncode(Request.RawUrl));
        }
        if (Request.QueryString["InfoID"] != null)
        {
            InfoID = Request.QueryString["InfoID"].ToString();
        }

        //根据InfoID获取资源标题
        //Session["Title"] = "投资壹亿美金合作建设“中国硅热法炼镁”基地";
        if (InfoID.Trim() != "")
        {
            Tz888.BLL.Info.MainInfoBLL     MainInfoBLL   = new Tz888.BLL.Info.MainInfoBLL();
            Tz888.Model.Info.MainInfoModel MainInfoModel = new Tz888.Model.Info.MainInfoModel();
            MainInfoModel = MainInfoBLL.GetModel(long.Parse(InfoID));
            if (MainInfoModel != null)
            {
                tbTitle.Value = MainInfoModel.Title.ToString();
            }
        }
    }
示例#7
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        string[] values = Request.Form.GetValues("cbxSelect");
        string   msg    = "";
        //string loginName = CON_LoginName;
        string loginName = Page.User.Identity.Name;

        if (values == null || values.Length < 1)
        {
            Tz888.Common.MessageBox.Show(this.Page, "请选择要删除的资源!");
            return;
        }
        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        foreach (string str in values)
        {
            long   InfoID   = Convert.ToInt64(str);
            int    ErrorID  = 0;
            string ErrorMsg = "";
            if (!bll.UserDelete(InfoID, loginName, ref ErrorID, ref ErrorMsg))
            {
                msg += "[" + InfoID.ToString() + "]删除失败!" + ErrorMsg + "\n";
            }
        }
        if (!string.IsNullOrEmpty(msg))
        {
            Tz888.Common.MessageBox.Show(this.Page, msg);
        }
        this.SetPagerParameters();
        this.Pager1.DataBind();
    }
示例#8
0
    protected int GetCount(Tz888.BLL.Common.AuditStatus Type)
    {
        //string loginName = CON_LoginName;
        string loginName = Page.User.Identity.Name;

        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        return(bll.GetCount(Type, loginName, "0"));
    }
示例#9
0
    protected string GetRemind()
    {
        //string loginName = CON_LoginName;
        string loginName = Page.User.Identity.Name;

        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        return(bll.GetRemind(loginName, "0", this.remindModel, Tz888.BLL.Common.AuditStatus.NoPass));
    }
示例#10
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (chkRefreshMsg.Checked == true)
        {
            Tz888.BLL.Login.MemberBLL bll = new Tz888.BLL.Login.MemberBLL();
            string LoginName = Page.User.Identity.Name;
            //string LoginName = "heyi";
            int  IsRefresh = 0;
            bool HasLoad   = bll.RefreshMemberInfo(LoginName, IsRefresh);
            if (!HasLoad)
            {
                Tz888.Common.MessageBox.Show(this.Page, "没有找到您需要的数据!");
                return;
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "已经设置为:以后不再提醒!");
                btnClose.Visible = true;
                return;
            }
        }
        else
        {
            int      intSelect  = 0;
            int      intSuccess = 0;
            CheckBox chkSelect;
            Label    lblInfo;
            Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();

            for (int i = 0; i < dlrefresh.Items.Count; i++)
            {
                chkSelect = (CheckBox)dlrefresh.Items[i].FindControl("chkSelect");
                lblInfo   = (Label)dlrefresh.Items[i].FindControl("lblInfo");
                if (chkSelect.Checked)
                {
                    intSelect++;
                    //将选中的信息的时间更新为此刻时间
                    long InfoID = Convert.ToInt64(lblInfo.Text.Trim());
                    if (bll.UpdateRefresh(InfoID))
                    {
                        intSuccess++;
                    }
                }
            }
            if (intSelect.ToString().Trim() == "0")
            {
                Tz888.Common.MessageBox.Show(this.Page, "您没有选择信息!");
                return;
            }
            else
            {
                //报告操作成功
                Tz888.Common.MessageBox.Show(this.Page, "选择信息" + intSelect.ToString() + "条,实际更新 " + intSuccess.ToString() + "条");
            }
        }
    }
    protected void ibModify_Click(object sender, EventArgs e)
    {
        long     id       = Convert.ToInt64(ViewState["InfoID"]);
        DateTime startDay = DateTime.Now;
        int      term     = Convert.ToInt32(stTerm.Value.Trim());

        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        bll.ChangeValidTerm(id, startDay, term);
        Tz888.Common.MessageBox.ShowAndHref("更新成功!", Request.Url.ToString());
    }
示例#12
0
    private void BindInfoData()
    {
        this._infoID = Convert.ToInt64(ViewState["InfoID"]);
        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        long intCurrentPage            = 1;
        long intCurrentPageSize        = 1;
        long intTotalCount             = 1;

        this.RfInfo.DataSource = bll.GetMainInfoViewList("*", "InfoID = " + this._infoID.ToString(), "", ref intCurrentPage, intCurrentPageSize, ref intTotalCount);
        this.RfInfo.DataBind();
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        decimal Evaluate = this.TFZSEvaluateGQ1.SaveEvaluate();

        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        long InfoID = Convert.ToInt64(ViewState["InfoID"]);

        bll.HasMainEvaluation(InfoID, Evaluate);
        string Title = ViewState["Title"].ToString();

        Response.Redirect("./Publishproject3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(InfoID.ToString() + "|Project|" + Title));
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(Page.User.Identity.Name))
        {
            Response.Redirect("/login.aspx?url=" + Page.Request.Url.ToString());
        }

        // 在此处放置用户代码以初始化页面
        if (!Page.IsPostBack)
        {
            bool isValid = false;
            long id      = 0;
            try
            {
                id = Convert.ToInt64(Request.QueryString["id"].Trim());
            }
            catch
            {
                id = 0;
            }
            if (id != 0)
            {
                ViewState["InfoID"] = id;
                Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
                DataTable dt = bll.GetMainInfoViewList("*", "InfoID = " + id.ToString(), "", ref intCurrentPage, intCurrentPageSize, ref intTotalCount);

                if (dt != null)
                {
                    try
                    {
                        if (dt.Rows[0]["LoginName"].ToString().Trim() == Page.User.Identity.Name.Trim())//获取成功
                        {
                            //if (Convert.ToDateTime(dt.Rows[0]["InfoOverdueTime"]) < DateTime.Now)
                            //{
                            isValid        = true;
                            ltTitle.Text   = dt.Rows[0]["Title"].ToString();
                            ltPubDate.Text = Convert.ToDateTime(dt.Rows[0]["PublishT"]).ToString("yyyy-MM-dd");
                            if (dt.Rows[0]["InfoOverdueTime"].ToString().Trim() != "")
                            {
                                ltStartDate.Text = Convert.ToDateTime(dt.Rows[0]["InfoOverdueTime"]).ToString("yyyy-MM-dd");
                            }
                            //}
                        }
                    }
                    catch { }
                }
            }
            if (!isValid)
            {
                Response.Redirect("./ResourceManage_Pass.aspx");
            }
        }
    }
 public void DeleteID(string InfoID)
 {
     Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
     bool stat;
     int ErrorID = 0;
     string ErrorMsg = "";
     Int64 ID = Convert.ToInt64(InfoID);
     stat = bll.UserDelete(ID, Page.User.Identity.Name.ToString(), ref ErrorID, ref ErrorMsg);
     if (!stat)
     {
         Response.Write("<script>alert('" + ID+ "删除操作失败。'); </script>");
     }
 }
示例#16
0
    protected void Submit1_ServerClick(object sender, EventArgs e)
    {
        //从主页面获取信息编号
        //单独调试设定默认值
        //Session["InfoID"] = "103";
        string point = "0";

        //根据编号查询主表信息
        Tz888.BLL.Info.MainInfoBLL BLL = new Tz888.BLL.Info.MainInfoBLL();
        if (InfoID != "")
        {
            if (rdPoint5.Checked == true)
            {
                point = rdPoint5.Value;
            }
            if (rdPoint4.Checked == true)
            {
                point = rdPoint4.Value;
            }
            if (rdPoint3.Checked == true)
            {
                point = rdPoint3.Value;
            }
            if (rdPoint2.Checked == true)
            {
                point = rdPoint2.Value;
            }
            if (rdPoint1.Checked == true)
            {
                point = rdPoint1.Value;
            }
            int returnValue = 0;
            try
            {
                returnValue = BLL.GetInfoMainEvaluation(long.Parse(InfoID), int.Parse(point));
            }
            catch
            {
            }
            if (returnValue > 0)
            {
                Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "评价成功", "trade_info_list.aspx");
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "评价失败");
            }
        }
    }
    //第二步,确认联络方式
    private int ConfirmContact()
    {
        Tz888.BLL.Info.InfoContact        dal   = new Tz888.BLL.Info.InfoContact();
        Tz888.Model.Info.InfoContactModel model = new Tz888.Model.Info.InfoContactModel();
        int returnValue = 0;

        model.InfoID           = _infoID2;
        model.OrganizationName = txtCompanyName.Value.Trim();
        model.Name             = txtLinkMan.Value.Trim();
        model.Career           = txtCareer.Value.Trim();
        model.TelCountryCode   = telArea1.Value.Trim();        //新加的国际号
        model.TelStateCode     = txtTelStateCode.Value.Trim(); //区号

        if (telFg.Value.Trim() != "")                          //如果分机号不为空
        {
            model.TelNum = txtTel.Value.Trim() + "-" + telFg.Value.Trim();
        }
        else
        {
            model.TelNum = txtTel.Value.Trim(); //电话号加分机号
        }
        model.Mobile  = txtMobile.Value.Trim();
        model.Address = txtAddress.Value.Trim();
        model.WebSite = txtWebSite.Value.Trim();
        model.Email   = txtEmail.Value.Trim();
        bool b = dal.Update(model);     //修改联络方式信息

        if (b)
        {
            //用于生成静态页,暂不用
            Tz888.Model.Info.MainInfoModel mainInfoModel = new Tz888.Model.Info.MainInfoModel();
            Tz888.BLL.Info.MainInfoBLL     mainDAL       = new Tz888.BLL.Info.MainInfoBLL();
            mainInfoModel = mainDAL.GetModel(_infoID2);
            string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Project", mainInfoModel.InfoCode, _infoID2);
            Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
            mainBll.HasHtmlFile(_infoID2, HtmlFile);
            string actionMsg = "";
            Tz888.BLL.PageStatic.ProjectPageStatic dalPage = new Tz888.BLL.PageStatic.ProjectPageStatic();
            dalPage.CreateStaticPageProject_New(_infoID2.ToString(), ref actionMsg);
            //Response.Redirect("/Publish/Publishproject3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(_infoID.ToString() + "|Project|" + title));
            //Tz888.Common.MessageBox.Show(this.Page, "发布资源成功!");
            returnValue = 1;
        }
        else
        {
            //Tz888.Common.MessageBox.Show(this.Page, "联系信息添加失败,请检查!");
        }
        return(returnValue);
    }
    //提交资源评价信息
    protected void btSubmit_Click(object sender, EventArgs e)
    {
        //从主页面获取信息编号
        //单独调试设定默认值
        //Session["InfoID"] = "103";
        string point = "0";

        //根据编号查询主表信息
        Tz888.BLL.Info.MainInfoBLL BLL = new Tz888.BLL.Info.MainInfoBLL();
        if (InfoID != "")
        {
            if (rdPoint5.Checked == true)
            {
                point = rdPoint5.Value;
            }
            if (rdPoint4.Checked == true)
            {
                point = rdPoint4.Value;
            }
            if (rdPoint3.Checked == true)
            {
                point = rdPoint3.Value;
            }
            if (rdPoint2.Checked == true)
            {
                point = rdPoint2.Value;
            }
            if (rdPoint1.Checked == true)
            {
                point = rdPoint1.Value;
            }
            int returnValue = 0;
            try
            {
                returnValue = BLL.GetInfoMainEvaluation(long.Parse(InfoID), int.Parse(point));
            }
            catch
            {
            }
            // BLL.GetInfoBuyersCount(long.Parse(Session["InfoID"].ToString()));//
            if (returnValue > 0)
            {
                Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "评价成功", "PayManage/trade_info_list.aspx");
                //Response.Write("<script>alert('评分提交成功!');</script>");
                //Response.Redirect("PayManage/trade_info_list.aspx");
            }
        }
    }
    protected void delete(object sender, CommandEventArgs e)
    {
        Int64 ID = Convert.ToInt64(e.CommandName);
        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        bool stat;
        int ErrorID = 0;
        string ErrorMsg = "";

        stat = bll.UserDelete(ID, Page.User.Identity.Name.ToString(), ref ErrorID, ref ErrorMsg);

        if (stat)
        {
            Response.Redirect("ServiesManageList.aspx");
        }
        else { Response.Write("<script>alert('" + ID + "删除操作失败。'); </script>"); }
    }
示例#20
0
    //第二步,确认联络方式
    private void ConfirmContact()
    {
        Tz888.BLL.Info.InfoContact        dal   = new Tz888.BLL.Info.InfoContact();
        Tz888.Model.Info.InfoContactModel model = new Tz888.Model.Info.InfoContactModel();

        model.InfoID           = _infoID;
        model.OrganizationName = txtCompanyName.Value.Trim();
        model.Name             = txtLinkMan.Value.Trim();
        model.Career           = "";                           // txtCareer.Value.Trim();
        model.TelCountryCode   = telArea1.Value.Trim();        //新加的国际号
        model.TelStateCode     = txtTelStateCode.Value.Trim(); //区号

        if (telFg.Value.Trim() != "")                          //如果分机号不为空
        {
            model.TelNum = txtTel.Value.Trim() + "-" + telFg.Value.Trim();
        }
        else
        {
            model.TelNum = txtTel.Value.Trim(); //电话号加分机号
        }
        model.Mobile  = txtMobile.Value.Trim();
        model.Address = txtAddress.Value.Trim();
        model.WebSite = txtWebSite.Value.Trim();
        model.Email   = txtEmail.Value.Trim();
        bool b = dal.Add(model);

        if (b)
        {
            //    //用于生成静态页,暂不用
            //    Tz888.Model.Info.MainInfoModel mainInfoModel = new Tz888.Model.Info.MainInfoModel();
            //    Tz888.BLL.Info.MainInfoBLL mainDAL = new Tz888.BLL.Info.MainInfoBLL();
            //    mainInfoModel = mainDAL.GetModel(_infoID);
            string HtmlFile = "Project/" + DateTime.Now.ToString("yyyyMM") + "/Project" + DateTime.Now.ToString("yyyyMMdd") + "_" + _infoID + ".shtml";
            Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
            mainBll.HasHtmlFile(_infoID, HtmlFile);
            //    string actionMsg = "";
            //    //Tz888.BLL.PageStatic.ProjectPageStatic dalPage = new Tz888.BLL.PageStatic.ProjectPageStatic();
            //    //dalPage.CreateStaticPageProject_New(_infoID.ToString(), ref actionMsg);

            Response.Redirect("/Publish/Publishproject3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(_infoID.ToString() + "|Project|" + txtProjectName.Value.Trim()));
            Tz888.Common.MessageBox.Show(this.Page, "发布资源成功!");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "联系信息添加失败,请检查!");
        }
    }
示例#21
0
    public void delete(object sender, CommandEventArgs e)
    {
        int BID = Convert.ToInt32(e.CommandName);

        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        bool   stat;
        int    ErrorID  = 0;
        string ErrorMsg = "";

        stat = bll.UserDelete(BID, Page.User.Identity.Name.ToString(), ref ErrorID, ref ErrorMsg);
        if (!stat)
        {
            Response.Write("<script>alert('" + BID + "删除操作失败。'); </script>");
        }
        else
        {
            Response.Redirect("StructManage.aspx");
        };
    }
示例#22
0
    private int GetItemByPara(string resType, string loginName, string auditStatus)
    {
        string strAudit = "";

        if (auditStatus != null)
        {
            strAudit = " and AuditingStatus=" + auditStatus;
        }

        Tz888.BLL.Info.MainInfoBLL mainInfo = new Tz888.BLL.Info.MainInfoBLL();
        try
        {
            DataSet dsTemp = mainInfo.GetList("InfoID", "InfoID", 1, 1, 1, "(InfoTypeID = '" + resType + "') and loginname='" + loginName + "'" + strAudit);
            return(dsTemp.Tables[0].Rows.Count);
        }
        catch (Exception exp)
        {
            return(0);
        }
    }
    protected void btnSetOverdue_Click(object sender, EventArgs e)
    {
        string[] values = Request.Form.GetValues("cbxSelect");
        string   msg    = "";

        if (values == null)
        {
            return;
        }

        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        foreach (string str in values)
        {
            long InfoID = Convert.ToInt64(str);
            if (!bll.SetValidateTerm(InfoID, 0))
            {
                msg += "[" + InfoID.ToString() + "]设置过期失败!\n";
            }
        }
        if (!string.IsNullOrEmpty(msg))
        {
            Tz888.Common.MessageBox.Show(this.Page, msg);
        }
    }
    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 InsertData()
    {
        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.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //上传文件

        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(txtCapitalTotal.Value.Trim()))
        {
            projectInfoModel.CapitalTotal = Convert.ToDecimal(txtCapitalTotal.Value.Trim());
        }

        //*融资金额
        projectInfoModel.CapitalID = this.rbtnCapital.SelectedValue.Trim();

        //项目说明
        projectInfoModel.ComBrief = Tz888.Common.Utility.PageValidate.TxtToHtml(txtProIntro.Value.Trim());

        //行业
        foreach (Tz888.Model.Common.IndustryModel model in industryModels)
        {
            projectInfoModel.IndustryBID += model.IndustryBID + ",";
        }

        //股权融资
        projectInfoModel.CooperationDemandType = "10";

        //*融资对像

        projectInfoModel.financingID = "";

        //*融资额占股份比重
        projectInfoModel.SellStockShare = 1;


        //##20100603新加入字段
        //*项目立项情况 checkboxlist
        projectInfoModel.sXmlxqk = "";
        //*项目关键字 textbox
        //string strXmgjz = "";
        //if (Xmgjz1.Value.Trim() != "")
        //{
        //    strXmgjz = Xmgjz1.Value.Trim() + ",";
        //}
        //if (Xmgjz2.Value.Trim() != "")
        //{
        //    strXmgjz += Xmgjz2.Value.Trim() + ",";
        //}
        //if (Xmgjz3.Value.Trim() != "")
        //{
        //    strXmgjz += Xmgjz3.Value.Trim();
        //}
        projectInfoModel.sXmgjz = "融资";
        //*退出方式
        projectInfoModel.ReturnModeID = "";
        //*企业发展阶段
        projectInfoModel.sQyfzjd = "";
        //*要求资金到位情况
        projectInfoModel.iYqzjdwqk = 1;
        //*市场占有率(份额)
        projectInfoModel.iSczylfy = 1;
        //*行业市场增长率
        projectInfoModel.iHysczzl = 1;
        //*资产负债率
        projectInfoModel.iZcfzl = 1;
        //*项目投资回报周期
        projectInfoModel.iXmtzfbzq = 1;
        //*项目详细描术
        projectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtXmqxms.Value.Trim());


        //##项目详细资料
        //*单位年营业收入
        projectInfoModel.nDwlyysy = 1;
        //*单位年净利润
        projectInfoModel.nDwljly = 1;
        //*单位总资产
        projectInfoModel.nDwzzc = 1;
        //*单位总负债
        projectInfoModel.nDwzfz = 1;

        //产品概述
        projectInfoModel.ProjectAbout = "";
        //市场前景
        projectInfoModel.marketAbout = "";
        //竞争分析
        projectInfoModel.competitioAbout = "";
        //商业模式
        projectInfoModel.BussinessModeAbout = "";
        //管理团队
        projectInfoModel.ManageTeamAbout = txtManageTeamAbout.Value.Trim();
        //信息完整度得分
        projectInfoModel.InformationIntegrity = GetInformationIntegrity();

        //-----------------------------------主表信息-------------
        //项目标题
        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.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      = Tz888.Common.Text.FormatData(rblXmyxqxx.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             = "";

        //上传文件
        infoResourceModels = FilesUploadControl1.InfoList;

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

        _infoID = infoID;

        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);
            //}
            //Response.Redirect("gq2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Project|" + this.txtProjectName.Value.Trim() + "|" + projectInfoModel.CooperationDemandType));

            //第二步,确认联络方式
            ConfirmContact();
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
示例#26
0
    protected void btnIssueOK_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;
        //}


        #region [暂不用]
        //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();
        //    //}
        //}
        #endregion

        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.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //上传文件

        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(txtCapitalTotal.Value.Trim()))
        //    projectInfoModel.CapitalTotal = 20;


        projectInfoModel.CapitalTotal = Convert.ToDecimal(txtCapitalTotal.Value.Trim());
        //借钱金额
        projectInfoModel.CapitalID = "0";
        //项目详细描述
        projectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.tbXmqxms.Value.Trim());
        //行业
        foreach (Tz888.Model.Common.IndustryModel model in industryModels)
        {
            projectInfoModel.IndustryBID += model.IndustryBID + ",";
        }
        projectInfoModel.CooperationDemandType = "9";//债券融资

        //融资对象
        projectInfoModel.financingID = "01,";
        //融资计划及还款能力
        projectInfoModel.warrant = "";

        //-----------------201006资源超市第二次改版,----------------------//
        //项目立项情况
        projectInfoModel.cZqXmlxqkb = "1,";
        //企业发展阶段
        projectInfoModel.cZqQyfzjd = "1";
        //要求资金到位情况
        projectInfoModel.iZqYqjjdwqk = Tz888.Common.Text.FormatData(rblYqzjdwqk.SelectedValue.Trim());
        //产品市场增长率
        projectInfoModel.iZqCpsczzl = 1;
        //产品市场容量
        projectInfoModel.iZqCpscYl = 1;
        //资产负债率
        projectInfoModel.iZqZcfzl = 1;
        //流动比率
        projectInfoModel.iZqYdbl = 1;
        //投资收益率
        projectInfoModel.iZqTzsl = 1;
        //销售利润率
        projectInfoModel.iZqXslyl = 1;
        //投资回报期
        projectInfoModel.iZqTzfbq = 1;
        //项目有效期限
        projectInfoModel.iZqXmyxqs = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim());
        //项目摘要
        projectInfoModel.ComBrief = "";
        //项目关键字 textbox
        string strXmgjz = "";
        projectInfoModel.cZqXmgjz = strXmgjz;


        //##项目详细资料
        //*借款单位年营业收入
        projectInfoModel.nDwlyysy = 1;
        //*借款单位年净利润
        projectInfoModel.nDwljly = 1;
        //*借款单位总资产
        projectInfoModel.nDwzzc = 1;
        //*借款单位总负债
        projectInfoModel.nDwzfz = 1;


        //产品概述
        projectInfoModel.cZqCpks = "";
        //市场前景
        projectInfoModel.marketAbout = "";
        //竞争分析
        projectInfoModel.cZqJzfx = "";
        //商业模式
        projectInfoModel.cZqSyms = "";
        //管理团队
        projectInfoModel.cZqGltd = "";

        //信息完整度
        projectInfoModel.InformationIntegrity = GetInformationIntegrity();
        //-----------------END--------------------------------------------



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

        string str = industryModels[0].IndustryBID;
        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 = "topfo001";
        mainInfoModel.LoginName          = Page.User.Identity.Name;
        mainInfoModel.InfoOriginRoleName = "0"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = "1";
        mainInfoModel.FeeStatus          = 0;
        mainInfoModel.ValidateTerm       = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限

        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      = Tz888.Common.Text.FormatData(rblXmyxqxx.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;


        //上传文件
        // infoResourceModels = FilesUploadControl1.InfoList;


        //包括上传文件
        long infoID = projectObj.PublishProjectZQ1(mainInfoModel, projectInfoModel, sortInfoModel, infoResourceModels);
        _infoID = infoID;

        //暂不用
        //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 = "Project/" + DateTime.Now.ToString("yyyyMM") + "/Project" + DateTime.Now.ToString("yyyyMMdd") + "_" + _infoID + ".shtml";
                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_V3(infoID.ToString(), ref actionMsg);
            }
            //Response.Redirect("zq2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Project|" + this.txtProjectName.Value.Trim() + "|" + projectInfoModel.CooperationDemandType));

            //第二步,确认联络方式
            ConfirmContact();
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
示例#27
0
    protected void IbtnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //这里是判断验证码
        try//验证验证码
        {
            if (Session["valationNo"] == null || ImageCode.Text.ToUpper().Trim() != Session["valationNo"].ToString().ToUpper().Trim() || Session["valationNo"].ToString().Trim() == "")
            {
                Tz888.Common.MessageBox.Show(this.Page, "验证码错误!");
                //this.imgLoding.Visible = false;
                return;
            }
        }
        catch
        {
            Tz888.Common.MessageBox.Show(this.Page, "未知错误!");
        }

        //结束部分
        //实体部分
        this.imgLoding.Visible = true;
        Tz888.Model.Info.MainInfoModel          mainInfoModel     = new Tz888.Model.Info.MainInfoModel();               //创建主体信息实体
        Tz888.Model.Info.MerchantInfoModel      merchantInfoModel = new Tz888.Model.Info.MerchantInfoModel();           //创建招商信息实体
        Tz888.Model.Info.InfoContactModel       infoContactModel  = new Tz888.Model.Info.InfoContactModel();            //创建信息联系方式主体
        Tz888.Model.Info.ShortInfoModel         shortInfoModel    = new Tz888.Model.Info.ShortInfoModel();              //创建短信息实体
        List <Tz888.Model.Common.IndustryModel> industryModels    = new List <Tz888.Model.Common.IndustryModel>();      //融资行业实体列表
        // List<Tz888.Model.Info.InfoContactManModel> infoContactManModels = new List<Tz888.Model.Info.InfoContactManModel>(); //联系人实体列表
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //招商信息资源信息实体

        DateTime time_now = DateTime.Now;

        //注意这里是联系方式的重新添加
        //infoContactModel = this.MerchantInfoAddressInfo1.InfoContact;

        industryModels = this.SelectIndustryControl1.IndustryModels;

        #region 招商信息实体赋值
        merchantInfoModel.MerchantTypeID = rblMerchantType.SelectedValue;
        merchantInfoModel.CountryCode    = ZoneSelectControl1.CountryID;
        merchantInfoModel.ProvinceID     = ZoneSelectControl1.ProvinceID;
        merchantInfoModel.CityID         = ZoneSelectControl1.CityID;
        merchantInfoModel.CountyID       = ZoneSelectControl1.CountyID;
        //if (!string.IsNullOrEmpty(MerchantInfoAddressInfo1.Undertaker))
        //    merchantInfoModel.ReceiveOrganization = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(MerchantInfoAddressInfo1.Undertaker);

        for (int i = 0; cblCooperationDemandType.Items.Count > i; i++)
        {
            if (cblCooperationDemandType.Items[i].Selected)
            {
                merchantInfoModel.CooperationDemandType += cblCooperationDemandType.Items[i].Value + ",";
            }
        }

        merchantInfoModel.CapitalCurrency = this.ddlCapitalCurrency.SelectedValue;

        if (!string.IsNullOrEmpty(this.txtCapitalTotal.Text.Trim()))
        {
            merchantInfoModel.CapitalTotal = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim());
        }

        merchantInfoModel.MerchantCurrency = this.ddlMerchantCurrency.SelectedValue;
        merchantInfoModel.MerchantTotal    = this.ddlMerchantTotal.SelectedValue;

        if (!string.IsNullOrEmpty(this.txtZoneAbout.Value.Trim()))
        {
            merchantInfoModel.ZoneAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtZoneAbout.Value.Trim());
        }

        //这里是2010-06-01新加的招商信息
        if (!string.IsNullOrEmpty(this.txtZoneAboutBrief.Value.Trim()))
        {
            merchantInfoModel.ZoneAboutBrief = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtZoneAboutBrief.Value.Trim());
        }
        if (!string.IsNullOrEmpty(this.txtBenefit.Value.Trim()))
        {
            merchantInfoModel.Benefit = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtBenefit.Value.Trim());
        }

        if (!string.IsNullOrEmpty(this.txtEconomicIndicators.Value.Trim()))
        {
            merchantInfoModel.EconomicIndicators = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtEconomicIndicators.Value.Trim());
        }
        if (!string.IsNullOrEmpty(this.txtInvestmentEnvironment.Value.Trim()))
        {
            merchantInfoModel.InvestmentEnvironment = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtInvestmentEnvironment.Value.Trim());
        }
        if (!string.IsNullOrEmpty(this.txtProjectStatus.Value.Trim()))
        {
            merchantInfoModel.ProjectStatus = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtProjectStatus.Value.Trim());
        }
        if (!string.IsNullOrEmpty(this.txtMarket.Value.Trim()))
        {
            merchantInfoModel.Market = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtMarket.Value.Trim());
        }

        //结束处
        foreach (Tz888.Model.Common.IndustryModel model in industryModels)
        {
            merchantInfoModel.IndustryClassList += model.IndustryBID + ",";
        }

        //2010-06-08以下是对信息完整度的统计
        merchantInfoModel.InformationIntegrity = Tz888.BLL.Info.MarchantInfoBLL.CountInfoInte(merchantInfoModel, infoContactModel);

        #endregion

        if (!string.IsNullOrEmpty(this.txtMerchantTopic.Text.Trim()))
        {
            mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtMerchantTopic.Text.Trim());
        }

        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Merchant", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, DateTime.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 += 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() + ",";
        }
        if (!string.IsNullOrEmpty(keyword))
        {
            mainInfoModel.KeyWord = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(keyword);
        }
        mainInfoModel.Descript = "";
        if (!string.IsNullOrEmpty(this.txtMerchantTopic.Text.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtMerchantTopic.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 = "MerchantIndex1";
        if (!string.IsNullOrEmpty(this.txtMerchantTopic.Text.Trim()))
        {
            shortInfoModel.ShortTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtMerchantTopic.Text.Trim());
        }
        shortInfoModel.ShortContent = "";
        shortInfoModel.Remark       = "";

        //将已上传的图片从临时目录迁移到正式目录
        //infoResourceModels = Tz888.Common.InfoResourceManage.ImageTransfer("Image", "Merchant", Tz888.Common.ResourceType.Image, Tz888.Common.ResourceProperty.InfoImage, FilesUploadControl1.InfoList);
        infoResourceModels = FilesUploadControl1.InfoList;

        //联系方式赋值
        infoContactModel.OrganizationName = this.txtCompanyName.Text;
        infoContactModel.Name             = this.txtName.Text;
        infoContactModel.Position         = this.txtPosition.Text;
        infoContactModel.TelCountryCode   = this.txtTelCountry.Text;
        infoContactModel.TelStateCode     = this.txtTelZoneCode.Text;
        infoContactModel.TelNum           = this.txtTelNumber.Text;
        infoContactModel.Mobile           = this.txtMobile.Text;
        infoContactModel.Email            = this.txtEmail.Text;
        infoContactModel.Address          = this.txtAddress.Text;

        Tz888.BLL.Info.MarchantInfoBLL marchantObj = new Tz888.BLL.Info.MarchantInfoBLL();
        //插入数据
        long infoID = marchantObj.Insert(mainInfoModel, merchantInfoModel, infoContactModel, shortInfoModel, infoResourceModels);

        if (infoID > 0)
        {
            bool isTof = Page.User.IsInRole("GT1002");
            if (isTof)
            {
                string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Merchant", mainInfoModel.InfoCode, infoID);
                Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
                mainBll.HasHtmlFile(infoID, HtmlFile);
                string actionMsg = "";
                Tz888.BLL.PageStatic.MerchantPageStatic staticobj = new Tz888.BLL.PageStatic.MerchantPageStatic();
                staticobj.CreateStaticPageMerchant(infoID.ToString(), ref actionMsg);
            }
            Session["valationNo"] = null;
            Response.Redirect("PublishMerchant3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Merchant|" + this.txtMerchantTopic.Text.Trim()));
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
示例#28
0
    public string GetAllOtherInfoByInfoIDForStaticPage(string InfoID, string LoginName)
    {
        long lgCurrentPage = 1;
        long lgPageSize    = 0;
        long lgPageCount   = 0;

        decimal MainPointCount = 0;

        StringBuilder sOut = new StringBuilder();

        string CurrentUserName = "";

        CurrentUserName = LoginName;

        //用户会员资料展示页面
        string MemberURL = "";

        //用户是否是拓富通会员


        bool bIsTofMember = false;

        if (User.IsInRole("GT1002"))
        {
            //拓富通会员


            if (CurrentUserName.Trim() != "")
            {
                bIsTofMember = true;
            }
        }

        #region 用户的联系方式信息
        string PublishMan         = "";
        string NickName           = "";
        string SelfWebDomain      = "";//网上展厅域名
        string InfoTypeName       = "";
        int    FixPriceID         = 0;
        string InfoOriginRoleName = "0";
        string ManageTypeID       = "";

        Tz888.BLL.Common.CommonFunction cf = new Tz888.BLL.Common.CommonFunction();
        DataTable dt = cf.GetDTFromTableOrView("MainInfoViw", "infoid", "*", " infoid=" + InfoID, "InfoID", ref lgCurrentPage, lgPageSize, ref lgPageCount);
        if (dt != null && dt.Rows.Count > 0)
        {
            FixPriceID         = Convert.ToInt32(dt.Rows[0]["FixPriceID"].ToString().Trim());
            MainPointCount     = Convert.ToDecimal(dt.Rows[0]["MainPointCount"].ToString().Trim());
            InfoOriginRoleName = dt.Rows[0]["InfoOriginRoleName"].ToString().Trim();
            PublishMan         = dt.Rows[0]["LoginName"].ToString().Trim();
            ManageTypeID       = dt.Rows[0]["ManageTypeID"].ToString().Trim();
            Tz888.BLL.Conn con    = new Tz888.BLL.Conn();
            DataTable      domain = con.GetWebSiteList("SelfCreateWebInfo", "Domain", "LoginName", 1, 1, 0, 1, "LoginName='" + LoginName + "'");
            if (domain.Rows.Count > 0)
            {
                SelfWebDomain = domain.Rows[0]["Domain"].ToString();
            }
        }

        string sContract = "";

        //免费或已购买的信息的内容
        string sFree = "<ul><li><a href=\"javascript:GetContactDetail('" + InfoID + "');\"><img src=\"http://images.topfo.com/Info/Capital/1/images/zibc_23.jpg\" width=\"183\" height=\"30\" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<span>提示:您需要登陆后才能查看联系方式</span></li></ul>";

        //收费的信息内容(需要购买才能看)

        string payDomain = System.Configuration.ConfigurationManager.AppSettings["payDomain"];

        Tz888.BLL.Common.DictionaryInfoBLL     diBll  = new Tz888.BLL.Common.DictionaryInfoBLL();
        Tz888.Model.Common.DictionaryInfoModel objDic = new Tz888.Model.Common.DictionaryInfoModel();
        objDic = diBll.GetModel("1");
        string strMainPointCount    = MainPointCount.ToString("c");
        string strMainPointCountVip = Convert.ToDecimal(Convert.ToString(Convert.ToDecimal(objDic.DictionaryInfoParam) * MainPointCount)).ToString("c");

        //收费的信息类容
        string sChange = "<ul><li>资源价格:<span class=\"orange01\"><strong>" + strMainPointCount + "</strong></span>元(拓富通会员价:<span class=\"orange01\"><strong>" + strMainPointCountVip + "</strong></span>元)</li>" +
                         "<li><a href=\"" + payDomain + "/order_item.aspx?InfoID=" + InfoID
                         + "\" class=\"spaces\"><img src=\"http://images.topfo.com/Info/Capital/1/images/tiem_03.jpg\" /></a>&nbsp;<a href=\"http://membertest.topfo.com/PayManage/shopcar.aspx?InfoID=" + InfoID
                         + "\" class=\"spaces\" target=\"_blank\"><img src=\"http://images.topfo.com/Info/Capital/1/images/tiem_05.jpg\" width=\"162\" height=\"36\" /></a></li>" +
                         "<li><font color=\"#CCCCCC\">支持多种支付方式,资源若无效经中国招商投资网确认后可全额返还所付款项,请放心购买</font></li></ul>";
        #endregion

        //sOut.Append(sContract);
        //多少人关注
        string Hits = "0";
        //if (dv != null && dv.Table.Rows.Count > 0)
        if (dt != null && dt.Rows.Count > 0)
        {
            Hits = dt.Rows[0]["hit"].ToString().Trim();
        }
        //sOut.Append("|");
        sOut.Append(Hits.Trim());

        //多少人收藏,同时更新浏览次数
        string ViewCollection = "0";
        if (MainPointCount > 0 && FixPriceID > 1)
        {
            Tz888.BLL.Info.MatchInfoBLL miBLL = new Tz888.BLL.Info.MatchInfoBLL();
            miBLL.dvViewCollectionCount(InfoID);//更新浏览次数
            Tz888.BLL.Info.MainInfoBLL mainBLL = new Tz888.BLL.Info.MainInfoBLL();
            ViewCollection = mainBLL.GetInfoBuyersCount(Convert.ToInt64(InfoID)).ToString();
        }
        else
        {
            Tz888.BLL.Info.MatchInfoBLL miBLL = new Tz888.BLL.Info.MatchInfoBLL();

            DataView dvViewCollection = miBLL.dvViewCollectionCount(InfoID);
            if (dvViewCollection != null && dvViewCollection.Table.Rows.Count > 0)
            {
                ViewCollection = Convert.ToInt32(dvViewCollection.Table.Rows[0][0]).ToString();
            }
        }
        sOut.Append("|");
        sOut.Append(ViewCollection.Trim());

        //推荐次数
        sOut.Append("|");
        sOut.Append("3");
        //留言条数
        Tz888.BLL.Conn dal = new Tz888.BLL.Conn();
        int            c   = dal.GetCount("InfoCommentTab", "InfoID", "InfoID=" + InfoID);

        sOut.Append("|");
        sOut.Append(c.ToString());

        sOut.Append("|");
        if (MainPointCount > 0 && FixPriceID > 1)
        {
            //这是一条收费信息
            bool bIsBuy = false;
            Tz888.BLL.Info.CapitalInfoBLL ciBll = new Tz888.BLL.Info.CapitalInfoBLL();
            bIsBuy = ciBll.bIsBuyInfoOfUser(CurrentUserName, InfoID);
            if (bIsBuy)
            {
                sContract = sFree;
            }
            else
            {
                sContract = sChange;
            }
        }
        else
        {
            sContract = sFree;
        }

        sOut.Append(sContract);
        return(sOut.ToString().Trim());
    }
示例#29
0
    /// <summary>
    /// 确认修改信息
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void BtnOk_Click(object sender, EventArgs e)
    {
        //判断电话与手机号
        if (txtTel.Value.Trim() == "" && txtMobile.Value.Trim() == "")
        {
            //Tz888.Common.MessageBox.Show(this.Page, "固定电话或手机至少填写一项,请检查!");
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", "alert('固定电话或手机至少填写一项,请检查!');", false);
            return;
        }

        Tz888.Model.Info.ProjectSetModel model = new Tz888.Model.Info.ProjectSetModel();

        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.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //上传文件

        List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>();         //融资行业实体列表

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

        //借款单位年营业收入

        //model.ProjectInfoModel.nDwlyysy = decimal.Parse(tbDwlyysy.Value);
        model.ProjectInfoModel.nDwlyysy = decimal.Parse(tbDwlyysy.Value);
        ////借款单位年净利润
        //model.ProjectInfoModel.nDwljly = decimal.Parse(tbDwljly.Value);
        model.ProjectInfoModel.nDwljly = decimal.Parse(tbDwljly.Value);
        ////借款单位总资产
        model.ProjectInfoModel.nDwzzc = decimal.Parse(tbDwzzc.Value);
        //model.ProjectInfoModel.CompanyTotalCapital = decimal.Parse(tbDwzzc.Value);
        ////借款单位总负债

        //model.ProjectInfoModel.CompanyTotalDebet = decimal.Parse(tbDwzfz.Value);
        model.ProjectInfoModel.nDwzfz = decimal.Parse(tbDwzfz.Value);

        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(this.txtXmqxms.Value.Trim());
        model.ProjectInfoModel.IndustryBID = this.SelectIndustryControl1.IndustryString;

        model.ProjectInfoModel.financingID = Tz888.Common.Text.GetCheckBoxList(cblTnObj);

        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 = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtCompanyName.Value.Trim());
        model.InfoContactModel.Name             = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtLinkMan.Value.Trim());
        model.InfoContactModel.Career           = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtCareer.Value.Trim());
        model.InfoContactModel.TelStateCode     = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtTelStateCode.Value.Trim());
        model.InfoContactModel.TelNum           = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtTel.Value.Trim());
        model.InfoContactModel.Mobile           = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtMobile.Value.Trim());
        model.InfoContactModel.Email            = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtEmail.Value.Trim());
        model.InfoContactModel.Address          = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtAddress.Value.Trim());
        model.InfoContactModel.WebSite          = txtWebSite.Value.Trim();

        //-----------------201006资源超市第二次改版,----------------------//
        //项目立项情况
        model.ProjectInfoModel.sXmlxqk = Tz888.Common.Text.GetCheckBoxList(cblXmlxqk);
        //企业发展阶段
        model.ProjectInfoModel.sQyfzjd = rblQyfzjd.SelectedValue.Trim();

        //要求资金到位情况
        model.ProjectInfoModel.iYqzjdwqk = Tz888.Common.Text.FormatData(rblYqzjdwqk.SelectedValue.Trim());


        //--------------------------------------------------------------
        //*市场占有率(份额)
        model.ProjectInfoModel.iSczylfy = Tz888.Common.Text.FormatData(tbSczylfy.Value.Trim());
        //*行业市场增长率
        model.ProjectInfoModel.iHysczzl = Tz888.Common.Text.FormatData(tbYysczzl.Value.Trim());
        //*资产负债率
        model.ProjectInfoModel.iZcfzl = Tz888.Common.Text.FormatData(tbZcfzl.Value.Trim());
        //--------------------------------------------------------------
        //投资回报期
        model.ProjectInfoModel.iXmtzfbzq = Tz888.Common.Text.FormatData(rblXmtzfbzq.SelectedValue.Trim());


        //项目有效期限
        model.MainInfoModel.ValidateTerm = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim());
        //项目摘要
        model.ProjectInfoModel.ComBrief = txtProIntro.Value.Trim();

        //项目关键字 textbox
        string strXmgjz = "";

        if (Xmgjz1.Value.Trim() != "")
        {
            strXmgjz = Xmgjz1.Value.Trim() + ",";
        }
        if (Xmgjz2.Value.Trim() != "")
        {
            strXmgjz += Xmgjz2.Value.Trim() + ",";
        }
        if (Xmgjz3.Value.Trim() != "")
        {
            strXmgjz += Xmgjz3.Value.Trim();
        }
        model.ProjectInfoModel.sXmgjz = strXmgjz;
        //产品概述
        model.ProjectInfoModel.ProjectAbout = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtProjectAbout.Value.Trim());
        //市场前景
        model.ProjectInfoModel.marketAbout = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtMarketAbout.Value.Trim());
        //竞争分析
        model.ProjectInfoModel.competitioAbout = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtCompetitioAbout.Value.Trim());
        //商业模式
        model.ProjectInfoModel.BussinessModeAbout = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtBussinessModeAbout.Value.Trim());
        //管理团队
        model.ProjectInfoModel.ManageTeamAbout = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtManageTeamAbout.Value.Trim());

        //信息完整度


        model.ProjectInfoModel.InformationIntegrity = GetInformationIntegrity();
        //-----------------END--------------------------------------------

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

        //上传文件
        infoResourceModels = FilesUploadControl1.InfoList;

        if (bll.ProjectInfoGQ_Update(model, infoResourceModels))
        {
            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());
        }
    }
    protected void BtnOk_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.ProjectSetModel model = new Tz888.Model.Info.ProjectSetModel();
        //判断电话与手机号
        if (txtTel.Value.Trim() == "" && txtMobile.Value.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "固定电话或手机至少填写一项,请检查!");
            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);
        //ds = obj.readIPAddress(strLoginName, 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.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //上传文件


        List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>(); //融资行业实体列表
        DateTime time_Now = DateTime.Now;

        industryModels = this.SelectIndustryControl1.IndustryModels;

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

        //投资总额
        if (!string.IsNullOrEmpty(this.txtCapitalTotal.Text.Trim()))
        {
            model.ProjectInfoModel.CapitalTotal = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim());
        }

        //借钱金额
        model.ProjectInfoModel.CapitalID = rblJqjy.SelectedValue.Trim();
        //项目详细描述
        model.ProjectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.tbXmqxms.Value.Trim());
        //行业
        foreach (Tz888.Model.Common.IndustryModel models in industryModels)
        {
            model.ProjectInfoModel.IndustryBID += models.IndustryBID + ",";
        }
        model.ProjectInfoModel.CooperationDemandType = "9";//债券融资

        //融资对象
        model.ProjectInfoModel.financingID = Tz888.Common.Text.GetCheckBoxList(cblTnObj);
        //融资计划及还款能力


        model.ProjectInfoModel.warrant = txtWarrant.Value.Trim();



        //-----------------201006资源超市第二次改版,----------------------//
        //项目立项情况
        model.ProjectInfoModel.cZqXmlxqkb = Tz888.Common.Text.GetCheckBoxList(cblXmlxqk);
        //企业发展阶段
        model.ProjectInfoModel.cZqQyfzjd = rblQyfzjd.SelectedValue.Trim();

        //要求资金到位情况
        model.ProjectInfoModel.iZqYqjjdwqk = Tz888.Common.Text.FormatData(rblYqzjdwqk.SelectedValue.Trim());
        //产品市场增长率
        model.ProjectInfoModel.iZqCpsczzl = Tz888.Common.Text.FormatData(tbCpsczzl.Value.Trim());

        //产品市场容量
        model.ProjectInfoModel.iZqCpscYl = Tz888.Common.Text.FormatData(tbCpscyl.Value.Trim());
        //资产负债率
        model.ProjectInfoModel.iZqZcfzl = Tz888.Common.Text.FormatData(tbZcfzl.Value.Trim());
        //流动比率
        model.ProjectInfoModel.iZqYdbl = Tz888.Common.Text.FormatData(tbLdbl.Value.Trim());
        //投资收益率


        model.ProjectInfoModel.iZqTzsl = Tz888.Common.Text.FormatData(tbTzsyl.Value.Trim());
        //销售利润率
        model.ProjectInfoModel.iZqXslyl = Tz888.Common.Text.FormatData(tbXslyl.Value.Trim());
        //投资回报期


        model.ProjectInfoModel.iZqTzfbq = Tz888.Common.Text.FormatData(rblXmtzfbzq.SelectedValue.Trim());
        //项目有效期限
        //model.ProjectInfoModel.iZqXmyxqs = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim());
        model.ProjectInfoModel.iZqXmyxqs = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim());
        //项目摘要
        model.ProjectInfoModel.ComBrief = tbXmzy.Value.Trim();

        //项目关键字 textbox
        string strXmgjz = "";

        if (tbXmgjz1.Value.Trim() != "")
        {
            strXmgjz = tbXmgjz1.Value.Trim() + ",";
        }
        if (tbXmgjz2.Value.Trim() != "")
        {
            strXmgjz += tbXmgjz2.Value.Trim() + ",";
        }
        if (tbXmgjz3.Value.Trim() != "")
        {
            strXmgjz += tbXmgjz3.Value.Trim();
        }
        model.ProjectInfoModel.cZqXmgjz = strXmgjz;

        model.ProjectInfoModel.nDwlyysy = Convert.ToDecimal(this.tbJkdwlyysy.Value);      //单位年营业收入
        model.ProjectInfoModel.nDwljly  = Convert.ToDecimal(this.tbJkdwljly.Value);       //单位年净利润
        model.ProjectInfoModel.nDwzzc   = Convert.ToDecimal(this.tbJkdwzzc.Value.Trim()); //单位总资产
        model.ProjectInfoModel.nDwzfz   = Convert.ToDecimal(this.tbJkdwzfz.Value.Trim()); //单位总负债
        //产品概述
        model.ProjectInfoModel.cZqCpks = tbCpks.Value.Trim();
        //市场前景
        model.ProjectInfoModel.marketAbout = tbScqj.Value.Trim();
        //竞争分析
        model.ProjectInfoModel.cZqJzfx = tbJjfs.Value.Trim();
        //商业模式
        model.ProjectInfoModel.cZqSyms = tbSyms.Value.Trim();
        //管理团队
        model.ProjectInfoModel.cZqGltd = tbGltd.Value.Trim();

        //信息完整度


        model.ProjectInfoModel.InformationIntegrity = GetInformationIntegrity();
        //-----------------END--------------------------------------------



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

        string str = industryModels[0].IndustryBID;

        model.MainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Project", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, time_Now);
        model.MainInfoModel.publishT = time_Now;
        model.MainInfoModel.Hit      = 0;
        model.MainInfoModel.InfoID   = _infoID2;
        model.MainInfoModel.IsCore   = true;
        //##mainInfoModel.LoginName = Page.User.Identity.Name;
        model.MainInfoModel.LoginName          = strLoginName;
        model.MainInfoModel.InfoOriginRoleName = "0"; //用户角色
        model.MainInfoModel.GradeID            = "0";
        model.MainInfoModel.FixPriceID         = "1";
        model.MainInfoModel.FeeStatus          = 0;
        //model.ProjectInfoModel.iZqXmyxqs = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限

        model.MainInfoModel.Descript = "";
        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
        {
            model.MainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        }
        model.MainInfoModel.FrontDisplayTime  = time_Now;
        model.MainInfoModel.ValidateStartTime = time_Now;
        model.ProjectInfoModel.iZqXmyxqs      = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限

        model.MainInfoModel.TemplateID = "001";
        model.MainInfoModel.HtmlFile   = "";

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

        string theURL = Request.CurrentExecutionFilePath;

        ////联系信息
        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();



        //上传文件
        infoResourceModels = FilesUploadControl1.InfoList;

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

        int returnValue = ConfirmContact();      //确认联络方式

        if (returnValue == 1)
        {
            if (bll.ProjectInfoZQ_Update(model, infoResourceModels))
            {
                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());
            }
        }
    }