Beispiel #1
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model">待新增公用价格等级实体</param>
        /// <returns></returns>
        public virtual bool Add(EyouSoft.Model.CompanyStructure.CommonPriceStandAdd model)
        {
            DbCommand dc = this._database.GetSqlStringCommand(SQL_CommonPriceStandAdd_INSERT);

            this._database.AddInParameter(dc, "companyid", DbType.AnsiStringFixedLength, model.CompanyId);
            this._database.AddInParameter(dc, "operatorid", DbType.AnsiStringFixedLength, model.OperatorId);
            this._database.AddInParameter(dc, "pricestandname", DbType.String, model.PriceStandName);
            if (DbHelper.ExecuteSql(dc, this._database) > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <returns></returns>
        public virtual IList <EyouSoft.Model.CompanyStructure.CommonPriceStandAdd> GetList()
        {
            IList <EyouSoft.Model.CompanyStructure.CommonPriceStandAdd> list = new List <EyouSoft.Model.CompanyStructure.CommonPriceStandAdd>();

            EyouSoft.Model.CompanyStructure.CommonPriceStandAdd model = null;
            DbCommand dc = this._database.GetSqlStringCommand(SQL_CommonPriceStandAdd_SELECT_List);

            using (IDataReader dr = DbHelper.ExecuteReader(dc, this._database))
            {
                while (dr.Read())
                {
                    model                = new EyouSoft.Model.CompanyStructure.CommonPriceStandAdd();
                    model.ID             = dr.GetInt32(dr.GetOrdinal("ID"));
                    model.CompanyId      = dr.GetString(dr.GetOrdinal("companyId"));
                    model.IssueTime      = dr.GetDateTime(dr.GetOrdinal("issueTime"));
                    model.OperatorId     = dr.GetString(dr.GetOrdinal("operatorId"));
                    model.PriceStandName = dr.GetString(dr.GetOrdinal("priceStandName"));
                    list.Add(model);
                    model = null;
                }
            }
            return(list);
        }
Beispiel #3
0
 /// <summary>
 /// 添加
 /// </summary>
 /// <param name="model">待新增公用价格等级实体</param>
 /// <returns></returns>
 public virtual bool Add(EyouSoft.Model.CompanyStructure.CommonPriceStandAdd model)
 {
     return(idal.Add(model));
 }