/// <summary> /// update existing student info /// </summary> /// <param name="s"></param> public static void UpdateProductCutting(PLProductCutting s) { SLProductCutting.ProductCuttingInfo newProductCutting = DTO_to_SL_ProductCutting(s); SLProductCutting.ISLProductCutting SLProductCutting = new SLProductCutting.SLProductCuttingClient(); string[] errors = new string[0]; SLProductCutting.UpdateProductCutting(newProductCutting.product_cutting_id, newProductCutting.product_cutting_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 SLProductCutting.ProductCuttingInfo DTO_to_SL_ProductCutting(PLProductCutting ProductCutting) { SLProductCutting.ProductCuttingInfo SLProductCutting = new MVC3.SLProductCutting.ProductCuttingInfo(); SLProductCutting.product_cutting_id = ProductCutting.ProductCutting_id; SLProductCutting.product_cutting_name = ProductCutting.ProductCutting_name; return(SLProductCutting); }
public static List <PLProductCutting> ReadAllProductCutting() { List <PLProductCutting> ProductCuttingList = new List <PLProductCutting>(); SLProductCutting.ISLProductCutting SLProductCutting = new SLProductCutting.SLProductCuttingClient(); string[] errors = new string[0]; SLProductCutting.ProductCuttingInfo[] ProductCuttingsLoaded = SLProductCutting.ReadAllProductCutting(ref errors); foreach (SLProductCutting.ProductCuttingInfo s in ProductCuttingsLoaded) { PLProductCutting ProductCutting = DTO_to_PL_ProductCutting(s); ProductCuttingList.Add(ProductCutting); } return(ProductCuttingList); }