/// <summary>
        /// update existing student info
        /// </summary>
        /// <param name="s"></param>
        public static void UpdateProductVariation(PLProductVariation s)
        {
            SLProductVariation.ProductVariationInfo newProductVariation = DTO_to_SL(s);

            SLProductVariation.ISLProductVariation SLProductVariation = new SLProductVariation.SLProductVariationClient();
            string[] errors = new string[0];
            SLProductVariation.UpdatePV(newProductVariation, ref errors);
        }
        public static List <PLProductVariation> ReadAllPV()
        {
            List <PLProductVariation> ProductVariationList = new List <PLProductVariation>();

            SLProductVariation.ISLProductVariation SLProductVariation = new SLProductVariation.SLProductVariationClient();

            string[] errors = new string[0];
            SLProductVariation.ProductVariationInfo[] ProductVariationsLoaded = SLProductVariation.ReadAllPV(ref errors);

            foreach (SLProductVariation.ProductVariationInfo s in ProductVariationsLoaded)
            {
                PLProductVariation ProductVariation = DTO_to_PL(s);
                ProductVariationList.Add(ProductVariation);
            }

            return(ProductVariationList);
        }
        /// <summary>
        /// this is data transfer object for student.
        /// Converting from presentation layer student object to business layer student object
        /// </summary>
        /// <param name="student"></param>
        /// <returns></returns>
        public static SLProductVariation.ProductVariationInfo DTO_to_SL(PLProductVariation pv)
        {
            SLProductVariation.ProductVariationInfo SLProductVariation = new MVC3.SLProductVariation.ProductVariationInfo();
            SLProductVariation.product_variation_id = pv.pv_id;
            SLProductVariation.product_id           = pv.product_id;
            SLProductVariation.product_brand_id     = pv.brand_id;
            SLProductVariation.product_color_id     = pv.product_color_id;
            SLProductVariation.product_cutting_id   = pv.product_cutting_id;
            SLProductVariation.product_type_id      = pv.product_type_id;
            SLProductVariation.sex       = pv.sex;
            SLProductVariation.size      = pv.size;
            SLProductVariation.stock     = pv.stock;
            SLProductVariation.price     = pv.stock;
            SLProductVariation.condition = pv.condition;

            return(SLProductVariation);
        }