Ejemplo n.º 1
0
        /// <summary>
        /// Adds new DistributorAddress to DistributorAddresss collection.
        /// </summary>
        /// <param name="newDistributorAddress">Contains the DistributorAddress details to be added.</param>
        /// <returns>Determinates whether the new DistributorAddress is added.</returns>
        public override bool AddDistributorAddressDAL(DistributorAddress newDistributorAddress)
        {
            bool DistributorAddressAdded = false;

            try
            {
                newDistributorAddress.DistributorAddressID = Guid.NewGuid();
                DistributorAddressList.Add(newDistributorAddress);
                DistributorAddressAdded = true;
            }
            catch (Exception)
            {
                throw;
            }
            return(DistributorAddressAdded);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds new DistributorAddress to DistributorAddresss collection.
        /// </summary>
        /// <param name="newDistributorAddress">Contains the DistributorAddress details to be added.</param>
        /// <returns>Determinates whether the new DistributorAddress is added.</returns>
        public override bool AddDistributorAddressDAL(DistributorAddress newDistributorAddress)
        {
            bool DistributorAddressAdded = false;

            try
            {
                newDistributorAddress.AddressID            = Guid.NewGuid();
                newDistributorAddress.CreationDateTime     = DateTime.Now;
                newDistributorAddress.LastModifiedDateTime = DateTime.Now;
                DistributorAddressList.Add(newDistributorAddress);
                DistributorAddressAdded = true;
            }
            catch (Exception)
            {
                throw;
            }
            return(DistributorAddressAdded);
        }