Exemple #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            dgvSalesMain.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            dgvSalesMain.ClearSelection();
            dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            dataGridView2.ClearSelection();
            PurchaseDao.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            PurchaseDao.ClearSelection();
            showExpenses();
            showSales();
            showPurchases();

            PublicMainForm = this;


            DateTime startDay      = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
            DateTime startDay2     = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 2);
            DateTime startDay3     = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 3);
            DateTime secondlastDay = new DateTime(DateTime.Now.Year, DateTime.Now.Month, (DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month) - 1));
            DateTime lastDay       = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month));
            DateTime Now           = DateTime.Now;

            if (Now.Day == startDay.Day || Now.Day == startDay2.Day || Now.Day == startDay3.Day ||
                Now.Day == secondlastDay.Day || Now.Day == lastDay.Day)
            {
                frmShowDebts frmShowDebts = new frmShowDebts();
                frmShowDebts.ShowDialog();
            }

            DisplayStockEndingAlert();
        }
Exemple #2
0
        private void showDebtorsDetailsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmShowDebts frmShowDebts = new frmShowDebts();

            frmShowDebts.ShowDialog();
        }