/// <summary>
        /// 得到一个对象实体
        /// </summary>
        public LPWeb.Model.Company_Loan_Programs GetModel(int LoanProgramID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 LoanProgramID,LoanProgram from Company_Loan_Programs ");
            strSql.Append(" where LoanProgramID=@LoanProgramID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@LoanProgramID", SqlDbType.Int, 4)
            };
            parameters[0].Value = LoanProgramID;

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

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["LoanProgramID"].ToString() != "")
                {
                    model.LoanProgramID = int.Parse(ds.Tables[0].Rows[0]["LoanProgramID"].ToString());
                }
                model.LoanProgram = ds.Tables[0].Rows[0]["LoanProgram"].ToString();
                return(model);
            }
            else
            {
                return(null);
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(LPWeb.Model.Company_Loan_Programs model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into Company_Loan_Programs(");
            strSql.Append("LoanProgram)");
            strSql.Append(" values (");
            strSql.Append("@LoanProgram)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters =
            {
                new SqlParameter("@LoanProgram", SqlDbType.NVarChar, 150)
            };
            parameters[0].Value = model.LoanProgram;

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

            if (obj == null)
            {
                return(1);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(LPWeb.Model.Company_Loan_Programs model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update Company_Loan_Programs set ");
            strSql.Append("LoanProgramID=@LoanProgramID,");
            strSql.Append("LoanProgram=@LoanProgram");
            strSql.Append(" where LoanProgramID=@LoanProgramID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@LoanProgramID", SqlDbType.Int,      4),
                new SqlParameter("@LoanProgram",   SqlDbType.NVarChar, 150)
            };
            parameters[0].Value = model.LoanProgramID;
            parameters[1].Value = model.LoanProgram;

            DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
        }