public TopMenu(TabHelper tabhlp,Window mainwnd,Image hdr)
 {
     this.InitializeComponent();
     _tabHlp = tabhlp;
     _header = hdr;
     _mainWnd = mainwnd;
 }
 public ListCustomersView(string animationName, TabHelper hlp)
 {
     InitializeComponent();
     _tabHlp = hlp;
     _customerClient = new CustomersManager();
     _customersManager = new CustomersManager();
     if (!string.IsNullOrEmpty(animationName))
     {
         var animation = (Storyboard)Application.Current.Resources[animationName];
         LayoutRoot.BeginStoryboard(animation);
     }
 }
 public ListEmployeesView(string animationName, TabHelper hlp)
 {
     InitializeComponent();
     TabHlp = hlp;
     employee = new Employee();
     employeeClient = new EmployeesManager();
     if (!string.IsNullOrEmpty(animationName))
     {
         Storyboard animation = (Storyboard)Application.Current.Resources[animationName];
         LayoutRoot.BeginStoryboard(animation);
     }
 }
 public ListSuppliersView(string animationName, TabHelper hlp)
 {
     InitializeComponent();
     TabHlp = hlp;
     if (!string.IsNullOrEmpty(animationName))
     {
         Storyboard animation = (Storyboard) Application.Current.Resources[animationName];
         LayoutRoot.BeginStoryboard(animation);
     }
     _provider = new Provider();
     _supplierClient = new SuppliersManager();
 }
        public ListProductsView(string animationName, TabHelper hlp)
        {
            InitializeComponent();
            _tabHlp = hlp;
            _produit = new Product();
            _productClient = new ProductManger();
            _CategorysClient = new CategorysClient();

            if (string.IsNullOrEmpty(animationName)) return;
            Storyboard animation = (Storyboard) Application.Current.Resources[animationName];
            LayoutRoot.BeginStoryboard(animation);
        }
        public ListSalesView(string animationName, TabHelper hlp)
        {
            InitializeComponent();
            _tabHlp = hlp;

            _supplierClient = new SuppliersManager();
            _purchaseClient = new PurchaseClient();
            EditPurchaseBtn.Visibility = Visibility.Collapsed;
            CancelPurchaseBtn.Visibility = Visibility.Collapsed;
            image1.Visibility = Visibility.Collapsed;
            image2.Visibility = Visibility.Collapsed;

            _purchaseDetailsManager = new PurchaseDetailsManager();
            cc = new CategorysClient();

            mc = new CategorysManager();
            if (string.IsNullOrEmpty(animationName)) return;
            Storyboard animation = (Storyboard)Application.Current.Resources[animationName];
            LayoutRoot.BeginStoryboard(animation);
        }
        public AddPurchaseView(string animationName, TabHelper hlp)
        {
            InitializeComponent();
            Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");

            Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");
            _tabHlp = hlp;
            _productsSelSelected = new List<ProduitsSel>();
            //produit = new Products();
            _productManger = new ProductManger();

            _tvaClient = new TvaClient();
            TvaComboBox.ItemsSource = _tvaClient.GetTvaValues();

            _suppliersManager = new SuppliersManager();
            _productManger.ResetUnitsOnOrder();
            _productSelected = new List<Product>();
            if (string.IsNullOrEmpty(animationName)) return;
            var animation = (Storyboard) Application.Current.Resources[animationName];
            LayoutRoot.BeginStoryboard(animation);
        }
        public AddSaleView(string animationName, TabHelper hlp)
        {
            InitializeComponent();
            Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");

            Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");
            if (!string.IsNullOrEmpty(animationName))
            {
                Storyboard animation = (Storyboard)Application.Current.Resources[animationName];
                LayoutRoot.BeginStoryboard(animation);
            }

            _productSelSelected = new List<ProduitsSel>();

            TvaComboBox.ItemsSource = _tvaClient.GetTva();
            if (TvaComboBox.SelectedIndex < 0) TvaComboBox.SelectedIndex = 0;
            TvaComboBox.DisplayMember = "TauxTVA";

            _productManger.ResetUnitsOnOrder();
            _productSelected = new List<Product>();
            _tabHlp = hlp;
        }
        public void CreateAddViews(string fadetoleftanim, TabHelper tabHlp, MainWindow mainWindow, Image headerImage)
        {
            _addProductView = new AddProductView(fadetoleftanim);
             _addPurchaseView = new AddPurchaseView(fadetoleftanim, tabHlp);
             _addSaleView = new AddSaleView(fadetoleftanim, tabHlp);
              _addSupplierView = new AddSupplierView(fadetoleftanim);
              _addCustomerView = new AddCustomerView(fadetoleftanim);
              _addEmployeeView = new AddEmployeeView(fadetoleftanim);

              _listSuppliersView = new ListSuppliersView(fadetoleftanim,tabHlp);
              _listCustomersView = new ListCustomersView(fadetoleftanim,tabHlp);
              _listEmployeesView = new ListEmployeesView(fadetoleftanim, tabHlp);
              _listProductsView = new ListProductsView(fadetoleftanim, tabHlp);
              _listSalesView = new ListSalesView(fadetoleftanim, tabHlp);
              _listPurchasesView = new ListPurchasesView(fadetoleftanim, tabHlp);
              _liStockState=new StockState();
              _addFactureView = new AddFactureView(fadetoleftanim, "facture");

              _factureView = new FactureView(fadetoleftanim);
              _stockView = new StockView(fadetoleftanim);
            _optionsView=new Options(mainWindow,headerImage,"");
            _statisticsView=new StatisticsView(fadetoleftanim);
        }