Exemplo n.º 1
0
        public SetupDataItemPresenter(AppPresenter appPresenter, SetupDataItemView view)
            : base(view, "TabHeader")
        {
            this._appPresenter = appPresenter;

            this._isItemIdle   = true;
            this._isStocksIdle = true;
            this._isUnitsIdle  = true;

            this._currentItemCollection     = appPresenter.CurrentItemCollection;
            this._currentItemCollectionTemp = new ObservableCollection <Item>();
            this._currentItem     = new Item();
            this._currentItemTemp = null;

            this._currentCategoryCollection = new ObservableCollection <Category>(appPresenter.FindCategory(true));
            this._currentCategory           = null;

            this._currentStockCollection = new ObservableCollection <Stock>();
            this._currentStock           = new Stock();
            this._currentStockTemp       = null;

            this._currentUnitOfSalesCollection = new ObservableCollection <UnitOfSales>();
            this._currentUnitOfSales           = new UnitOfSales();
            this._currentUnitOfSalesTemp       = null;

            this._currentTotalStockPreview = 0;
            this._currentStockPreview      = 0;
        }
        public SetupDataCustomerPresenter(AppPresenter appPresenter, SetupDataCustomerView view)
            : base(view, "TabHeader")
        {
            this._appPresenter = appPresenter;

            this._isIdle = true;

            this._currentCustomerCollection     = appPresenter.CurrentCustomerCollection;
            this._currentCustomerCollectionTemp = new ObservableCollection <Customer>();
            this._currentCustomer     = new Customer();
            this._currentCustomerTemp = null;
        }
Exemplo n.º 3
0
        public SetupUserPresenter(AppPresenter appPresenter, SetupUserView view)
            : base(view, "TabHeader")
        {
            this._appPresenter = appPresenter;

            this._isIdle = true;

            this._currentUserCollection     = appPresenter.CurrentUserCollection;
            this._currentUserCollectionTemp = new ObservableCollection <User>();
            this._currentUser     = new User();
            this._currentUserTemp = null;

            this._currentUserRightCollection = new ObservableCollection <UserRight>(appPresenter.FindUserRight(true));
        }
Exemplo n.º 4
0
        public SetupDataCategoryPresenter(AppPresenter appPresenter, SetupDataCategoryView view)
            : base(view, "TabHeader")
        {
            this._appPresenter = appPresenter;

            this._isIdle = true;

            this._currentCategoryCollection     = appPresenter.CurrentCategoryCollection;
            this._currentCategoryCollectionTemp = new ObservableCollection <Category>();
            this._currentCategory     = new Category();
            this._currentCategoryTemp = null;

            this._currentItemCollection = appPresenter.CurrentItemCollection;
        }
        public SetupGeneralSettingsPresenter(AppPresenter appPresenter, SetupGeneralSettingsView view)
            : base(view, "TabHeader")
        {
            this._appPresenter = appPresenter;

            this._isIdle = true;

            this._currentGeneralSettings = appPresenter.CurrentGeneralSettings;

            this._currentCompanyProfile     = new CompanyProfile();
            this._currentCompanyProfileTemp = null;

            this._currentCompanyPolicies     = new CompanyPolicies();
            this._currentCompanyPoliciesTemp = null;
        }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
            string     pathFile  = ConfigurationManager.AppSettings.Get("PathWatcherFolder");
            IPresenter presenter = new AppPresenter();

            presenter.StartWatching(pathFile);

            do
            {
                Console.WriteLine("Press Escape for stop, cuntinue press AnyKey...");
            } while (Console.ReadKey().Key != ConsoleKey.Escape);
            presenter.Stop();

            Console.ReadLine();
        }
Exemplo n.º 7
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            LoginForm    loginForm    = new LoginForm();
            MainForm     mainForm     = new MainForm();
            RegisterForm registerForm = new RegisterForm();
            ForgotForm   forgotForm   = new ForgotForm();

            MessageService messageService = new MessageService();
            UserRepository database       = new UserRepository(messageService);

            AppPresenter presenter = new AppPresenter(loginForm, registerForm, forgotForm, mainForm, database, messageService);

            Application.Run(loginForm);
        }
Exemplo n.º 8
0
        public ManageProfilePresenter(AppPresenter appPresenter, ManageProfileView view)
            : base(view, "TabHeader")
        {
            this._appPresenter = appPresenter;

            this._isIdle = true;

            this._currentUser     = appPresenter.CurrentLogin;
            this._currentUserTemp = new User()
            {
                Id            = appPresenter.CurrentLogin.Id,
                Name          = appPresenter.CurrentLogin.Name,
                Password      = appPresenter.CurrentLogin.Password,
                Accessibility = appPresenter.CurrentLogin.Accessibility,
                PhotoPath     = appPresenter.CurrentLogin.PhotoPath,
                Status        = appPresenter.CurrentLogin.Status
            };

            this._currentPasswordTemp = null;
        }
Exemplo n.º 9
0
        public TFormSalesPresenter(AppPresenter appPresenter, TFormSalesView view)
            : base(view, "TabHeader")
        {
            this._appPresenter = appPresenter;

            this._currentSalesTransaction = new SalesTransaction()
            {
                TransactionDate = DateTime.Now,
                Seller          = appPresenter.CurrentLogin,
                Consumer        = appPresenter.FindCustomer(true)[0]
            };

            this._currentSalesHistoryCollection = new ObservableCollection <SalesHistory>();
            this._currentSalesHistory           = null;

            this._currentCustomerCollection = new ObservableCollection <Customer>(appPresenter.FindCustomer(true));
            this._currentTItemCollection    = appPresenter.CurrentTItemCollection;
            this._currentUnitCollection     = null;

            this._currentAvailableStock = 0;
            this._currentPaid           = 0;
            this._currentChange         = 0;
        }
Exemplo n.º 10
0
 public TFormReceiptPresenter(AppPresenter appPresenter, TFormReceiptView view)
     : base(view, "TabHeader")
 {
 }
Exemplo n.º 11
0
 public TFormPurchasePresenter(AppPresenter appPresenter, TFormPurchaseView view)
     : base(view, "TabHeader")
 {
 }