Beispiel #1
0
        private void btnNewCategory_Click(object sender, EventArgs e)
        {
            //frmAddCategory frmAdd = new frmAddCategory(new CategoryPresenter());
            //frmAdd.ShowDialog();
            Form frmAdd = new frmAddCategory(new CategoryPresenter(), this);

            frmAdd.WindowState     = FormWindowState.Maximized;
            frmAdd.FormBorderStyle = FormBorderStyle.None;
            frmAdd.MdiParent       = this.MdiParent;
            frmAdd.Dock            = DockStyle.Fill;
            frmAdd.Show();
        }
Beispiel #2
0
        private void btnCategoryAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //frmAddCategory frmAdd = new frmAddCategory(preCategory);
            //frmAdd.ShowDialog();
            Form frmAdd = new frmAddCategory(preCategory, this);

            frmAdd.WindowState     = FormWindowState.Maximized;
            frmAdd.FormBorderStyle = FormBorderStyle.None;
            frmAdd.MdiParent       = this.MdiParent;
            frmAdd.Dock            = DockStyle.Fill;
            frmAdd.Show();
        }
Beispiel #3
0
        private void btnEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            GridView gridView = gridCategory.FocusedView as GridView;

            Model.CATEGORY obj = new Model.CATEGORY();

            obj.CATEGORY_ID   = Convert.ToInt32(gridView.GetFocusedRowCellValue("CATEGORY_ID").ToString());
            obj.CATEGORY_NAME = gridView.GetFocusedRowCellValue("CATEGORY_NAME").ToString();
            obj.DESCRIPTION   = gridView.GetFocusedRowCellValue("DESCRIPTION").ToString();

            //frmAddCategory frmAdd = new frmAddCategory(preCategory, obj);
            //frmAdd.ShowDialog();
            Form frmAdd = new frmAddCategory(preCategory, obj, this);

            frmAdd.WindowState     = FormWindowState.Maximized;
            frmAdd.FormBorderStyle = FormBorderStyle.None;
            frmAdd.MdiParent       = this.MdiParent;
            frmAdd.Dock            = DockStyle.Fill;
            frmAdd.Show();
        }
Beispiel #4
0
        private void addNewCategoryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAddCategory frm = new frmAddCategory();

            frm.Show();
        }