Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string strid = Request.QueryString["p"];
                NCPEP.Bll.T_BidTrans   blltr   = new NCPEP.Bll.T_BidTrans();
                NCPEP.Model.T_BidTrans modeltr = new NCPEP.Model.T_BidTrans();
                modeltr = blltr.GetModel(int.Parse(strid));
                NCPEP.Bll.T_Bid   bllbid   = new NCPEP.Bll.T_Bid();
                NCPEP.Model.T_Bid modelbid = new NCPEP.Model.T_Bid();
                modelbid = bllbid.GetModel(modeltr.FK_BidId);
                if (modelbid != null)
                {
                    NCPEP.Bll.T_LiceTran   bllli   = new NCPEP.Bll.T_LiceTran();
                    NCPEP.Model.T_LiceTran modelli = new NCPEP.Model.T_LiceTran();
                    modelli = bllli.GetModel(modelbid.FK_LiceTranId);
                    if (modelli != null)
                    {
                        NCPEP.Bll.T_IndicatorsRelations   bllin   = new NCPEP.Bll.T_IndicatorsRelations();
                        NCPEP.Model.T_IndicatorsRelations modelin = new NCPEP.Model.T_IndicatorsRelations();
                        DataTable dt     = bllin.GetList(" FK_MemberTypeCertificationId='" + modelli.MemberTypeId + "' and ApplicationType='4'").Tables[0];//出让方申请对应关系
                        string    strids = "";
                        foreach (DataRow dr in dt.Rows)
                        {
                            strids += dr["FK_TypeIndicatorNameId"].ToString() + ",";
                        }
                        strids = strids.Trim().TrimEnd(',');
                        NCPEP.Bll.T_UploadTypeIndicator bllup = new NCPEP.Bll.T_UploadTypeIndicator();
                        DataTable ddldt = new DataTable();
                        ddldt = bllup.GetList(" id in(" + strids + ")").Tables[0];
                        if (ddldt.Rows.Count > 0)
                        {
                            this.txtFK_UploadTypeIndicatorId.DataSource     = ddldt;
                            this.txtFK_UploadTypeIndicatorId.DataTextField  = "TypeIndicatorName";
                            this.txtFK_UploadTypeIndicatorId.DataValueField = "id";
                            this.txtFK_UploadTypeIndicatorId.DataBind();
                        }
                    }
                }

                BindFujian(strid);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(NCPEP.Model.T_BidTrans model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_BidTrans set ");
            strSql.Append("FK_BidId=@FK_BidId,");
            strSql.Append("FK_LiceTranId=@FK_LiceTranId,");
            strSql.Append("TradingStatus=@TradingStatus,");
            strSql.Append("Editor=@Editor,");
            strSql.Append("CreateDate=@CreateDate,");
            strSql.Append("ApplyDate=@ApplyDate");
            strSql.Append(" where Id=@Id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@FK_BidId",      SqlDbType.Int,        4),
                new SqlParameter("@FK_LiceTranId", SqlDbType.Int,        4),
                new SqlParameter("@TradingStatus", SqlDbType.Int,        4),
                new SqlParameter("@Editor",        SqlDbType.NVarChar,  50),
                new SqlParameter("@CreateDate",    SqlDbType.DateTime),
                new SqlParameter("@ApplyDate",     SqlDbType.DateTime),
                new SqlParameter("@Id",            SqlDbType.Int, 4)
            };
            parameters[0].Value = model.FK_BidId;
            parameters[1].Value = model.FK_LiceTranId;
            parameters[2].Value = model.TradingStatus;
            parameters[3].Value = model.Editor;
            parameters[4].Value = model.CreateDate;
            parameters[5].Value = model.ApplyDate;
            parameters[6].Value = model.Id;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(NCPEP.Model.T_BidTrans model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into T_BidTrans(");
            strSql.Append("FK_BidId,FK_LiceTranId,TradingStatus,Editor,CreateDate,ApplyDate)");
            strSql.Append(" values (");
            strSql.Append("@FK_BidId,@FK_LiceTranId,@TradingStatus,@Editor,@CreateDate,@ApplyDate)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters =
            {
                new SqlParameter("@FK_BidId",      SqlDbType.Int,        4),
                new SqlParameter("@FK_LiceTranId", SqlDbType.Int,        4),
                new SqlParameter("@TradingStatus", SqlDbType.Int,        4),
                new SqlParameter("@Editor",        SqlDbType.NVarChar,  50),
                new SqlParameter("@CreateDate",    SqlDbType.DateTime),
                new SqlParameter("@ApplyDate",     SqlDbType.DateTime)
            };
            parameters[0].Value = model.FK_BidId;
            parameters[1].Value = model.FK_LiceTranId;
            parameters[2].Value = model.TradingStatus;
            parameters[3].Value = model.Editor;
            parameters[4].Value = model.CreateDate;
            parameters[5].Value = model.ApplyDate;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
Esempio n. 4
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public NCPEP.Model.T_BidTrans DataRowToModel(DataRow row)
 {
     NCPEP.Model.T_BidTrans model = new NCPEP.Model.T_BidTrans();
     if (row != null)
     {
         if (row["Id"] != null && row["Id"].ToString() != "")
         {
             model.Id = int.Parse(row["Id"].ToString());
         }
         if (row["FK_BidId"] != null && row["FK_BidId"].ToString() != "")
         {
             model.FK_BidId = int.Parse(row["FK_BidId"].ToString());
         }
         if (row["FK_LiceTranId"] != null && row["FK_LiceTranId"].ToString() != "")
         {
             model.FK_LiceTranId = int.Parse(row["FK_LiceTranId"].ToString());
         }
         if (row["TradingStatus"] != null && row["TradingStatus"].ToString() != "")
         {
             model.TradingStatus = int.Parse(row["TradingStatus"].ToString());
         }
         if (row["Editor"] != null)
         {
             model.Editor = row["Editor"].ToString();
         }
         if (row["CreateDate"] != null && row["CreateDate"].ToString() != "")
         {
             model.CreateDate = DateTime.Parse(row["CreateDate"].ToString());
         }
         if (row["ApplyDate"] != null && row["ApplyDate"].ToString() != "")
         {
             model.ApplyDate = DateTime.Parse(row["ApplyDate"].ToString());
         }
     }
     return(model);
 }
Esempio n. 5
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public NCPEP.Model.T_BidTrans GetModel(int Id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 Id,FK_BidId,FK_LiceTranId,TradingStatus,Editor,CreateDate,ApplyDate from T_BidTrans ");
            strSql.Append(" where Id=@Id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Id", SqlDbType.Int, 4)
            };
            parameters[0].Value = Id;

            NCPEP.Model.T_BidTrans model = new NCPEP.Model.T_BidTrans();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 6
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(NCPEP.Model.T_BidTrans model)
 {
     return(dal.Update(model));
 }
Esempio n. 7
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(NCPEP.Model.T_BidTrans model)
 {
     return(dal.Add(model));
 }