コード例 #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;
        }
コード例 #2
0
 private void timer1_Tick_1(object sender, EventArgs e)
 {
     panel2.Width += 24;
     if (panel2.Width >= 769)
     {
         timer1.Stop();
         AdminAdministrator admin = new AdminAdministrator();
         admin.lblUsername.Text = Login.ClickPassName;
         admin.lblAccount.Text  = Login.ClickPassAccount;
         admin.Show();
         this.Hide();
     }
 }
コード例 #3
0
        private void BtnStockIn_Click(object sender, EventArgs e)
        {
            if (!AdminAdministrator.Instance.PnlContainer.Controls.ContainsKey("AdminStockIn"))
            {
                AdminStockIn stin = new AdminStockIn();
                stin.Dock = DockStyle.Fill;
                AdminAdministrator.Instance.PnlContainer.Controls.Add(stin);

                AdminAdministrator admin = new AdminAdministrator();
                stin.txtStockby.Text = AdminAdministrator.PassStockInName;
            }
            AdminAdministrator.Instance.PnlContainer.Controls["AdminStockIn"].BringToFront();
            AdminAdministrator.Instance.BackButton.Visible = true;
        }
コード例 #4
0
        private void BtnBacktoSettings_Click(object sender, EventArgs e)
        {
            if (!AdminAdministrator.Instance.PnlContainer.Controls.ContainsKey("AdminSettings"))
            {
                AdminSettings settings = new AdminSettings();
                settings.Dock = DockStyle.Fill;
                AdminAdministrator.Instance.PnlContainer.Controls.Add(settings);



                AdminAdministrator admin = new AdminAdministrator();
            }
            AdminAdministrator.Instance.PnlContainer.Controls["AdminSettings"].BringToFront();
            AdminAdministrator.Instance.BackButton.Visible = true;
        }
コード例 #5
0
        private void BtnInventory_Click(object sender, EventArgs e)
        {
            if (!AdminAdministrator.Instance.PnlContainer.Controls.ContainsKey("AdminInventory"))
            {
                AdminInventory inv = new AdminInventory();
                inv.Dock = DockStyle.Fill;
                AdminAdministrator.Instance.PnlContainer.Controls.Add(inv);

                inv.ShowInventoryProducts();

                AdminAdministrator admin = new AdminAdministrator();
                PassStockUsername = admin.lblUsername.Text;
            }
            AdminAdministrator.Instance.PnlContainer.Controls["AdminInventory"].BringToFront();
            AdminAdministrator.Instance.BackButton.Visible = true;
        }
コード例 #6
0
        private void BtnProducts_Click(object sender, EventArgs e)
        {
            if (!AdminAdministrator.Instance.PnlContainer.Controls.ContainsKey("AdminProducts"))
            {
                AdminProducts pro = new AdminProducts();
                pro.Dock = DockStyle.Fill;
                AdminAdministrator.Instance.PnlContainer.Controls.Add(pro);


                pro.ShowAllProductsInDatabase();

                AdminAdministrator admin = new AdminAdministrator();
            }
            AdminAdministrator.Instance.PnlContainer.Controls["AdminProducts"].BringToFront();
            AdminAdministrator.Instance.BackButton.Visible = true;
        }
コード例 #7
0
        private void BtnStockAdjust_Click_1(object sender, EventArgs e)
        {
            if (!AdminAdministrator.Instance.PnlContainer.Controls.ContainsKey("AdminStockAdjustment"))
            {
                AdminStockAdjustment adj = new AdminStockAdjustment();
                adj.Dock = DockStyle.Fill;
                AdminAdministrator.Instance.PnlContainer.Controls.Add(adj);

                AdminAdministrator admin = new AdminAdministrator();
                adj.txtAdjustBy.Text = AdminAdministrator.PassStockAdjName;

                adj.ShowStockAdjustmentInInventory();
                adj.SomeRandomReferenceNo();
            }
            AdminAdministrator.Instance.PnlContainer.Controls["AdminStockAdjustment"].BringToFront();
            AdminAdministrator.Instance.BackButton.Visible = true;
        }