示例#1
0
    //protected void Page_PreInit(object sender, EventArgs e)
    //{
    //    bool isTof = Page.User.IsInRole("GT1002");

    //    if (isTof)
    //    {
    //        Page.MasterPageFile = "/indexTof.master";
    //    }
    //    else
    //    {
    //        Page.MasterPageFile = "/MasterPage.master";
    //    }
    //}
    /// <summary>
    /// 商机类别
    /// </summary>
    private void SetOpportun()
    {
        Tz888.BLL.Info.OpportunityInfoBLL opp = new Tz888.BLL.Info.OpportunityInfoBLL();
        this.ddlOpportunityType.DataSource     = opp.GetOpportun();
        this.ddlOpportunityType.DataValueField = "OpportunityTypeID";
        this.ddlOpportunityType.DataTextField  = "OpportunityTypeName";
        this.ddlOpportunityType.DataBind();
    }
示例#2
0
 /// <summary>
 /// 所属行业
 /// </summary>
 private void GetIndustry()
 {
     Tz888.BLL.Info.OpportunityInfoBLL opp = new Tz888.BLL.Info.OpportunityInfoBLL();
     this.ddlIndustry.DataSource     = opp.GetIndustry();
     this.ddlIndustry.DataValueField = "IndustryOpportunityID";
     this.ddlIndustry.DataTextField  = "IndustryOpportunityName";
     this.ddlIndustry.DataBind();
 }
示例#3
0
    protected void IbtnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //这里是判断验证码
        try//验证验证码
        {
            if (Session["valationNo"] == null || ImageCode.Text.ToUpper().Trim() != Session["valationNo"].ToString().ToUpper().Trim() || Session["valationNo"].ToString().Trim() == "")
            {
                Tz888.Common.MessageBox.Show(this.Page, "验证码错误!");
                return;
            }
        }
        catch
        {
            Tz888.Common.MessageBox.Show(this.Page, "未知错误!");
        }
        #region 参数

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

        industryModels = this.SelectIndustryControl1.IndustryModels;

        #endregion
        int    Hit = 0;
        Random rnd = new Random();
        Hit = rnd.Next(25) + 5;
        #region 创建实例,将数据传入系统
        #region 插入数据
        //OpportunityInformation pOpportunity = new OpportunityInformation();
        Tz888.Model.Info.MainInfoModel        main          = new Tz888.Model.Info.MainInfoModel();        //主表
        Tz888.Model.Info.OpportunityInfoModel pOpportunity  = new Tz888.Model.Info.OpportunityInfoModel(); //商机信息表
        Tz888.Model.Info.ShortInfoModel       shortInfoRule = new Tz888.Model.Info.ShortInfoModel();       //短消息表
        #region 主表

        main.Title              = txtTitle.Text.Trim();
        main.InfoCode           = Tz888.BLL.Info.Common.CreateInfoCode("Oppor", industryModels[0].IndustryBID, this.ZoneSelectControl2.CountryID, DateTime.Now);
        main.publishT           = Convert.ToDateTime(DateTime.Now);
        main.Hit                = Hit;
        main.LoginName          = "8ming";
        main.InfoOriginRoleName = "0";

        main.KeyWord           = txtKeyWord.Text.Trim();
        main.Descript          = txtDescript.Text.Trim();
        main.DisplayTitle      = txtDisplayTitle.Text.Trim();
        main.FrontDisplayTime  = Convert.ToDateTime(DateTime.Now);
        main.ValidateStartTime = Convert.ToDateTime(DateTime.Now);
        main.ValidateTerm      = Convert.ToInt32(this.rdbtXM.SelectedValue.Trim());;
        main.TemplateID        = "001";
        main.HtmlFile          = "";
        #endregion

        #region 商机信息表
        pOpportunity.AdTitle         = txtAdTitle.Text.Trim();
        pOpportunity.OpportunityType = ddlOpportunityType.SelectedValue.ToString().Trim();
        pOpportunity.CountryCode     = ZoneSelectControl2.CountryID;
        pOpportunity.ProvinceID      = ZoneSelectControl2.ProvinceID;
        pOpportunity.CountyID        = ZoneSelectControl2.CountyID;

        pOpportunity.IndustryOpportunityID = this.SelectIndustryControl1.IndustryString;
        pOpportunity.ValidateID            = this.rdbtXM.SelectedValue.Trim();

        // pOpportunity.Pic1 = FilesUploadControl2.UploadImageURL;
        // pOpportunity.Pic1 = "";                   //图片
        pOpportunity.Pic1 = Convert.ToString(ViewState["strSavePath"]);

        pOpportunity.Content  = txtContent.Text;                                                                               //商机内容
        pOpportunity.Analysis = txtAnalysis.Text;                                                                              //商机分析
        pOpportunity.Request  = txtRequest.Text;                                                                               //商机需求
        pOpportunity.Flow     = txtFlow.Text;                                                                                  //商机流程
        pOpportunity.Remark   = txtRemark.Text;                                                                                //备注

        pOpportunity.ComName  = txtComName.Text.Trim();                                                                        //公司名称
        pOpportunity.LinkMan  = txtLinkMan.Text.Trim();                                                                        //联系人
        pOpportunity.Tel      = txtTelCountry.Text.Trim() + "-" + txtTelZoneCode.Text.Trim() + "-" + txtTelNumber.Text.Trim(); //电话
        pOpportunity.Fax      = "";
        pOpportunity.Mobile   = txtMobile.Text.Trim();                                                                         //手机
        pOpportunity.Address  = txtAddress.Text.Trim();                                                                        //地址
        pOpportunity.PostCode = txtPostCode.Text.Trim();                                                                       //
        pOpportunity.Email    = txtEmail.Text.Trim();                                                                          //邮箱
        pOpportunity.WebSite  = txtWebSite.Text.Trim();                                                                        //
        #endregion

        #region  短内容信息表

        shortInfoRule.ShortInfoControlID = "OpporIndex1";
        shortInfoRule.ShortTitle         = txtShortTitle.Text.Trim();
        shortInfoRule.ShortContent       = txtShortContent.Text.Trim();
        shortInfoRule.Remark             = "";
        #endregion

        //插入数据
        Tz888.BLL.Info.OpportunityInfoBLL opportun = new Tz888.BLL.Info.OpportunityInfoBLL();
        long InfoID = opportun.Insert(main, pOpportunity, shortInfoRule);
        #endregion
        #endregion

        if (InfoID != 0)
        {
            Response.Write("<script>alert('添加成功')</script>");
        }
        else
        {
            Response.Write("<script language=\"javascript\">alert('添加失败');window.location.href='/PublishOppor.aspx';</script>");
        }
    }