Ejemplo n.º 1
0
    public void btnCustom_Click(object sender, System.EventArgs e)
    {
        Tz888.Model.CustomInfoModel CustomInfo = (Tz888.Model.CustomInfoModel)Session["customInfo"];
        Tz888.BLL.CustomInfoBLL     CustomObj  = new Tz888.BLL.CustomInfoBLL();

        //CustomInfo.LoginName = "";//Page.User.Identity.Name.Trim();

        CustomInfo.Accept = true;
        //CustomInfo.CustomCyc = Convert.ToInt32(strCustomCyc);

        //CustomInfo.CustomType = Convert.ToInt32(strCustomType);


        CustomInfo.Title = this.txtTitle.Text;
        //CustomInfo.ValidateTerm = Convert.ToInt32(this.rblValidateTerm.SelectedValue.ToString().Trim());
        //CustomInfo.ItemCount = Convert.ToInt32(this.ddlItemCount.SelectedValue.ToString().Trim());

        string name = CustomInfo.CooperationDemandTypeID;

        if (tag == "Add")
        {
            int i = CustomObj.Add(CustomInfo);
            Tz888.Common.MessageBox.Show(this.Page, CustomInfo.LoginName.ToString());
            this.Page.Response.Redirect("TestMatchingInfo.aspx");
            //   Tz888.Common.MessageBox.Show(this.Page, i.ToString());
            return;
        }
        if (tag == "Update")
        {
            CustomObj.Update(CustomInfo);
            this.Page.Response.Redirect("TestMatchingInfo.aspx");
            // Tz888.Common.MessageBox.Show(this.Page, "修改定阅成功。");
        }
    }
Ejemplo n.º 2
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        Tz888.BLL.CustomInfoBLL CustomInfo = new Tz888.BLL.CustomInfoBLL();
        int index = Convert.ToInt32(e.CommandArgument);

        CustomInfo.Delete(index);
        forPageLoad();
    }
