public ProductModel()
 {
     aDrum      = new DrumPO();
     drumList   = new List <DrumPO>();
     aCymbal    = new CymbalPO();
     cymbalList = new List <CymbalPO>();
 }
Exemple #2
0
        public static DrumDO MapDrumPOtoDO(DrumPO from)
        {
            DrumDO to = new DrumDO();

            to.AccountID       = from.AccountID;
            to.DrumID          = from.DrumID;
            to.BrandName       = from.BrandName;
            to.DrumType        = from.DrumType;
            to.DrumDescription = from.DrumDescription;
            to.DrumPrice       = from.DrumPrice;
            to.DrumQuantity    = from.DrumQuantity;
            to.DrumImgURL      = from.DrumImgURL;

            return(to);
        }
Exemple #3
0
        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);
        }