示例#1
0
        /// <summary>
        /// Returns the Product ID instance that matches this ID
        /// </summary>
        /// <param name="ID">The ID of a Product object we want retrieved. </param>
        /// <returns> A Product business container with Product ID record information. </returns>
        public static Biz.Containers.Product Get(int ID)
        {
            Data.Sql.ProductSql ProductSql = new Data.Sql.ProductSql();
            Data.Containers.Product data = ProductSql.GetByID(ID);

            Biz.Containers.Product toReturn = ConvertFromDataContainer(data);

            return toReturn;
        }//end method
示例#2
0
        }//end method
        #endregion

        #region Conversion Methods
        /// <summary> Converts Data Container object to Business Container object </summary>
        /// <param name="data"> The data container Product object. </param>
        /// <returns> The business container Product object. </returns>
        internal static Biz.Containers.Product ConvertFromDataContainer(Data.Containers.Product data)
        {
            return new Biz.Containers.Product()
            {
                ID = data.ID,
                Name = data.Name,
                LOB = data.LOB,
                Model = data.Model,
                Variant = data.Variant,
                Phase = data.Phase
            };
        }//end Method