コード例 #1
0
 private void addNewShipperToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (myfrmShippers == null || myfrmShippers.IsDisposed)
     {
         myfrmShippers           = new frmShippers(this.business);
         myfrmShippers.MdiParent = this;
     }
     myfrmShippers.Show();
 }
コード例 #2
0
        private void dgShippers_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dgShippers.Columns["ColShipperEdit"].Index && e.RowIndex >= 0)
            {
                if (myfrmShippers == null || myfrmShippers.IsDisposed)
                {
                    int index = e.RowIndex;

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

                    //DataGridViewButtonCell buttonCell =
                    //   (DataGridViewButtonCell)dgShippers.Rows[e.RowIndex].Cells["ColShipperEdit"];

                    myfrmShippers = new frmShippers(EditingItemID, myBusiness);

                    // buttonCell.ReadOnly = false;

                    myfrmShippers.MdiParent = this.MdiParent;
                }
                // myfrmShippers.Text = "Add New Shippers";
                myfrmShippers.Show();
            }
        }
コード例 #3
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;
     }
 }
コード例 #4
0
        private void dgShippers_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dgShippers.Columns["ColShipperEdit"].Index && e.RowIndex >= 0)
            {
                if (myfrmShippers == null || myfrmShippers.IsDisposed)
                {
                    int index = e.RowIndex;

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

                    //DataGridViewButtonCell buttonCell =
                    //   (DataGridViewButtonCell)dgShippers.Rows[e.RowIndex].Cells["ColShipperEdit"];

                    myfrmShippers = new frmShippers(EditingItemID, myBusiness);

                    // buttonCell.ReadOnly = false;

                    myfrmShippers.MdiParent = this.MdiParent;
                }
                // myfrmShippers.Text = "Add New Shippers";
                myfrmShippers.Show();
            }
        }
コード例 #5
0
 private void addNewShipperToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (myfrmShippers == null || myfrmShippers.IsDisposed)
     {
         myfrmShippers = new frmShippers(this.business);
         myfrmShippers.MdiParent = this;
     }
     myfrmShippers.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;
            }
        }