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;
     }
 }
 private void addNewEmployeeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (myfrmEmployees == null || myfrmEmployees.IsDisposed)
     {
         myfrmEmployees = new frmEmployees(this.business);
         myfrmEmployees.MdiParent = this;
     }
     myfrmEmployees.Show();
 }
示例#3
0
 private void addNewEmployeeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (myfrmEmployees == null || myfrmEmployees.IsDisposed)
     {
         myfrmEmployees           = new frmEmployees(this.business);
         myfrmEmployees.MdiParent = this;
     }
     myfrmEmployees.Show();
 }
示例#4
0
        private void dgEmployees_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dgEmployees.Columns["ColEmployeeEdit"].Index && e.RowIndex >= 0)
            {
                if (myfrmEmployees == null || myfrmEmployees.IsDisposed)
                {
                    int index = e.RowIndex;

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

                    myfrmEmployees = new frmEmployees(EditingItemID, myBusiness);

                    myfrmEmployees.MdiParent = this.MdiParent;
                }

                myfrmEmployees.Show();
            }
        }
        private void dgEmployees_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dgEmployees.Columns["ColEmployeeEdit"].Index && e.RowIndex >= 0)
            {
                if (myfrmEmployees == null || myfrmEmployees.IsDisposed)
                {
                    int index = e.RowIndex;

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

                    myfrmEmployees = new frmEmployees(EditingItemID, myBusiness);

                    myfrmEmployees.MdiParent = this.MdiParent;
                }

                myfrmEmployees.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;
            }
        }