Ejemplo n.º 1
0
 public GeneralMenu(BL_Manager BL_manager, Employee adm)
 {
     this.admin      = adm;
     this.BL_manager = BL_manager;
     InitializeComponent();
     this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
 }
 public EmployeeProgress(BL_Manager bl_manager)
 {
     InitializeComponent();
     this.bl_manager            = bl_manager;
     this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
     finished = false;
 }
Ejemplo n.º 3
0
        public EditEmployee(BL_Manager BL_manager, Employee emp)
        {
            this.emp        = emp;
            this.BL_manager = BL_manager;
            InitializeComponent();
            firstNametxt.Text    = emp.firstName;
            lastNametxt.Text     = emp.lastName;
            supervisorIDtxt.Text = emp.supervisorID;
            if (emp.type.CompareTo("Worker") == 0)
            {
                typetxt.SelectedIndex = 0;
            }
            else
            {
                typetxt.SelectedIndex = 1;
            }
            List <Department> list = BL_manager.BL_department.getAllDepartments();

            departmentIDtxt.ItemsSource = list;
            for (int i = 0; i < list.Count(); i++)
            {
                Backend.Department temp = (Department)departmentIDtxt.Items[i];
                if ((temp.ID.CompareTo(emp.departmentID) == 0))
                {
                    departmentIDtxt.SelectedIndex = i;
                }
            }
            salarytxt.Text = "" + emp.salary;
        }
Ejemplo n.º 4
0
        ListBox dragSource = null;                                                    // ariel

        public onlineStore(BL_Manager BL_manager, Backend.Person member)
        {
            this.BL_manager = BL_manager;
            Member          = member;
            InitializeComponent();
            this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
        }
Ejemplo n.º 5
0
 public ProductBar(BL_Manager bl_manager)
 {
     InitializeComponent();
     this.BL_manager            = bl_manager;
     this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
     finished = false;
 }
 public GeneralMenuCustomer(BL_Manager BL_manager, Club_Member cm)
 {
     this.cm         = cm;
     this.BL_manager = BL_manager;
     InitializeComponent();
     this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
 }
Ejemplo n.º 7
0
 public GeneralMenuManager(BL_Manager BL_manager, Employee emp)
 {
     this.emp        = emp;
     this.BL_manager = BL_manager;
     InitializeComponent();
     this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
 }
Ejemplo n.º 8
0
        public Edit(BL_Manager BL_manager, Product p)
        {
            InitializeComponent();

            this.p          = p;
            this.BL_manager = BL_manager;
            nametxt.Text    = p.name;
            pricetxt.Text   = "" + p.price;
            stocktxt.Text   = "" + p.stockCount;
            List <Department> list = BL_manager.BL_department.getAllDepartments();

            departmentIDtxt.ItemsSource = list;
            for (int i = 0; i < list.Count(); i++)
            {
                Backend.Department temp = (Department)departmentIDtxt.Items[i];
                if ((temp.ID.CompareTo(p.departmentID) == 0))
                {
                    departmentIDtxt.SelectedIndex = i;
                }
            }
            typetxt.ItemsSource = Enum.GetValues(typeof(Product.Type));
            Array s = Enum.GetValues(typeof(Product.Type));

            for (int i = 0; i < s.Length; i++)
            {
                if (p.type.ToString().CompareTo(s.GetValue(i).ToString()) == 0)
                {
                    typetxt.SelectedIndex = i;
                }
            }
        }
Ejemplo n.º 9
0
 public MainWindow(BL_Manager BL_manager)
 {
     this.BL_manager = BL_manager;
     InitializeComponent();
     this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
     // onlineStore f = new onlineStore(BL_manager);
     //f.Show();
 }
        public AddEmployeeControl(BL_Manager BL_manager)
        {
            this.BL_manager = BL_manager;
            InitializeComponent();
            List <Department> list = BL_manager.BL_department.getAllDepartments();

            departmentIDtxt.ItemsSource = list;
        }
Ejemplo n.º 11
0
        public Remove(BL_Manager BL_manager)
        {
            this.BL_manager = BL_manager;
            InitializeComponent();
            List <StoreLocation> list = BL_manager.BL_location.getAll();

            locationsBox.ItemsSource = list;
        }
Ejemplo n.º 12
0
        public Print(BL_Manager BL_manager)
        {
            this.BL_manager = BL_manager;
            InitializeComponent();
            List <User> list  = BL_manager.BL_user.getAllUsersList();
            Table       table = new Table(list);

            panel.Children.Add(table);
        }
Ejemplo n.º 13
0
        public Print(BL_Manager BL_manager)
        {
            this.BL_manager = BL_manager;
            InitializeComponent();
            List <Employee> list  = BL_manager.BL_employee.getAllEmployees();
            Table           table = new Table(list);

            panel.Children.Add(table);
        }
Ejemplo n.º 14
0
        public Print(BL_Manager BL_manager)
        {
            this.BL_manager = BL_manager;
            InitializeComponent();
            List <Department> list  = BL_manager.BL_department.getAllDepartments();
            Table             table = new Table(list);

            panel.Children.Add(table);
        }
