Esempio n. 1
0
        public ChercherStaff()
        {
            InitializeComponent();
            Client = new IfundamentalsClient();
            listL  = new List <StaffL>();
            List <Staff> listS = Client.GetStaffs().ToList <Staff>();

            foreach (Staff k in listS)
            {
                StaffL v32 = new StaffL();
                v32.Staff = k;

                v32.boole = false;
                listL.Add(v32);
            }
            List1.ItemsSource = listL;
            foreach (Staff s in listS)
            {
                if (s.Picture != null)
                {
                    FileStream fs = new FileStream(@"C:\Users\USER\Pictures\W3.CSS_files\" + s.Staff_ID + ".jpg", FileMode.Create);
                    fs.Write(s.Picture, 0, s.Picture.Length);
                    fs.Close();
                }
            }
        }
Esempio n. 2
0
        public AjouterStore()
        {
            /// List<int> cc = new List<int>();
            /// cc.int
            /// IfundamentalClient Still the Same Use allow me to interact with my services
            Client = new IfundamentalsClient();
            InitializeComponent();

            //2 List ListL is use to fill my table and ListS is use to fill List[i].Staff that's what i'm doing inside the foreach
            listL = new List <StaffL>();
            List <Staff> listS = Client.GetStaffs().ToList <Staff>();

            foreach (Staff k in listS)
            {
                StaffL v32 = new StaffL();
                v32.Staff = k;

                v32.boole = false;
                listL.Add(v32);
            }
            List1.ItemsSource = listL;

            //voir serveur pour definition des services
            //AllAddress me permet de remplir mon Combobox d'addresse
            ICollection <Address> AllAddress = Client.GetAddresses();

            AdresseComboBox.ItemsSource       = AllAddress;
            AdresseComboBox.DisplayMemberPath = "Address_Lib";


            //Create the Staff Profile Photo Inside A folder
            foreach (Staff s in listS)
            {
                if (s.Picture != null)
                {
                    FileStream fs = new FileStream(@"C:\Users\USER\Pictures\W3.CSS_files\" + s.Staff_ID + ".jpg", FileMode.Create);
                    fs.Write(s.Picture, 0, s.Picture.Length);
                    fs.Close();
                }
            }
        }