Exemple #1
0
        public static CymbalBO MapCymbalPOtoBO(CymbalPO from)
        {
            CymbalBO to = new CymbalBO();

            to.AccountID         = from.AccountID;
            to.CymbalID          = from.CymbalID;
            to.CymbalName        = from.CymbalName;
            to.BrandName         = from.BrandName;
            to.CymbalDescription = from.CymbalDescription;
            to.CymbalImgURL      = from.CymbalImgURL;
            to.CymbalPrice       = from.CymbalPrice;
            to.CymbalQuantity    = from.CymbalQuantity;
            to.CheckoutQty       = from.CheckoutQty;

            return(to);
        }
Exemple #2
0
        public static BusinessModel MapProductModeltoBusinessModel(ProductModel from)
        {
            BusinessModel to = new BusinessModel();

            foreach (DrumPO drum in from.drumList)
            {
                DrumBO drumBO = new DrumBO();
                drumBO = MapDrumPOtoBO(drum);
                to.drumList.Add(drumBO);
            }
            foreach (CymbalPO cymbal in from.cymbalList)
            {
                CymbalBO cymbalBO = new CymbalBO();
                cymbalBO = MapCymbalPOtoBO(cymbal);
                to.cymbalList.Add(cymbalBO);
            }
            from.CartTotal = to.CartTotal;
            return(to);
        }