Exemplo n.º 1
0
        /// <summary>
        /// 根据条件获取实体集合
        /// </summary>
        /// <param name="pc">pc</param>
        /// <param name="obc">obc</param>
        /// <returns>实体</returns>
        public List <SalesorderTypeStatusInfoModel> RetrieveMultiple(ParameterCollection pc, OrderByCollection obc)
        {
            List <SalesorderTypeStatusInfoModel> salesordertypestatusinfos = new List <SalesorderTypeStatusInfoModel>();

            SalesorderTypeStatusInfoModel salesordertypestatusinfo = new SalesorderTypeStatusInfoModel();
            DataTable dt = DbUtil.Current.RetrieveMultiple(salesordertypestatusinfo, pc, obc);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                salesordertypestatusinfo = new SalesorderTypeStatusInfoModel();
                salesordertypestatusinfo.ConvertFrom(dt, i);
                salesordertypestatusinfos.Add(salesordertypestatusinfo);
            }

            return(salesordertypestatusinfos);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 根据主键获取实体
        /// </summary>
        /// <param name="salsorderstatusid"></param>
        /// <returns>实体</returns>
        public SalesorderTypeStatusInfoModel Retrieve(string salsorderstatusid)
        {
            SalesorderTypeStatusInfoModel salesordertypestatusinfo = new SalesorderTypeStatusInfoModel();

            salesordertypestatusinfo.SalsorderStatusId = salsorderstatusid;

            DataTable dt = DbUtil.Current.Retrieve(salesordertypestatusinfo);

            if (dt.Rows.Count < 1)
            {
                return(null);
            }

            salesordertypestatusinfo.ConvertFrom(dt);

            return(salesordertypestatusinfo);
        }