コード例 #1
0
        // member contructor
        public UpdateDetaiItem(DetailGridViewDataSource arg)
        {
            this.InitializeComponent();

            /**
             * start to load list product types and coresponding prodcuts from database into view component(ComboBox Edit)
             *
             */
            // load product types from database
        }
コード例 #2
0
        private void sửaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.gridViewDanhSachSanPham.SelectedRowsCount == 0 || this.gridViewDanhSachSanPham.SelectedRowsCount > 1)
            {
                return;
            }
            // get value from selected row
            DetailGridViewDataSource item = (DetailGridViewDataSource)this.gridViewDanhSachSanPham.GetRow(this.gridViewDanhSachSanPham.FocusedRowHandle);

            // start to show the update form
            UpdateDetaiItem updateDetailItemForm = new UpdateDetaiItem(item);

            updateDetailItemForm.sendBackDelegate = new UpdateDetaiItem.onDataSendBack(this.updateDetailItemDelegate); // instance a delegate for form
            updateDetailItemForm.ShowDialog();
        }
コード例 #3
0
 // delegate function
 private void updateDetailItemDelegate(DetailGridViewDataSource arg)
 {
 }