Ejemplo n.º 15
0
        public AddProducts(BL_Manager BL_manager, Employee emp)
        {
            this.emp        = emp;
            this.BL_manager = BL_manager;
            InitializeComponent();

            typetxt.ItemsSource = Enum.GetValues(typeof(Backend.Product.Type));
            List <Department> list = BL_manager.BL_department.getAllDepartments();
        }
Ejemplo n.º 16
0
        public Print(BL_Manager BL_manager)
        {
            this.BL_manager = BL_manager;
            InitializeComponent();
            List <Backend.Transaction> list = BL_manager.BL_transaction.getAllTransactionsList();
            Table table = new Table(list);

            panel.Children.Add(table);
        }
Ejemplo n.º 17
0
        public Print(BL_Manager BL_manager)
        {
            this.BL_manager = BL_manager;
            InitializeComponent();
            List <Backend.Product> list = BL_manager.BL_product.getAllProductsList();
            Table table = new Table(list);

            panel.Children.Add(table);
        }
Ejemplo n.º 18
0
        public Print(BL_Manager BL_manager)
        {
            this.BL_manager = BL_manager;
            InitializeComponent();
            List <Club_Member> list = BL_manager.BL_clubMember.getAllClubMembers();
            Table table             = new Table(list);

            panel.Children.Add(table);
        }
        public PrintEmployeeWindow(BL_Manager BL_manager)
        {
            this.BL_manager = BL_manager;
            InitializeComponent();
            this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            List <Employee> listP = BL_manager.BL_employee.getAllEmployees();

            dataGrid.ItemsSource = listP;
        }
Ejemplo n.º 20
0
        public AddTransactions(BL_Manager BL_manager)
        {
            this.BL_manager = BL_manager;
            InitializeComponent();

            typetxt.ItemsSource = Enum.GetValues(typeof(Product.Type));
            List <Department> list = BL_manager.BL_department.getAllDepartments();

            departmentIDtxt.ItemsSource = list;
        }
Ejemplo n.º 21
0
        public Remove(BL_Manager BL_manager, Employee emp)
        {
            this.emp        = emp;
            this.BL_manager = BL_manager;
            InitializeComponent();
            String ID = emp.departmentID;
            List <Backend.Product> p = BL_manager.BL_product.getAllProductsListByDepartmentID(ID);

            producttxt.ItemsSource   = p;
            producttxt.SelectedIndex = 0;
        }
Ejemplo n.º 22
0
        public Map(BL_Manager BL_manager)
        {
            InitializeComponent();
            this.BL_manager = BL_manager;

            txt.Text     = "";
            temptxt.Text = "";
            sign.Text    = "";

            List <StoreLocation> sl = BL_manager.BL_location.getAll();

            locationsBox.ItemsSource = sl;
            browser.NavigateToString("<html><body><script type='text/javascript' src='http://maps.google.com/maps/api/js?sensor=false'></script><div style='overflow:hidden;height:500px;width:600px;'><div id='gmap_canvas' style='height:500px;width:600px;'></div><style>#gmap_canvas img{max-width:none!important;background:none!important}</style><a class='google-map-code' href='http://wptiger.com' id='get-map-data'>premium wordpress themes</a></div><script type='text/javascript'> function init_map(){var myOptions = {zoom:2,center:new google.maps.LatLng(29.557669,34.951925000000074),mapTypeId: google.maps.MapTypeId.ROADMAP};map = new google.maps.Map(document.getElementById('gmap_canvas'), myOptions);marker = new google.maps.Marker({map: map,position: new google.maps.LatLng(29.557669, 34.951925000000074)});infowindow = new google.maps.InfoWindow({content:'<b></b><br/><br/> ' });google.maps.event.addListener(marker, 'click', function(){infowindow.open(map,marker);});}google.maps.event.addDomListener(window, 'load', init_map);</script></body></html>");
        }
Ejemplo n.º 23
0
 public Edit(BL_Manager BL_manager, Employee emp)
 {
     this.emp        = emp;
     this.BL_manager = BL_manager;
     InitializeComponent();
     firstNametxt.Text = emp.firstName;
     lastNametxt.Text  = emp.lastName;
     if (emp.gender.CompareTo("Man") == 0)
     {
         gendertxt.SelectedIndex = 0;
     }
     else
     {
         gendertxt.SelectedIndex = 1;
     }
 }
