예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            PhieuNhapHang_Form newImportReceipt = new PhieuNhapHang_Form(ActionType.ACTION_CREATE_NEW, null);

            newImportReceipt.IsFormParentForm        = true; // indicate that newImportReceipt is created from parent form
            newImportReceipt.refreshDelegateCallback = new PhieuNhapHang_Form.RefreshDelegate(this.refresh);
            newImportReceipt.ShowDialog();
        }
예제 #2
0
        private void simpleButtonChiTiet_Click(object sender, EventArgs e)
        {
            // check the gridview is valid
            if (this.gridViewDanhSachPhieuNhapHang.SelectedRowsCount < 0 || this.gridViewDanhSachPhieuNhapHang.SelectedRowsCount > 1 || this.gridViewDanhSachPhieuNhapHang.DataRowCount == 0)
            {
                return;
            }
            PHIEUNHAPHANG selectedImportReceipt = (PHIEUNHAPHANG)this.gridViewDanhSachPhieuNhapHang.GetRow(this.gridViewDanhSachPhieuNhapHang.FocusedRowHandle);
            // start the form
            PhieuNhapHang_Form viewImportDetailForm = new PhieuNhapHang_Form(ActionType.ACTION_VIEW, selectedImportReceipt);

            // show form
            viewImportDetailForm.ShowDialog();
        }