Ejemplo n.º 1
0
 private void addNewCategoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (myfrmCategories == null || myfrmCategories.IsDisposed)
     {
         myfrmCategories           = new frmCategories(this.business);
         myfrmCategories.MdiParent = this;
     }
     myfrmCategories.Show();
 }
Ejemplo n.º 2
0
        private void dgCategories_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dgCategories.Columns["ColCategoryEdit"].Index && e.RowIndex >= 0)
            {
                if (myfrmCategories == null || myfrmCategories.IsDisposed)
                {
                    int index = e.RowIndex;

                    String EditingItemID = (String)dgCategories.Rows[index].Cells[2].Value;

                    SortedList pictures = myBusiness.getCategoryPictureList();
                    Byte[]     picture  = (Byte[])(pictures[int.Parse(EditingItemID)]);

                    myfrmCategories = new frmCategories(EditingItemID, myBusiness, picture);

                    myfrmCategories.MdiParent = this.MdiParent;
                }
                myfrmCategories.Show();
            }
        }