/// <summary> /// update existing student info /// </summary> /// <param name="s"></param> public static void UpdateProductColor(PLProductColor s) { SLProductColor.ProductColorInfo newProductColor = DTO_to_SL_ProductColor(s); SLProductColor.ISLProductColor SLProductColor = new SLProductColor.SLProductColorClient(); string[] errors = new string[0]; SLProductColor.UpdateProductColor(newProductColor.product_color_id, newProductColor.product_color_name, ref errors); }
/// <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 SLProductColor.ProductColorInfo DTO_to_SL_ProductColor(PLProductColor ProductColor) { SLProductColor.ProductColorInfo SLProductColor = new MVC3.SLProductColor.ProductColorInfo(); SLProductColor.product_color_id = ProductColor.ProductColor_id; SLProductColor.product_color_name = ProductColor.ProductColor_name; return(SLProductColor); }
public static List <PLProductColor> ReadAllProductColor() { List <PLProductColor> ProductColorList = new List <PLProductColor>(); SLProductColor.ISLProductColor SLProductColor = new SLProductColor.SLProductColorClient(); string[] errors = new string[0]; SLProductColor.ProductColorInfo[] ProductColorsLoaded = SLProductColor.ReadAllProductColor(ref errors); foreach (SLProductColor.ProductColorInfo s in ProductColorsLoaded) { PLProductColor ProductColor = DTO_to_PL_ProductColor(s); ProductColorList.Add(ProductColor); } return(ProductColorList); }