Exemple #1
0
        public Login(PHPRepo pHPRepo)
        {
            InitializeComponent();
            CreateHelpProvider();

            _pHPRepo = pHPRepo;
        }
Exemple #2
0
 public LowStock(PHPRepo pHPRepo)
 {
     InitializeComponent();
     _PHPRepo      = pHPRepo;
     _lowStockList = pHPRepo.GetLowStockProducts();
     DisplayLowStock();
 }
Exemple #3
0
        public DeleteSale(PHPRepo pHPRepo)
        {
            InitializeComponent();
            CreateHelpProvider();

            _pHPRepo = pHPRepo;
        }
Exemple #4
0
        static void Main()
        {
            AppSettings appSettings = new AppSettings()
            {
                URL          = "database-1.cwocrrmlsxcx.us-east-1.rds.amazonaws.com",
                Port         = "5432",
                UserName     = "******",
                Password     = "******",
                DatabaseName = "test1"
            };
            PHPConext pHPConext = new PHPConext(appSettings);

            try
            {
                pHPConext.Database.EnsureCreated();
                pHPConext.SaveChanges();
                Console.WriteLine("DB Created");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            PHPRepo pHPRepo = new PHPRepo(pHPConext);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Login(pHPRepo));
        }
Exemple #5
0
 public ViewSale(PHPRepo pHPRepo)
 {
     InitializeComponent();
     CreateHelpProvider();
     _PHPRepo   = pHPRepo;
     _SalesList = pHPRepo.GetSales();
     DisplaySales();
 }
Exemple #6
0
 public DeleteItem(PHPRepo pHPRepo)
 {
     InitializeComponent();
     CreateHelpProvider();
     _PHPRepo     = pHPRepo;
     _ProductList = pHPRepo.GetProducts();
     DisplayItems();
 }
Exemple #7
0
 public ViewStock(PHPRepo pHPRepo)
 {
     InitializeComponent();
     CreateHelpProvider();
     _PHPRepo     = pHPRepo;
     _ProductList = pHPRepo.GetProducts();
     DisplayProducts();
 }
Exemple #8
0
 public WeeklyReport(PHPRepo pHPRepo)
 {
     InitializeComponent();
     _PHPRepo   = pHPRepo;
     _from      = DateTime.Now.AddDays(-(int)DateTime.Now.DayOfWeek);
     _to        = DateTime.Now;
     _SalesList = pHPRepo.GetSaleByDate(_from, _to);
     DisplaySales();
 }
Exemple #9
0
        static void Main(string[] args)
        {
            AppSettings appSettings = new AppSettings()
            {
                URL          = "database-1.cwocrrmlsxcx.us-east-1.rds.amazonaws.com",
                Port         = "5432",
                UserName     = "******",
                Password     = "******",
                DatabaseName = "test1"
            };
            PHPConext pHPConext = new PHPConext(appSettings);

            try
            {
                pHPConext.Database.EnsureCreated();
                pHPConext.SaveChanges();
                Console.WriteLine("DB Created");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            PHPRepo   pHPRepo   = new PHPRepo(pHPConext);
            Employees employees = new Employees(pHPRepo);
            Products  products  = new Products(pHPRepo);
            Sales     sales     = new Sales(pHPRepo);

            while (true)
            {
                Console.WriteLine("Select Page  : ");
                Console.WriteLine("1 : Employees ");
                Console.WriteLine("2 : Products ");
                Console.WriteLine("3 : Sales");
                string selection = Console.ReadLine();
                switch (selection)
                {
                case "1":
                    employees.Intialise();
                    break;

                case "2":
                    products.Intialise();
                    break;

                case "3":
                    sales.Intialise();
                    break;

                default:
                    Console.WriteLine("please give valid input");
                    break;
                }
                Console.WriteLine("Press enter to continue");
                Console.ReadLine();
            }
        }
Exemple #10
0
 public AddTransaction(PHPRepo pHPRepo)
 {
     InitializeComponent();
     CreateHelpProvider();
     _PHPRepo = pHPRepo;
     setEmpDetails();
     //initialise autocomplete
     _ProductList = pHPRepo.GetProducts();
     initialiseAutocomplete();
     SaleID = pHPRepo.GetMaxSaleId() + 1;
 }
Exemple #11
0
        public MonthlyReport(PHPRepo pHPRepo)
        {
            InitializeComponent();

            firstDayOfThisMonth = DateTime.Today.AddDays(-(DateTime.Today.Day - 1));
            _to   = firstDayOfThisMonth.AddDays(-1);
            _from = firstDayOfThisMonth.AddMonths(-1);

            _PHPRepo   = pHPRepo;
            _SalesList = _PHPRepo.GetSaleByDate(_from, _to);
            DisplaySales();
        }
Exemple #12
0
 public ParentMDI(PHPRepo pHPRepo)
 {
     InitializeComponent();
     _pHPRepo = pHPRepo;
 }
Exemple #13
0
 public Products(PHPRepo phpRepo)
 {
     _phpRepo = phpRepo;
 }
Exemple #14
0
 public Sales(PHPRepo phpRepo)
 {
     _phpRepo = phpRepo;
 }
Exemple #15
0
 public SalesPrediction(PHPRepo pHPRepo)
 {
     InitializeComponent();
     _PHPRepo = pHPRepo;
 }
Exemple #16
0
 public Employees(PHPRepo phpRepo)
 {
     _phpRepo = phpRepo;
 }