Ejemplo n.º 3
0
    private void MackAddTable()
    {
        #region 变量定义
        string strCustomType     = this.Hidden1.Value.ToString();// this.ViewState["CustomType"].ToString();
        string strCustomTypeName = "政府招商";
        switch (strCustomType)
        {
        case "0":
            strCustomTypeName = "政府招商";
            break;

        case "1":
            strCustomTypeName = "资本项目";
            break;

        case "2":
            strCustomTypeName = "企业项目";
            break;

        case "3":
            strCustomTypeName = "资讯信息";
            break;

        default:
            strCustomTypeName = "资本项目";
            break;
        }
        /*2010-06-17修改*/
        Tz888.BLL.CustomInfoBLL     BLL        = new Tz888.BLL.CustomInfoBLL();
        Tz888.Model.CustomInfoModel customInfo = new Tz888.Model.CustomInfoModel();

        //customInfo.Accept   是否接收邮件默认为1


        string strTitle = strCustomTypeName + System.DateTime.Now.ToString();
        this.ViewState["title"] = strTitle;
        string strType = "";

        string strGenre                   = "";
        string strMoney                   = "0";
        string strCalling                 = "";
        string strCallingTxt              = "";
        string strSmallCalling            = "";
        string strSmallCallingTxt         = "";
        string strCity                    = "";
        string strCityTxt                 = "";
        string strKeyword                 = "";
        int    iValidateTerm              = 0;  //有效时间
        string strCurrency                = "";
        string strCooperationDemandTypeID = ""; //合作类型


        byte   bAccept    = 1;
        int    iCustomCyc = 2;
        int    iItemCount = 10;
        string strEmail   = "";
        //投资阶段
        string strStageForenterpriseDevelop = "";
        //融资对象
        string strfinancingObject = "";
        string strtrade           = ""; //投资行业
        #endregion

        #region  变量赋值

        #region 政府招商
        if (strCustomType == "0")   //政府招商
        {
            //投资行业
            strCalling    = hidZfCalling.Value.Trim();
            strCallingTxt = hidZfCallingTxt.Value;

            //投资区域
            strCity    = hidZfCity.Value.Trim();
            strCityTxt = hidZfCityTxt.Value.Trim();
        }
        #endregion

        #region 资本资源
        else if (strCustomType == "1")
        {
            //单项目可投资金额
            for (int i = 0; i < this.chkCapital.Items.Count; i++)
            {
                if (this.chkCapital.Items.Count == 0)
                {
                    strMoney = "0";//默认为不限资金
                }
                if (this.chkCapital.Items[i].Selected)
                {
                    strMoney = strMoney + this.chkCapital.Items[i].Value.Trim() + "|";
                }
            }
            if (strMoney.Trim() != "")
            {
                strMoney = strMoney.Substring(0, strMoney.Length - 1);
            }


            //投资行业
            strCalling    = hidZyCalling.Value.Trim();
            strCallingTxt = hidZyCallingTxt.Value;

            //投资区域
            strCity    = hidZyCity.Value.Trim();
            strCityTxt = hidZyCityTxt.Value.Trim();
        }
        #endregion

        #region 企业项目
        else if (strCustomType == "2")
        {
            //融资类型
            for (int i = 0; i < ckRzlxQy.Items.Count; i++)
            {
                if (ckRzlxQy.Items[i].Selected)
                {
                    strType = strType + ckRzlxQy.Items[i].Value + "|";
                }
            }
            if (strType.Trim() != "")
            {
                strType = strType.Substring(0, strType.Length - 1);
            }
            //投资行业
            strCalling    = hidQyCalling.Value.Trim();
            strCallingTxt = hidQyCallingTxt.Value;

            //投资区域
            strCity    = hidQyCity.Value.Trim();
            strCityTxt = hidQyCityTxt.Value.Trim();
            //借款金额
            for (int i = 0; i < this.ckJkjeQy.Items.Count; i++)
            {
                //if (this.ckJkjeQy.Items.Count == 0)
                //{
                //    strMoney = "0";//默认为不限资金

                //}

                if (this.ckJkjeQy.Items[i].Selected)
                {
                    strMoney = strMoney + this.ckJkjeQy.Items[i].Value.Trim() + "|";
                }
            }
            if (strMoney.Trim() != "")
            {
                strMoney = strMoney.Substring(0, strType.Length - 1);
            }
        }
        #endregion

        #region 将信添加至model 并存至 session
        Tz888.Model.CustomInfoModel CustomInfo = new Tz888.Model.CustomInfoModel();

        //CustomInfo.ID = int.Parse(ID);

        //公共属性
        //strGenre = "";
        //strCalling = "";
        //strCallingTxt = "";
        //strSmallCalling = "";
        //strSmallCallingTxt = "";

        strKeyword    = this.txtKey.Text.Trim();
        iValidateTerm = Convert.ToInt32(ddlValidateTerm.SelectedValue.ToString());//有效时间g
        strCurrency   = "";

        bAccept    = 1;
        iCustomCyc = 2;
        iItemCount = 10;
        strEmail   = "";

        ////strCurrency = ddlCapitalCurrency.SelectedValue.ToString();

        CustomInfo.Accept    = true;
        CustomInfo.Email     = strEmail;
        CustomInfo.CustomCyc = Convert.ToInt32(this.ViewState["CustomCyc"]);//Convert.ToInt32(strCustomCyc);
        CustomInfo.LoginName = "topfo001";

        CustomInfo.CustomType   = Convert.ToInt32(strCustomType);
        CustomInfo.Type         = strType; //类型
        CustomInfo.Genre        = strGenre;
        CustomInfo.Money        = strMoney;
        CustomInfo.Calling      = strCalling;
        CustomInfo.SmallCalling = strSmallCalling;
        CustomInfo.City         = strCity;

        CustomInfo.CallingTxt      = strCallingTxt;
        CustomInfo.SmallCallingTxt = strSmallCallingTxt;
        CustomInfo.CityTxt         = strCityTxt;

        CustomInfo.Keyword  = strKeyword;
        CustomInfo.currency = strCurrency;
        CustomInfo.CooperationDemandTypeID = strCooperationDemandTypeID;  //合作方式

        CustomInfo.Title = strTitle;
        Session["title"] = strTitle;

        //新增字段
        CustomInfo.StageForenterpriseDevelop = strStageForenterpriseDevelop;
        CustomInfo.Trade           = strtrade;
        CustomInfo.FinancingObject = strfinancingObject;



        Session["customInfo"] = CustomInfo;

        #endregion

        //添加数据至 信息定制表
    }