Example #1
0
        public void Hydrate(object[] data)
        {
            ArrayCursor <object> cursor = new ArrayCursor <object>(data);

            this.Id   = Int32.Parse(cursor.Read().ToString());
            this.Name = cursor.Read().ToString();
        }
Example #2
0
        /// <summary>
        /// Permet d'hydrater l'objet
        /// </summary>
        /// <param name="data"></param>
        public void Hydrate(object[] data)
        {
            ArrayCursor <object> cursor = new ArrayCursor <object>(data);

            this.Id      = Int32.Parse(cursor.Read().ToString());
            this.Address = cursor.Read().ToString();
            this.City    = CityManager.Instance.Find(cursor.Read().ToString());
        }
Example #3
0
        public void Hydrate(object[] data)
        {
            ArrayCursor <object> cursor = new ArrayCursor <object>(data);

            this.Id       = Int32.Parse(cursor.Read().ToString());
            this.Quantity = Int32.Parse(cursor.Read().ToString());
            this.Product  = ProductManager.Instance.Find(cursor.Read().ToString());
            this.Store    = StoreManager.Instance.Find(cursor.Read().ToString());
        }
Example #4
0
        public void Hydrate(object[] data)
        {
            ArrayCursor <object> cursor = new ArrayCursor <object>(data);

            this.Id         = Int32.Parse(cursor.Read().ToString());
            this.Name       = cursor.Read().ToString();
            this.PostalCode = cursor.Read().ToString();
            this.Country    = CountryManager.Instance.Find(cursor.Read().ToString());
        }
Example #5
0
        public void TestReadAndNext()
        {
            IEnumerable <int> tabofInts = from value in Enumerable.Range(0, 9)
                                          select value;
            ArrayCursor <int> cursor = new ArrayCursor <int>(tabofInts);

            Assert.IsTrue(cursor.Read() == tabofInts.ToArray()[0]);
            Assert.IsTrue(cursor.Read() == tabofInts.ToArray()[1]);
        }
Example #6
0
        /// <summary>
        /// Permet d'hydrater l'objet
        /// </summary>
        /// <param name="data"></param>
        public void Hydrate(object[] data)
        {
            ArrayCursor <object> cursor = new ArrayCursor <object>(data);

            this.Id           = Int32.Parse(cursor.Read().ToString());
            this.StartingDate = DateTime.Parse(cursor.Read().ToString());
            this.EndingDate   = DateTime.Parse(cursor.Read().ToString());
            this.Employee     = EmployeeManager.Instance.Find(cursor.Read().ToString());
            this.Accepted     = bool.Parse(cursor.Read().ToString());
        }
Example #7
0
        public void Hydrate(object[] data)
        {
            ArrayCursor <object> cursor = new ArrayCursor <object>(data);

            this.Id   = Int32.Parse(cursor.Read().ToString());
            this.Name = cursor.Read().ToString();
            string parent = cursor.Read().ToString();

            if (!String.IsNullOrEmpty(parent))
            {
                this.ParentRole = RoleManager.Instance.Find(parent);
            }
        }
Example #8
0
        public void Hydrate(object[] data)
        {
            ArrayCursor <object> cursor = new ArrayCursor <object>(data);

            this.Id              = Int32.Parse(cursor.Read().ToString());
            this.Date            = DateTime.Parse(cursor.Read().ToString());
            this.DiscountPercent = Convert.ToSingle(cursor.Read().ToString());
            this.Employee        = EmployeeManager.Instance.Find(cursor.Read().ToString());
            this.Customer        = CustomerManager.Instance.Find(cursor.Read().ToString());
            this.Payment         = PaymentManager.Instance.Find(cursor.Read().ToString());
            string isPaid = cursor.Read().ToString();

            this.IsPaid     = isPaid == "True" || isPaid == "1";
            this.PaidAmount = Convert.ToSingle(cursor.Read().ToString());
        }
Example #9
0
        /// <summary>
        /// Permet d'hydrater l'objet
        /// </summary>
        /// <param name="data"></param>
        public void Hydrate(object[] data)
        {
            ArrayCursor <object> cursor = new ArrayCursor <object>(data);

            this.Id            = Int32.Parse(cursor.Read().ToString());
            this.Name          = cursor.Read().ToString();
            this.Designation   = cursor.Read().ToString();
            this.PurchasePrice = Convert.ToSingle(cursor.Read().ToString());
            this.SellPrice     = Convert.ToSingle(cursor.Read().ToString());
            this.TVA           = Convert.ToSingle(cursor.Read().ToString());
            this.EANCode       = cursor.Read().ToString();
        }
Example #10
0
        /// <summary>
        /// Permet d'hydrater l'objet
        /// </summary>
        /// <param name="data"></param>
        public void Hydrate(object[] data)
        {
            ArrayCursor <object> cursor = new ArrayCursor <object>(data);

            this.Id                = Int32.Parse(cursor.Read().ToString());
            this.LastName          = cursor.Read().ToString();
            this.FirstName         = cursor.Read().ToString();
            this.Username          = cursor.Read().ToString();
            this.Password          = cursor.Read().ToString();
            this.Address1          = cursor.Read().ToString();
            this.Address2          = cursor.Read().ToString();
            this.PhoneNumber       = cursor.Read().ToString();
            this.MobilePhoneNumber = cursor.Read().ToString();
            this.Email             = cursor.Read().ToString();
            this.DateOfBirth       = DateTime.Parse(cursor.Read().ToString());
            this.Comments          = cursor.Read().ToString().Replace(@"\'", "'");
            this.City              = CityManager.Instance.Find(cursor.Read().ToString());
            this.Role              = RoleManager.Instance.Find(cursor.Read().ToString());
            this.Store             = StoreManager.Instance.Find(cursor.Read().ToString());
            this.Gender            = GenderManager.Instance.Find(cursor.Read().ToString());
            this.EmailOnUpdate     = Convert.ToBoolean(cursor.Read());
        }