public MainWindow()
 {
     using (var db = new DALContext())
     {
         InitializeComponent();
         BLimp  mybl  = new BLimp();
         DALimp mydal = new DALimp();
         //mydal.AddDeliveryMen(new DeliveryMen(1567, "sa", "fzeyd@kzrjh", "0658311966"));
         //mydal.Assignation(new Distribution(1), new DeliveryMen(1567));
         //    mydal.UpdateDeliveryMen2(new DeliveryMen(12345, "MALKI34", "fzeyd@kzrjh", "0658311966"));
         //Client a = new BE.Client { name = "harry", mail = "*****@*****.**", telephone = "0584494104", address = "3 villa fleurie", ID = 12 };
         //   Client b = new BE.Client { name = "ado", mail = "*****@*****.**", telephone = "0584494104", address = "3 villa fleurie", ID = 12 };
         //     Address a = new Address();
         //     Client c = new BE.Client { name = "banane", mail = "*****@*****.**", telephone = "0584494104", address = a, ID = 12 };
         //     int cvgv = 78;
         //  //   mybl.AddClient(c);
         //     int step1 = 7;
         //     int step2 = 89;
         //     int step3 = 12;
         //     int step4 = 23;
         //     List<Client> mylist = mybl.GetAllClients().ToList<Client>();
         //     int a13 = 26;
         //     Distribution b1 = new Distribution(78, new DateTime(2020, 09, 18), true);
         ////   mybl.AddDistribution(b1);
         //   mybl.Assignation2(c, new Distribution(1));
         // //    foreach (var item in mydal.GetAllCountry())
         // //    {
         // //        Console.WriteLine(item.city);
         // //    }
         // }
         mydal.distdone();
     }
 }
Ejemplo n.º 2
0
 // public event System.Windows.Forms.MouseEventHandler MouseClick;
 public Window1(addDisViewModel addDisViewModel)
 {
     InitializeComponent();
     this.addDisViewModel = addDisViewModel;
     DALimp test = new DALimp();
     listSelectedClients = new List<Client>();
     listView.ItemsSource = test.GetAllClients();
     myvm = new ListViewModel(this);
      DataContext = myvm;
 }
Ejemplo n.º 3
0
        public async Task help()
        {
            BLimp mybl = new BLimp();
            //Client a = new BE.Client { name = "harry", mail = "*****@*****.**", telephone = "0584494104", address = "Rue du Lt Jean Vigneux, Saint Gratien, France", ID = 1 };
            //Client b = new BE.Client { name = "ado", mail = "*****@*****.**", telephone = "0584494104", address = "52 rue jean collet meyzieu", ID = 2 };
            //Client c = new BE.Client { name = "banane", mail = "*****@*****.**", telephone = "0584494104", address = "35 rue chemin des pommiers meyzieu ", ID = 3 };
            Address a = new Address("שלום יהודה 6 תלפיות ירושלים", "ירושלים");
            Client  d = new Client {
                name = "banane", mail = "*****@*****.**", telephone = "0584494104", address = a, ID = 4
            };

            DALimp mydal = new DALimp();
            //await mydal.setLocation(a);
            //await mydal.setLocation(b);
            await mydal.setLocation(d);

            //await mybl.AddClient(a);
            //await mybl.AddClient(b);
            await mybl.AddClient(d);

            //on rajoute a la liste des psuhpin tout les push pin
            List <Pushpin> pushpins = new List <Pushpin>();

            foreach (var client in mybl.GetAllClients())
            {
                Pushpin pin = new Pushpin {
                    Location = client.location, Background = new SolidColorBrush(Colors.Yellow)
                };
                pushpins.Add(pin);
            }

            //on les rentre dans la carte
            foreach (var pin in pushpins)
            {
                this.myMap.Children.Add(pin);
            }
            // }
        }
Ejemplo n.º 4
0
 public BLimp()
 {
     this.testdal = new DALimp();
 }