Ejemplo n.º 1
0
 public Profile(Profile profile)
 {
     Id         = profile.Id;
     User       = new CommonUser(profile.User);
     ImageUrl   = profile.ImageUrl;
     UserOrders = profile.UserOrders;
 }
Ejemplo n.º 2
0
 public Profile()
 {
     Id         = 0;
     User       = new CommonUser();
     ImageUrl   = "";
     UserOrders = new List <Order>();
 }
        private void InitProfiles()
        {
            User user1 = new CommonUser(0, "X", DateTime.Now, 5,
                                        "+380*********", "@gmail", Orders, true);

            Users.Add(user1);
            Profile       prof1 = new Profile(0, user1, "url", Orders);
            Administrator user2 = new Administrator(1, "Ozon", DateTime.Now, 4.5,
                                                    "+380*********", "@gmail", new List <Order>());

            Administrators.Add(user2);

            Profile prof2 = new Profile(1, user2, "url1", Orders);

            Profiles.Add(prof1);
            prof1.User.Nickname = "12";
            prof1.User.Nickname = "Sephiroth";
            prof1.User.Nickname = "Sdsdsdsdsdssdsdsdsdsdsdsdssdsd";

            Profiles.Add(new Profile(prof1));

            Profiles.Add(new Profile());
            user1.CreateOrder(DateTime.Now,
                              user1.Id,
                              0,
                              0,
                              new OrderInfo {
                Description = "order", ImageUrl = "url", Naming = "Apples", Price = 100, Validated = false
            });
            user2.CreateOrder(DateTime.Now,
                              user2.Id,
                              0,
                              1,
                              new OrderInfo {
                Description = "order1", ImageUrl = "image", Naming = "Telephone", Price = 5000, Validated = false
            });
        }