Exemplo n.º 1
0
        public static List <DonationPO> MapDOtoPO(List <IDonationDO> iFrom)
        {
            List <DonationPO> iMap = new List <DonationPO>(); //creating new instance of a list

            foreach (IDonationDO prop in iFrom)               //loop to go through each property
            {
                DonationPO map = MapDOtoPO(prop);             //setting mapping info to variable
                iMap.Add(map);                                //Adding each property one by one
            }
            return(iMap);                                     //return new list
        }
Exemplo n.º 2
0
        public static IDonationDO MapPOtoDO(DonationPO iFrom)
        {
            IDonationDO oTo = new DonationDO(); //creating instance of an object

            //DO                //PO
            oTo.DonationID = iFrom.DonationID;
            oTo.UserID     = iFrom.UserID;
            oTo.Amount     = iFrom.Amount;
            oTo.CardNumber = iFrom.CardNumber;
            oTo.Rendered   = iFrom.Rendered;

            return(oTo); //returning that object
        }
Exemplo n.º 3
0
        public static DonationPO MapDOtoPO(IDonationDO iFrom)
        {
            DonationPO oTo = new DonationPO(); //creating new instance PO

            //DO                //PO
            oTo.DonationID = iFrom.DonationID;
            oTo.UserID     = iFrom.UserID;
            oTo.Amount     = iFrom.Amount;
            oTo.CardNumber = iFrom.CardNumber;
            oTo.Rendered   = iFrom.Rendered;

            return(oTo); //returning object
        }
Exemplo n.º 4
0
 public DonationVM()                         //Constructor
 {
     Donation     = new DonationPO();        //new instance
     DonationList = new List <DonationPO>(); //new instance of list
 }