public ProductModel() { aDrum = new DrumPO(); drumList = new List <DrumPO>(); aCymbal = new CymbalPO(); cymbalList = new List <CymbalPO>(); }
public static CymbalDO MapCymbalPOtoDO(CymbalPO from) { CymbalDO to = new CymbalDO(); to.AccountID = from.AccountID; to.CymbalID = from.CymbalID; to.BrandName = from.BrandName; to.CymbalDescription = from.CymbalDescription; to.CymbalName = from.CymbalName; to.CymbalPrice = from.CymbalPrice; to.CymbalQuantity = from.CymbalQuantity; to.CymbalImgURL = from.CymbalImgURL; return(to); }
public static ProductModel MapBusinessModeltoProductModel(BusinessModel from) { ProductModel to = new ProductModel(); from.CartTotal = to.CartTotal; foreach (DrumBO drum in from.drumList) { DrumPO drumPO = new DrumPO(); drumPO = MapDrumBOtoPO(drum); to.drumList.Add(drumPO); } foreach (CymbalBO cymbal in from.cymbalList) { CymbalPO cymbalPO = new CymbalPO(); cymbalPO = MapCymbalBOtoPO(cymbal); to.cymbalList.Add(cymbalPO); } from.CartTotal = to.CartTotal; return(to); }