partial void DeleteKT_LCTG(KT_LCTG instance);
 partial void UpdateKT_LCTG(KT_LCTG instance);
        private void gridView1_ValidateRow(object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs e)
        {
            try
            {
                GridView view = sender as GridView;
                _KTLCTGRepo = new KTLCTGRepo();
                //Kiểm tra đây là dòng dữ liệu mới hay cũ, nếu là mới thì mình insert
                if (view.IsNewItemRow(e.RowHandle))
                {
                    //e.RowHandle trả về giá trị int là thứ tự của dòng hiện tại
                    KT_LCTG obj = new KT_LCTG();
                    obj.ID_LOAI = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "ID_LOAI"), "");
                    obj.TEN_CT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TEN_CT"), "");
                    obj.TK_THUE = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_THUE"), "");
                    obj.CO_TK_DU_TK_THUE = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_TK_DU_TK_THUE"), "");
                    obj.CO_THUE_GTGT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_THUE_GTGT"), "");
                    obj.CO_HANG_HOA = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_HANG_HOA"), "");
                    obj.SERI_HD = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "SERI_HD"), "");
                    obj.LOAI_TIEN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "LOAI_TIEN"), "");
                    obj.SO_CT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "SO_CT"), "");
                    obj.SO_HD = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "SO_HD"), "");
                    obj.CO_XUAT_KHO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_XUAT_KHO"), "");
                    obj.CO_NHIEU_HD = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_NHIEU_HD"), "");
                    //obj.MAN_HINH = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "MAN_HINH"), "");
                    obj.TK_NO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_NO"), "");
                    obj.TK_CO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_CO"), "");
                    //obj.VONG_LAP = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "VONG_LAP"), "");
                    obj.TK_THUE_NK = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_THUE_NK"), "");
                    //obj.HAM_IN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "HAM_IN"), "");
                    obj.CO_UN_CHI = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_UN_CHI"), "");
                    obj.CO_XK_CUM = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_XK_CUM"), "");
                    obj.NGUOI_GD = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NGUOI_GD"), "");
                    obj.CO_VUNG_BAN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_VUNG_BAN"), "");
                    obj.CO_DON_TRONG = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_DON_TRONG"), "");
                    obj.CO_LO_NHAP = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_LO_NHAP"), "");
                    obj.FILE_MAU = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "FILE_MAU"), "");
                    obj.NHIEU_LIEN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NHIEU_LIEN"), "");
                    obj.CLTG = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CLTG"), "");
                    obj.HOI_IN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "HOI_IN"), "");
                    obj.DIEN_GIAI = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "DIEN_GIAI"), "");
                    obj.SO_DONG_IN = Utils.CIntDef(view.GetRowCellValue(e.RowHandle, "SO_DONG_IN"), 0);
                    obj.MA_TIEP_THI = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "MA_TIEP_THI"), "");
                    obj.NHIEU_DV = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NHIEU_DV"), "");
                    obj.CO_DIEN_GIAI2 = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_DIEN_GIAI2"), "");
                    obj.CO_CK = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_CK"), "");
                    obj.TK_CLTG_LAI = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_CLTG_LAI"), "");
                    obj.TK_CLTG_LO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_CLTG_LO"), "");
                    obj.CO_CHUYEN_KHO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_CHUYEN_KHO"), "");
                    obj.CO_TIEN_HANG = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_TIEN_HANG"), "");
                    obj.CO_FORM_RIENG = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_FORM_RIENG"), "");
                    obj.CO_CK_TRUOC = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_CK_TRUOC"), "");
                    obj.CO_DV_PHU = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_DV_PHU"), "");
                    obj.CO_QUY_CACH = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_QUY_CACH"), "");
                    obj.CO_PHE_LIEU = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_PHE_LIEU"), "");
                    obj.CO_MS_KH = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_MS_KH"), "");
                    obj.LOAI_THUE = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "LOAI_THUE"), "");
                    //obj.CO_DG_NHAP = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_DG_NHAP"), "");
                    obj.MA_DTPN_NO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "MA_DTPN_NO"), "");
                    obj.MA_DTPN_CO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "MA_DTPN_CO"), "");
                    obj.CO_THUE_TTDB = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_THUE_TTDB"), "");
                    obj.NHIEU_USER = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NHIEU_USER"), "");
                    obj.TRANG_THAI = Utils.CIntDef(view.GetRowCellValue(e.RowHandle, "TRANG_THAI"), 0);
                    obj.CO_TK_XUAT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_TK_XUAT"), "");
                    obj.TK_XUAT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_XUAT"), "");
                    obj.TK_GIA_VON = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_GIA_VON"), "");
                    obj.NHOM_CT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NHOM_CT"), "");
                    //obj.NHOM_DS_COT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NHOM_DS_COT"), "");
                    obj.TS_GTGT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TS_GTGT"), "");
                    obj.KIEU_CONGTY = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "KIEU_CONGTY"), "");
                    obj.CO_CK_TM = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_CK_TM"), "");
                    obj.CO_CK_TT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_CK_TT"), "");
                    obj.CO_VANCHUYEN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_VANCHUYEN"), "");

                    _KTLCTGRepo.Create(obj);

                }
                //Cũ thì update
                else
                {
                    int id = Utils.CIntDef(view.GetRowCellValue(e.RowHandle, "ID"), 0);
                    KT_LCTG obj = _KTLCTGRepo.GetById(id);
                    if (obj != null)
                    {
                        obj.ID_LOAI = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "ID_LOAI"), "");
                        obj.TEN_CT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TEN_CT"), "");
                        obj.TK_THUE = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_THUE"), "");
                        obj.CO_TK_DU_TK_THUE = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_TK_DU_TK_THUE"), "");
                        obj.CO_THUE_GTGT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_THUE_GTGT"), "");
                        obj.CO_HANG_HOA = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_HANG_HOA"), "");
                        obj.SERI_HD = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "SERI_HD"), "");
                        obj.LOAI_TIEN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "LOAI_TIEN"), "");
                        obj.SO_CT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "SO_CT"), "");
                        obj.SO_HD = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "SO_HD"), "");
                        obj.CO_XUAT_KHO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_XUAT_KHO"), "");
                        obj.CO_NHIEU_HD = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_NHIEU_HD"), "");
                        //obj.MAN_HINH = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "MAN_HINH"), "");
                        obj.TK_NO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_NO"), "");
                        obj.TK_CO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_CO"), "");
                        //obj.VONG_LAP = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "VONG_LAP"), "");
                        obj.TK_THUE_NK = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_THUE_NK"), "");
                        //obj.HAM_IN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "HAM_IN"), "");
                        obj.CO_UN_CHI = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_UN_CHI"), "");
                        obj.CO_XK_CUM = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_XK_CUM"), "");
                        obj.NGUOI_GD = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NGUOI_GD"), "");
                        obj.CO_VUNG_BAN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_VUNG_BAN"), "");
                        obj.CO_DON_TRONG = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_DON_TRONG"), "");
                        obj.CO_LO_NHAP = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_LO_NHAP"), "");
                        obj.FILE_MAU = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "FILE_MAU"), "");
                        obj.NHIEU_LIEN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NHIEU_LIEN"), "");
                        obj.CLTG = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CLTG"), "");
                        obj.HOI_IN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "HOI_IN"), "");
                        obj.DIEN_GIAI = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "DIEN_GIAI"), "");
                        obj.SO_DONG_IN = Utils.CIntDef(view.GetRowCellValue(e.RowHandle, "SO_DONG_IN"), 0);
                        obj.MA_TIEP_THI = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "MA_TIEP_THI"), "");
                        obj.NHIEU_DV = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NHIEU_DV"), "");
                        obj.CO_DIEN_GIAI2 = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_DIEN_GIAI2"), "");
                        obj.CO_CK = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_CK"), "");
                        obj.TK_CLTG_LAI = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_CLTG_LAI"), "");
                        obj.TK_CLTG_LO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_CLTG_LO"), "");
                        obj.CO_CHUYEN_KHO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_CHUYEN_KHO"), "");
                        obj.CO_TIEN_HANG = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_TIEN_HANG"), "");
                        obj.CO_FORM_RIENG = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_FORM_RIENG"), "");
                        obj.CO_CK_TRUOC = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_CK_TRUOC"), "");
                        obj.CO_DV_PHU = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_DV_PHU"), "");
                        obj.CO_QUY_CACH = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_QUY_CACH"), "");
                        obj.CO_PHE_LIEU = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_PHE_LIEU"), "");
                        obj.CO_MS_KH = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_MS_KH"), "");
                        obj.LOAI_THUE = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "LOAI_THUE"), "");
                        //obj.CO_DG_NHAP = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_DG_NHAP"), "");
                        obj.MA_DTPN_NO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "MA_DTPN_NO"), "");
                        obj.MA_DTPN_CO = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "MA_DTPN_CO"), "");
                        obj.CO_THUE_TTDB = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_THUE_TTDB"), "");
                        obj.NHIEU_USER = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NHIEU_USER"), "");
                        obj.TRANG_THAI = Utils.CIntDef(view.GetRowCellValue(e.RowHandle, "TRANG_THAI"), 0);
                        obj.CO_TK_XUAT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_TK_XUAT"), "");
                        obj.TK_XUAT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_XUAT"), "");
                        obj.TK_GIA_VON = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TK_GIA_VON"), "");
                        obj.NHOM_CT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NHOM_CT"), "");
                        //obj.NHOM_DS_COT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "NHOM_DS_COT"), "");
                        obj.TS_GTGT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "TS_GTGT"), "");
                        obj.KIEU_CONGTY = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "KIEU_CONGTY"), "");
                        obj.CO_CK_TM = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_CK_TM"), "");
                        obj.CO_CK_TT = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_CK_TT"), "");
                        obj.CO_VANCHUYEN = Utils.CStrDef(view.GetRowCellValue(e.RowHandle, "CO_VANCHUYEN"), "");

                        _KTLCTGRepo.Update(obj);
                    }
                }
                Load_Data();
            }
            catch (Exception ex)
            {
                e.Valid = false;
                MessageBox.Show(ex.Message, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 partial void InsertKT_LCTG(KT_LCTG instance);
        private void Save_Duplicate()
        {
            try
            {
                if (MessageBox.Show("Bạn có muốn copy dòng này thành dòng mới?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    _KTLCTGRepo = new KTLCTGRepo();
                    KT_LCTG obj = new KT_LCTG();
                    obj.ID_LOAI = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "ID_LOAI"), "");
                    obj.TEN_CT = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TEN_CT"), "");
                    obj.TK_THUE = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TK_THUE"), "");
                    obj.CO_TK_DU_TK_THUE = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_TK_DU_TK_THUE"), "");
                    obj.CO_THUE_GTGT = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_THUE_GTGT"), "");
                    obj.CO_HANG_HOA = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_HANG_HOA"), "");
                    obj.SERI_HD = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SERI_HD"), "");
                    obj.LOAI_TIEN = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "LOAI_TIEN"), "");
                    obj.SO_CT = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SO_CT"), "");
                    obj.SO_HD = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SO_HD"), "");
                    obj.CO_XUAT_KHO = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_XUAT_KHO"), "");
                    obj.CO_NHIEU_HD = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_NHIEU_HD"), "");
                    //obj.MAN_HINH = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MAN_HINH"), "");
                    obj.TK_NO = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TK_NO"), "");
                    obj.TK_CO = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TK_CO"), "");
                    //obj.VONG_LAP = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "VONG_LAP"), "");
                    obj.TK_THUE_NK = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TK_THUE_NK"), "");
                    //obj.HAM_IN = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "HAM_IN"), "");
                    obj.CO_UN_CHI = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_UN_CHI"), "");
                    obj.CO_XK_CUM = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_XK_CUM"), "");
                    obj.NGUOI_GD = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NGUOI_GD"), "");
                    obj.CO_VUNG_BAN = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_VUNG_BAN"), "");
                    obj.CO_DON_TRONG = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_DON_TRONG"), "");
                    obj.CO_LO_NHAP = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_LO_NHAP"), "");
                    obj.FILE_MAU = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "FILE_MAU"), "");
                    obj.NHIEU_LIEN = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NHIEU_LIEN"), "");
                    obj.CLTG = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CLTG"), "");
                    obj.HOI_IN = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "HOI_IN"), "");
                    obj.DIEN_GIAI = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "DIEN_GIAI"), "");
                    obj.SO_DONG_IN = Utils.CIntDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SO_DONG_IN"), 0);
                    obj.MA_TIEP_THI = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MA_TIEP_THI"), "");
                    obj.NHIEU_DV = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NHIEU_DV"), "");
                    obj.CO_DIEN_GIAI2 = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_DIEN_GIAI2"), "");
                    obj.CO_CK = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_CK"), "");
                    obj.TK_CLTG_LAI = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TK_CLTG_LAI"), "");
                    obj.TK_CLTG_LO = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TK_CLTG_LO"), "");
                    obj.CO_CHUYEN_KHO = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_CHUYEN_KHO"), "");
                    obj.CO_TIEN_HANG = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_TIEN_HANG"), "");
                    obj.CO_FORM_RIENG = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_FORM_RIENG"), "");
                    obj.CO_CK_TRUOC = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_CK_TRUOC"), "");
                    obj.CO_DV_PHU = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_DV_PHU"), "");
                    obj.CO_QUY_CACH = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_QUY_CACH"), "");
                    obj.CO_PHE_LIEU = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_PHE_LIEU"), "");
                    obj.CO_MS_KH = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_MS_KH"), "");
                    obj.LOAI_THUE = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "LOAI_THUE"), "");
                    //obj.CO_DG_NHAP = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_DG_NHAP"), "");
                    obj.MA_DTPN_NO = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MA_DTPN_NO"), "");
                    obj.MA_DTPN_CO = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MA_DTPN_CO"), "");
                    obj.CO_THUE_TTDB = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_THUE_TTDB"), "");
                    obj.NHIEU_USER = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NHIEU_USER"), "");
                    obj.TRANG_THAI = Utils.CIntDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TRANG_THAI"), 0);
                    obj.CO_TK_XUAT = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_TK_XUAT"), "");
                    obj.TK_XUAT = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TK_XUAT"), "");
                    obj.TK_GIA_VON = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TK_GIA_VON"), "");
                    obj.NHOM_CT = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NHOM_CT"), "");
                    //obj.NHOM_DS_COT = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NHOM_DS_COT"), "");
                    obj.TS_GTGT = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TS_GTGT"), "");
                    obj.KIEU_CONGTY = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "KIEU_CONGTY"), "");
                    obj.CO_CK_TM = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_CK_TM"), "");
                    obj.CO_CK_TT = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_CK_TT"), "");
                    obj.CO_VANCHUYEN = Utils.CStrDef(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CO_VANCHUYEN"), "");

                    _KTLCTGRepo.Create(obj);
                    MessageBox.Show("Đã copy dòng này vào cuối bảng!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }