/// <summary> /// update existing student info /// </summary> /// <param name="s"></param> public static void UpdateProductType(PLProductType s) { SLProductType.ProductTypeInfo newProductType = DTO_to_SL_ProductType(s); SLProductType.ISLProductType SLProductType = new SLProductType.SLProductTypeClient(); string[] errors = new string[0]; SLProductType.UpdateProductType(newProductType.product_type_id, newProductType.product_type_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 SLProductType.ProductTypeInfo DTO_to_SL_ProductType(PLProductType ProductType) { SLProductType.ProductTypeInfo SLProductType = new MVC3.SLProductType.ProductTypeInfo(); SLProductType.product_type_id = ProductType.ProductType_id; SLProductType.product_type_name = ProductType.ProductType_name; return(SLProductType); }
public static List <PLProductType> ReadAllProductType() { List <PLProductType> ProductTypeList = new List <PLProductType>(); SLProductType.ISLProductType SLProductType = new SLProductType.SLProductTypeClient(); string[] errors = new string[0]; SLProductType.ProductTypeInfo[] ProductTypesLoaded = SLProductType.ReadAllProductType(ref errors); foreach (SLProductType.ProductTypeInfo s in ProductTypesLoaded) { PLProductType ProductType = DTO_to_PL_ProductType(s); ProductTypeList.Add(ProductType); } return(ProductTypeList); }