Ejemplo n.º 24
0
        public Main()
        {
            InitializeComponent();
            EmartDataContext emartDataContext = new EmartDataContext();
            //data classes of the enities

            List <DAL.User> userSqlDB = (from s in emartDataContext.Users select s).ToList();


            List <Backend.User> userDB    = Change.UserDalToBackendList(userSqlDB);
            User_Data           user_data = new User_Data(userDB);


            List <DAL.Customer> clubMemberSqlDB = (from s in emartDataContext.Customers select s).ToList();
            List <Club_Member>  clubMemberDB    = Change.CustomerDalToBackendList(clubMemberSqlDB);
            ClubMember_Data     clubMember_data = new ClubMember_Data(clubMemberDB);


            List <DAL.Department>     departmentSqlDB = (from s in emartDataContext.Departments select s).ToList();
            List <Backend.Department> departmentDB    = Change.DepartmentDalToBackendList(departmentSqlDB);
            Department_Data           department_data = new Department_Data(departmentDB);

            List <DAL.Employee>     EmployeeSqlDB = (from s in emartDataContext.Employees select s).ToList();
            List <Backend.Employee> EmployeeDB    = Change.EmployeeDalToBackendList(EmployeeSqlDB);
            Employee_Data           employee_data = new Employee_Data(EmployeeDB);


            List <DAL.Product>     productSqlDB = (from s in emartDataContext.Products select s).ToList();
            List <Backend.Product> productDB    = Change.ProductDalToBackendList(productSqlDB);
            Product_Data           product_data = new Product_Data(productDB);

            List <DAL.Transaction>     transactionSqlDB = (from s in emartDataContext.Transactions select s).ToList();
            List <Backend.Transaction> transactionDB    = Change.TransactionDalToBackendList(transactionSqlDB);
            List <DAL.Recipt>          reciptSqlDB      = (from s in emartDataContext.Recipts select s).ToList();
            List <Backend.Receipt>     reciptDB         = Change.ReciptDalToBackendList(reciptSqlDB);
            Transaction_Data           transaction_data = new Transaction_Data(transactionDB, reciptDB);

            Location_Data location_data = new Location_Data();
            // managers
            DAL_Manager dal_manager = new DAL_Manager(user_data, clubMember_data, department_data, employee_data, product_data, transaction_data, location_data);
            BL_Manager  BL_manager  = new BL_Manager(dal_manager);

            Window mw = new MainWindow(BL_manager);

            mw.Show();
            this.Close();
        }
Ejemplo n.º 25
0
 public Edit(BL_Manager BL_manager, Club_Member cm)
 {
     this.cm         = cm;
     this.BL_manager = BL_manager;
     InitializeComponent();
     firstNametxt.Text   = cm.firstName;
     lastNametxt.Text    = cm.lastName;
     dateOdBirthtxt.Text = cm.dateOfBirth;
     if (cm.gender.CompareTo("Man") == 0)
     {
         gendertxt.SelectedIndex = 0;
     }
     else
     {
         gendertxt.SelectedIndex = 1;
     }
 }
Ejemplo n.º 26
0
 public Edit(BL_Manager BL_manager, Club_Member cus)
 {
     this.cus        = cus;
     this.BL_manager = BL_manager;
     InitializeComponent();
     firstNametxt.Text = cus.firstName;
     lastNametxt.Text  = cus.lastName;
     IDtxt.Text        = cus.ID;
     if (cus.gender.CompareTo("Man") == 0)
     {
         gendertxt.SelectedIndex = 0;
     }
     else
     {
         gendertxt.SelectedIndex = 1;
     }
     dateOdBirthtxt.Text = cus.dateOfBirth;
 }
Ejemplo n.º 27
0
        public creditinfo(BL_Manager BL_manager, string r, Person c)
        {
            InitializeComponent();
            this.WindowStartupLocation = WindowStartupLocation.CenterScreen;

            member          = c;
            this.BL_manager = BL_manager;
            string text = "";

            foreach (Backend.Receipt recipt in BL_manager.BL_transaction.getReciptList())
            {
                if (recipt.ID == r)
                {
                    string name = BL_manager.BL_product.getProductsInStockByID(recipt.product).name;
                    text += "\n" + recipt.amount + " " + name + " " + (recipt.amount * recipt.price) + "$";
                }
            }
            shoppingList.Text = text;
        }
Ejemplo n.º 28
0
        private void buy_Click(object sender, RoutedEventArgs e)
        {
            string reciptID = BL_Manager.generateID();

            if (!ShoppingCart.Items.IsEmpty)
            {
                foreach (Tuple <Product, int> p in ShoppingCart.Items)
                {
                    Receipt temp = new Receipt(reciptID, p.Item1.inventoryID, p.Item2, p.Item1.price);
                    BL_manager.BL_transaction.addRecipt(temp);
                    BL_manager.BL_product.Restock(p.Item1.inventoryID, "-" + p.Item2.ToString());
                }
                BL_manager.BL_transaction.Add(false, reciptID, "visa", Member.ID);
                creditinfo a = new creditinfo(BL_manager, reciptID, Member);
                a.Show();
            }
            else
            {
                MessageBox.Show("shopping Cart empty");
            }
            ShoppingCart.Items.Clear();
        }
Ejemplo n.º 29
0
 public Search(BL_Manager BL_manager)
 {
     this.BL_manager = BL_manager;
     InitializeComponent();
 }
Ejemplo n.º 30
0
 public EmployeeOptionsWindow(BL_Manager BL_manager, Employee emp)
 {
     this.emp        = emp;
     this.BL_manager = BL_manager;
     InitializeComponent();
 }