private void btnInsert_Click(object sender, EventArgs e)
 {
     switch (currenTagPage)
     {
         case  TabPage.tabPageCustomers:
             if (myfrmCustomers == null || myfrmCustomers.IsDisposed)
                 {
                     myfrmCustomers = new frmCustomers(myBusiness);
                     myfrmCustomers.MdiParent = this.MdiParent;
                 }
                 //myfrmCustomers.Text = "Maintenance for " + this.Text;
                 myfrmCustomers.Show();
                 break;
         case TabPage.tabPageEmployees:
                 if (myfrmEmployees == null || myfrmEmployees.IsDisposed)
                 {
                     myfrmEmployees = new frmEmployees(myBusiness);
                     myfrmEmployees.MdiParent = this.MdiParent;
                 }
                 //myfrmEmployees.Text = "Maintenance for " + this.Text;
                 myfrmEmployees.Show();
                 break;
         case TabPage.tabPageProducts:
                 if (myfrmProducts == null || myfrmProducts.IsDisposed)
                 {
                     myfrmProducts = new frmProducts(myBusiness);
                     myfrmProducts.MdiParent = this.MdiParent;
                 }
                 //myfrmProducts.Text = "Maintenance for " + this.Text;
                 myfrmProducts.Show();
                 break;
         case TabPage.tabPageShippers:
                 if (myfrmShippers == null || myfrmShippers.IsDisposed)
                 {
                     myfrmShippers = new frmShippers(myBusiness);
                     myfrmShippers.MdiParent = this.MdiParent;
                 }
                 //myfrmShippers.Text = "Maintenance for " + this.Text;
                 myfrmShippers.Show();
                 break;
         case TabPage.tabPageSuppliers:
                 if (myfrmSuppliers == null || myfrmSuppliers.IsDisposed)
                 {
                     myfrmSuppliers = new frmSuppliers(myBusiness);
                     myfrmSuppliers.MdiParent = this.MdiParent;
                 }
                 //myfrmSuppliers.Text = "Maintenance for " + this.Text;
                 myfrmSuppliers.Show();
                 break;
         case TabPage.tabPageCategories:
                 if (myfrmCategories == null || myfrmCategories.IsDisposed)
                 {
                     myfrmCategories = new frmCategories(myBusiness);
                     myfrmCategories.MdiParent = this.MdiParent;
                 }
                 //myfrmCategories.Text = "Maintenance for " + this.Text;
                 myfrmCategories.Show();
                 break;
     }
 }
Пример #2
0
 private void addNewProductToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (myfrmProducts == null || myfrmProducts.IsDisposed)
     {
         myfrmProducts           = new frmProducts(this.business);
         myfrmProducts.MdiParent = this;
     }
     myfrmProducts.Show();
 }
Пример #3
0
        private void dgProducts_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dgProducts.Columns["ColProductEdit"].Index && e.RowIndex >= 0)
            {
                if (myfrmProducts == null || myfrmProducts.IsDisposed)
                {
                    int index = e.RowIndex;

                    String EditingItemID = (String)dgProducts.Rows[index].Cells[1].Value;

                    myfrmProducts = new frmProducts(EditingItemID, myBusiness);

                    myfrmProducts.MdiParent = this.MdiParent;
                }
                myfrmProducts.Show();
            }
        }
        private void dgProducts_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dgProducts.Columns["ColProductEdit"].Index && e.RowIndex >= 0)
            {
                if (myfrmProducts == null || myfrmProducts.IsDisposed)
                {
                    int index = e.RowIndex;

                    String EditingItemID = (String)dgProducts.Rows[index].Cells[1].Value;

                    myfrmProducts = new frmProducts(EditingItemID, myBusiness);

                    myfrmProducts.MdiParent = this.MdiParent;
                }
                myfrmProducts.Show();
            }
        }
Пример #5
0
 private void addNewProductToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (myfrmProducts == null || myfrmProducts.IsDisposed)
     {
         myfrmProducts = new frmProducts(this.business);
         myfrmProducts.MdiParent = this;
     }
     myfrmProducts.Show();
 }
Пример #6
0
        private void btnInsert_Click(object sender, EventArgs e)
        {
            switch (currenTagPage)
            {
            case  TabPage.tabPageCustomers:
                if (myfrmCustomers == null || myfrmCustomers.IsDisposed)
                {
                    myfrmCustomers           = new frmCustomers(myBusiness);
                    myfrmCustomers.MdiParent = this.MdiParent;
                }
                //myfrmCustomers.Text = "Maintenance for " + this.Text;
                myfrmCustomers.Show();
                break;

            case TabPage.tabPageEmployees:
                if (myfrmEmployees == null || myfrmEmployees.IsDisposed)
                {
                    myfrmEmployees           = new frmEmployees(myBusiness);
                    myfrmEmployees.MdiParent = this.MdiParent;
                }
                //myfrmEmployees.Text = "Maintenance for " + this.Text;
                myfrmEmployees.Show();
                break;

            case TabPage.tabPageProducts:
                if (myfrmProducts == null || myfrmProducts.IsDisposed)
                {
                    myfrmProducts           = new frmProducts(myBusiness);
                    myfrmProducts.MdiParent = this.MdiParent;
                }
                //myfrmProducts.Text = "Maintenance for " + this.Text;
                myfrmProducts.Show();
                break;

            case TabPage.tabPageShippers:
                if (myfrmShippers == null || myfrmShippers.IsDisposed)
                {
                    myfrmShippers           = new frmShippers(myBusiness);
                    myfrmShippers.MdiParent = this.MdiParent;
                }
                //myfrmShippers.Text = "Maintenance for " + this.Text;
                myfrmShippers.Show();
                break;

            case TabPage.tabPageSuppliers:
                if (myfrmSuppliers == null || myfrmSuppliers.IsDisposed)
                {
                    myfrmSuppliers           = new frmSuppliers(myBusiness);
                    myfrmSuppliers.MdiParent = this.MdiParent;
                }
                //myfrmSuppliers.Text = "Maintenance for " + this.Text;
                myfrmSuppliers.Show();
                break;

            case TabPage.tabPageCategories:
                if (myfrmCategories == null || myfrmCategories.IsDisposed)
                {
                    myfrmCategories           = new frmCategories(myBusiness);
                    myfrmCategories.MdiParent = this.MdiParent;
                }
                //myfrmCategories.Text = "Maintenance for " + this.Text;
                myfrmCategories.Show();
                break;
            }
        }