Example #1
0
        private void FrmMainAdmin_Load(object sender, EventArgs e)
        {
            BtnBack.Visible          = false;
            BtnBackToInvoice.Visible = false;
            BtnBacktoReports.Visible = false;

            _obj = this;

            AdminResources res = new AdminResources();

            res.Dock = DockStyle.Fill;
            PnlContainer.Controls.Add(res);
            res.lblDailySales.Text       = dbcon.GetDailySales().ToString("#,##0.00");
            res.lblProductLine.Text      = dbcon.ProductLine().ToString("#,##0");
            res.lblStockOnHand.Text      = dbcon.StockOnHand().ToString("#,##0");
            res.lblCriticalProducts.Text = dbcon.CriticalProduct().ToString("#,##0");
            res.lblCustomerCount.Text    = dbcon.CustomerCount().ToString("#,##0");
            res.DisplayChartTopSelling();

            // Store a value for this variable -- and pass the value to AdminStockAdjustment.cs { txtAdjustment.text }
            PassStockUsername = lblUsername.Text;
            // Store a value for this variable -- and pass the vaue to AdminStockIn.cs { txtStockby.text }
            PassStockInName = lblUsername.Text;
            // Store a value for this variable -- and pass the vaue to AdminStockIn.cs { txtStockby.text }
            PassStockAdjName = lblUsername.Text;
        }
Example #2
0
        private void BtnBack_Click(object sender, EventArgs e)
        {
            if (!AdminAdministrator.Instance.PnlContainer.Controls.ContainsKey("AdminResources"))
            {
                AdminResources res = new AdminResources();
                res.Dock = DockStyle.Fill;
                AdminAdministrator.Instance.PnlContainer.Controls.Add(res);

                res.lblDailySales.Text       = dbcon.GetDailySales().ToString("#,##0.00");
                res.lblProductLine.Text      = dbcon.ProductLine().ToString("#,##0");
                res.lblStockOnHand.Text      = dbcon.StockOnHand().ToString("#,##0");
                res.lblCriticalProducts.Text = dbcon.CriticalProduct().ToString("#,##0");
                res.lblCustomerCount.Text    = dbcon.CustomerCount().ToString("#,##0");
                res.DisplayChartTopSelling();
            }
            AdminAdministrator.Instance.PnlContainer.Controls["AdminResources"].BringToFront();
            AdminAdministrator.Instance.BackButton.Visible          = false;
            AdminAdministrator.Instance.BackToInvoiceButton.Visible = false;
        }