Example #1
0
        public void RefreshData()
        {
            //Get All data and assign to variable
            invoiceData = invoiceRepo.GetExpiredInvoices();
            outletData  = outletRepo.GetActiveOutlet();

            //set the datagrid datasource
            invoiceBindingSource.DataSource = invoiceData;
            outletBindingSource.DataSource  = outletData;
            //Set display label
            invoiceCountLabel.Text = invoiceData.Count.ToString();
            outletCountLabel.Text  = outletData.Count.ToString();
        }
Example #2
0
        public FrmInvoice()
        {
            InitializeComponent();
            SetHeader("Invoice");

            invoiceRepository       = new InvoiceRepository();
            invoiceDetailRepository = new InvoiceDetailRepository();
            outletRepository        = new OutletRepository();
            productRepository       = new ProductRepository();

            productBindingSource.DataSource = productRepository.GetActiveProduct();
            outletBindingSource.DataSource  = outletRepository.GetActiveOutlet();

            DataGridViewHelper.SetDataGridTheme(dataGridView1);

            CekKondisi(FormCondition.Ready);
            isAddNew = false;
        }
Example #3
0
        /// <summary>
        /// Passing data for edit
        /// </summary>
        /// <param name="data"></param>
        public FrmInvoice(object data)
        {
            InitializeComponent();
            SetHeader("Invoice");

            invoiceRepository       = new InvoiceRepository(Program.log);
            invoiceDetailRepository = new InvoiceDetailRepository(Program.log);
            outletRepository        = new OutletRepository(Program.log);
            productRepository       = new ProductRepository(Program.log);

            productBindingSource.DataSource = productRepository.GetActiveProduct();
            outletBindingSource.DataSource  = outletRepository.GetActiveOutlet();

            DataGridViewHelper.SetDataGridTheme(dataGridView1);

            CekKondisi(FormCondition.Inputting);
            invoiceBindingSource.Add(data);

            isAddNew = false;
            countBtn.PerformClick();
        }
        public void GetActiveOutlet()
        {
            var outlets = m_outlet.GetActiveOutlet();

            Assert.IsNotNull(outlets);
        }