예제 #1
0
        private void DeleteCommand()
        {
            if (gridView.FocusedRowHandle < 0)
            {
                return;
            }

            var result = NotifyHelper.ShowDeleteConfirm();

            if (result == DialogResult.Yes)
            {
                var sanPham = (CAT_SanPham)gridView.GetFocusedRow();
                int rs      = SanPhamCtrl.Delete(sanPham.ID_san_pham);

                if (rs > 0)
                {
                    gridControl_Load();
                }
                else
                {
                    NotifyHelper.ShowDeleteError();
                }
            }
        }
예제 #2
0
        private void DeleteCommand()
        {
            if (gridView.FocusedRowHandle < 0)
            {
                return;
            }

            var result = NotifyHelper.ShowDeleteConfirm();

            if (result == DialogResult.Yes)
            {
                var loai = (ViewCboLoaiVatTu)gridView.GetFocusedRow();
                int rs   = LoaiVatTuCtrl.Delete(loai.ID_loai_vat_tu);

                if (rs > 0)
                {
                    gridControl_Load();
                }
                else
                {
                    NotifyHelper.ShowDeleteError();
                }
            }
        }
예제 #3
0
        private void DeleteKhoVatTu()
        {
            if (grvKhoVatTu.FocusedRowHandle < 0)
            {
                return;
            }

            var result = NotifyHelper.ShowDeleteConfirm();

            if (result == DialogResult.Yes)
            {
                var kho = (STO_KhoVatTu)grvKhoVatTu.GetFocusedRow();
                int rs  = KhoVatTuCtrl.Delete(kho.ID_kho);

                if (rs > 0)
                {
                    grvKhoVatTu_Load();
                }
                else
                {
                    NotifyHelper.ShowDeleteError();
                }
            }
        }
예제 #4
0
        private void DeleteCommand()
        {
            if (gridView.FocusedRowHandle < 0)
            {
                return;
            }

            var result = NotifyHelper.ShowDeleteConfirm();

            if (result == DialogResult.Yes)
            {
                var nhom = (STO_NhomVatTu)gridView.GetFocusedRow();
                int rs   = NhomVatTuCtrl.Delete(nhom.ID_nhom_vat_tu);

                if (rs > 0)
                {
                    gridControl_Load();
                }
                else
                {
                    NotifyHelper.ShowDeleteError();
                }
            }
        }
예제 #5
0
        private void DeleteCommand()
        {
            if (gridView.FocusedRowHandle < 0)
            {
                return;
            }

            var result = NotifyHelper.ShowDeleteConfirm();

            if (result == DialogResult.Yes)
            {
                var khachHang = (CAT_KhachHang)gridView.GetFocusedRow();
                int rs        = KhachHangCtrl.Delete(khachHang.ID_khach_hang);

                if (rs > 0)
                {
                    gridControl_Load();
                }
                else
                {
                    NotifyHelper.ShowDeleteError();
                }
            }
        }
예제 #6
0
        private void DeleteCommand()
        {
            if (gridView.FocusedRowHandle < 0)
            {
                return;
            }

            var result = NotifyHelper.ShowDeleteConfirm();

            if (result == DialogResult.Yes)
            {
                var nhaCC = (CAT_NhaCungCap)gridView.GetFocusedRow();
                int rs    = NhaCungCapCtrl.Delete(nhaCC.ID_nha_cung_cap);

                if (rs > 0)
                {
                    gridControl_Load();
                }
                else
                {
                    NotifyHelper.ShowDeleteError();
                }
            }
        }