public frmXuLyNVDieuChinhGiaTriTaiSan(DataGridViewRow dgvr)
 {
     //Sửa
     InitializeComponent();
     try
     {
         Them = false;
         DieuChinhGiaTriTaiSan temp = Utils.DataGridViewRow_to_DieuChinhGiaTriTaiSan(dgvr);
         idDieuChinhGiaTriTaiSan = temp.DieuChinhGiaTriTaiSanID;
         txtMaTaiSan.Text = temp.MaTaiSan;
         List<TaiSan> Ltaisan = TaiSanBiz.getListTaiSan(temp.MaTaiSan);
         taisan = (Ltaisan.Count == 0) ? new TaiSan() : Ltaisan[0];
         txtNam.Text = temp.Nam;
         txtKy.Text = temp.Ky;
         txtNgayChungTu.Text = (temp.NgayChungTu.Date == new DateTime(1753, 1, 1).Date) ? string.Empty : temp.NgayChungTu.ToString("MM/dd/yyyy");
         txtSoChungTu.Text = temp.SoChungTu;
         txtMaNguonVon.Text = temp.MaNguonVon;
         txtMaLyDoTangGiamTaiSan.Text = temp.MaLyDoTangGiamTaiSan;
         txtNguyenGia.Text = temp.NguyenGia.ToString();
         txtGiaTriDaKhauHao.Text = temp.GiaTriDaKhauHao.ToString();
         txtGiaTriConLai.Text = temp.GiaTriConLai.ToString();
         txtGiaTriKhauHao1Ky.Text = temp.GiaTriKhauHao1Ky.ToString();
         txtDienGiai.Text = temp.DienGiai;
     }
     catch { }
 }
Ejemplo n.º 2
0
        public TaiSan Copy()
        {
            TaiSan kq = new TaiSan();

            kq.MaTaiSan             = maTaiSan;
            kq.TenTaiSan            = tenTaiSan;
            kq.MaLoaiTaiSan         = maLoaiTaiSan;
            kq.MaLyDoTangGiamTaiSan = maLyDoTangGiamTaiSan;
            kq.NgayTangTaiSan       = ngayTangTaiSan;
            kq.NgayTinhKhauHao      = ngayTinhKhauHao;
            kq.SoKyKhauHao          = soKyKhauHao;
            kq.MaBoPhanHachToan     = maBoPhanHachToan;
            kq.MaPhanXuong          = maPhanXuong;
            kq.MaPhi             = maPhi;
            kq.MaBoPhanSuDung    = maBoPhanSuDung;
            kq.TKTaiSan          = tKTaiSan;
            kq.TKKhauHao         = tKKhauHao;
            kq.TKChiPhi          = tKChiPhi;
            kq.PhanNhom1         = phanNhom1;
            kq.PhanNhom2         = phanNhom2;
            kq.PhanNhom3         = phanNhom3;
            kq.TenKhac           = tenKhac;
            kq.SoHieuTaiSan      = soHieuTaiSan;
            kq.ThongSoKyThuat    = thongSoKyThuat;
            kq.NuocSanXuat       = nuocSanXuat;
            kq.NamSanXuat        = namSanXuat;
            kq.NgayDuaVaoSuDung  = ngayDuaVaoSuDung;
            kq.NgayDinhChiSuDung = ngayDinhChiSuDung;
            kq.LyDoDinhChi       = lyDoDinhChi;
            kq.GhiChu            = ghiChu;
            kq.Lchitiettaisan.AddRange(lchitiettaisan);
            kq.Lphutungkemtheo.AddRange(lphutungkemtheo);
            return(kq);
        }
Ejemplo n.º 3
0
        public static int EditTaiSan(TaiSan input)
        {
            string sql = "UPDATE [VNAAccounting].[dbo].[TaiSan] SET ";
            sql += "TenTaiSan = N'" + input.TenTaiSan + "',MaLoaiTaiSan = N'" + input.MaLoaiTaiSan.ToUpper() + "',MaLyDoTangGiamTaiSan = N'" + input.MaLyDoTangGiamTaiSan.ToUpper() + "',NgayTangTaiSan = '" + input.NgayTangTaiSan.ToString("MM/dd/yyyy") + "',NgayTinhKhauHao = '" + input.NgayTinhKhauHao.ToString("MM/dd/yyyy") + "',";
            sql += "SoKyKhauHao = N'" + input.SoKyKhauHao + "',MaBoPhanHachToan = N'" + input.MaBoPhanHachToan.ToUpper() + "',MaPhanXuong = N'" + input.MaPhanXuong.ToUpper() + "',MaPhi = N'" + input.MaPhi.ToUpper() + "',MaBoPhanSuDung = N'" + input.MaBoPhanSuDung.ToUpper() + "',";
            sql += "TKTaiSan = N'" + input.TKTaiSan.ToUpper() + "',TKKhauHao = N'" + input.TKKhauHao.ToUpper() + "',TKChiPhi = N'" + input.TKChiPhi.ToUpper() + "',PhanNhom1 = N'" + input.PhanNhom1 + "',PhanNhom2 = N'" + input.PhanNhom2 + "',";
            sql += "PhanNhom3 = N'" + input.PhanNhom3 + "',TenKhac = N'" + input.TenKhac + "',SoHieuTaiSan = N'" + input.SoHieuTaiSan.ToUpper() + "',ThongSoKyThuat = N'" + input.ThongSoKyThuat + "',NuocSanXuat = N'" + input.NuocSanXuat + "',";
            sql += "NamSanXuat = N'" + input.NamSanXuat + "',NgayDuaVaoSuDung = '" + input.NgayDuaVaoSuDung.ToString("MM/dd/yyyy") + "',NgayDinhChiSuDung = '" + input.NgayDinhChiSuDung.ToString("MM/dd/yyyy") + "',LyDoDinhChi = N'" + input.LyDoDinhChi + "',GhiChu = N'" + input.GhiChu + "'";
            sql += " WHERE MaTaiSan = N'" + input.MaTaiSan.ToUpper() + "'";
            int kq = DAL.CSDL.ThemSuaXoa(sql);
            if (kq > 0)
            {
                //Delete chi tiết tài sản
                ChiTietTaiSan xoactts = new ChiTietTaiSan(); xoactts.MaTaiSan = input.MaTaiSan;
                ChiTietTaiSanBiz.DeleteChiTietTaiSan(xoactts);
                //Delete phụ tùng kèm theo
                PhuTungKemTheo xoaptkt = new PhuTungKemTheo(); xoaptkt.MaTaiSan = input.MaTaiSan;
                PhuTungKemTheoBiz.DeletePhuTungKemTheo(xoaptkt);

                //Insert chi tiết tài sản
                foreach (ChiTietTaiSan item in input.Lchitiettaisan)
                {
                    ChiTietTaiSanBiz.AddChiTietTaiSan(item);
                }
                //Insert phụ tùng kèm theo
                foreach (PhuTungKemTheo item in input.Lphutungkemtheo)
                {
                    PhuTungKemTheoBiz.AddPhuTungKemTheo(item);
                }
            }
            return kq;
        }
Ejemplo n.º 4
0
 public static int AddTaiSan(TaiSan input)
 {
     string sql = "INSERT INTO [VNAAccounting].[dbo].[TaiSan]([MaTaiSan],[TenTaiSan],[MaLoaiTaiSan],[MaLyDoTangGiamTaiSan],[NgayTangTaiSan],[NgayTinhKhauHao],[SoKyKhauHao],[MaBoPhanHachToan],[MaPhanXuong],[MaPhi],[MaBoPhanSuDung],[TKTaiSan],[TKKhauHao],[TKChiPhi],[PhanNhom1],[PhanNhom2],[PhanNhom3],[TenKhac],[SoHieuTaiSan],[ThongSoKyThuat],[NuocSanXuat],[NamSanXuat],[NgayDuaVaoSuDung],[NgayDinhChiSuDung],[LyDoDinhChi],[GhiChu]) ";
     sql += "VALUES(";
     sql += "N'" + input.MaTaiSan.ToUpper() + "',N'" + input.TenTaiSan + "',N'" + input.MaLoaiTaiSan.ToUpper() + "',N'" + input.MaLyDoTangGiamTaiSan.ToUpper() + "','" + input.NgayTangTaiSan.ToString("MM/dd/yyyy") + "',";
     sql += "'" + input.NgayTinhKhauHao.ToString("MM/dd/yyyy") + "',N'" + input.SoKyKhauHao + "',N'" + input.MaBoPhanHachToan.ToUpper() + "',N'" + input.MaPhanXuong.ToUpper() + "',N'" + input.MaPhi.ToUpper() + "',";
     sql += "N'" + input.MaBoPhanSuDung.ToUpper() + "',N'" + input.TKTaiSan.ToUpper() + "',N'" + input.TKKhauHao.ToUpper() + "',N'" + input.TKChiPhi.ToUpper() + "',N'" + input.PhanNhom1 + "',";
     sql += "N'" + input.PhanNhom2 + "',N'" + input.PhanNhom3 + "',N'" + input.TenKhac + "',N'" + input.SoHieuTaiSan.ToUpper() + "',N'" + input.ThongSoKyThuat + "',";
     sql += "N'" + input.NuocSanXuat + "',N'" + input.NamSanXuat + "','" + input.NgayDuaVaoSuDung.ToString("MM/dd/yyyy") + "','" + input.NgayDinhChiSuDung.ToString("MM/dd/yyyy") + "',N'" + input.LyDoDinhChi + "',N'" + input.GhiChu + "'";
     sql += ")";
     int kq = DAL.CSDL.ThemSuaXoa(sql);
     if (kq > 0)
     {
         //Insert chi tiết tài sản
         foreach (ChiTietTaiSan item in input.Lchitiettaisan)
         {
             ChiTietTaiSanBiz.AddChiTietTaiSan(item);
         }
         //Insert phụ tùng kèm theo
         foreach (PhuTungKemTheo item in input.Lphutungkemtheo)
         {
             PhuTungKemTheoBiz.AddPhuTungKemTheo(item);
         }
     }
     return kq;
 }
Ejemplo n.º 5
0
 public static int DeleteTaiSan(TaiSan input)
 {
     string sql = "DELETE FROM [VNAAccounting].[dbo].[TaiSan] WHERE MaTaiSan = N'" + input.MaTaiSan.ToUpper() + "'";
     //Delete chi tiết tài sản
     ChiTietTaiSan xoactts = new ChiTietTaiSan(); xoactts.MaTaiSan = input.MaTaiSan;
     ChiTietTaiSanBiz.DeleteChiTietTaiSan(xoactts);
     //Delete phụ tùng kèm theo
     PhuTungKemTheo xoaptkt = new PhuTungKemTheo(); xoaptkt.MaTaiSan = input.MaTaiSan;
     PhuTungKemTheoBiz.DeletePhuTungKemTheo(xoaptkt);
     return DAL.CSDL.ThemSuaXoa(sql);
 }
 public frmXuLyNVThoiKhauHaoTaiSan(DataGridViewRow dgvr)
 {
     //Sửa
     InitializeComponent();
     try
     {
         Them = false;
         ThoiKhauHaoTaiSan temp = Utils.DataGridViewRow_to_ThoiKhauHaoTaiSan(dgvr);
         idThoiKhauHaoTaiSan = temp.ThoiKhauHaoTaiSanID;
         txtMaTaiSan.Text = temp.MaTaiSan;
         List<TaiSan> Ltaisan = TaiSanBiz.getListTaiSan(temp.MaTaiSan);
         taisan = (Ltaisan.Count == 0) ? new TaiSan() : Ltaisan[0];
         txtNgayThoiKhauHao.Text = (temp.NgayThoiKhauHao.Date == new DateTime(1753, 1, 1).Date) ? string.Empty : temp.NgayThoiKhauHao.ToString("MM/dd/yyyy");
     }
     catch { }
 }
 public frmXuLyNVGiamTaiSanCoDinh(DataGridViewRow dgvr)
 {
     //Sửa
     InitializeComponent();
     try
     {
         Them = false;
         GiamTaiSanCoDinh temp = Utils.DataGridViewRow_to_GiamTaiSanCoDinh(dgvr);
         idGiamTaiSanCoDinh = temp.GiamTaiSanCoDinhID;
         txtMaTaiSan.Text = temp.MaTaiSan;
         List<TaiSan> Ltaisan = TaiSanBiz.getListTaiSan(temp.MaTaiSan);
         taisan = (Ltaisan.Count == 0) ? new TaiSan() : Ltaisan[0];
         txtLyDoTangGiamTaiSan.Text = temp.MaLyDoTangGiamTaiSan;
         txtNgayGiamTaiSan.Text = (temp.NgayGiam.Date == new DateTime(1753, 1, 1).Date) ? string.Empty : temp.NgayGiam.ToString("MM/dd/yyyy");
         txtNgayKetThucKhauHao.Text = (temp.NgayKetThucKhauHao.Date == new DateTime(1753, 1, 1).Date) ? string.Empty : temp.NgayKetThucKhauHao.ToString("MM/dd/yyyy");
         txtSoChungTu.Text = temp.SoChungTu;
         txtLyDo.Text = temp.LyDo;
     }
     catch { }
 }
 public frmXuLyNVDieuChuyenBoPhanSuDung(DataGridViewRow dgvr)
 {
     //Sửa
     InitializeComponent();
     try
     {
         Them = false;
         DieuChuyenBoPhanSuDung temp = Utils.DataGridViewRow_to_DieuChuyenBoPhanSuDung(dgvr);
         idDieuChuyenBoPhanSuDung = temp.DieuChuyenBoPhanSuDungID;
         txtMaTaiSan.Text = temp.MaTaiSan;
         List<TaiSan> Ltaisan = TaiSanBiz.getListTaiSan(temp.MaTaiSan);
         taisan = (Ltaisan.Count == 0) ? new TaiSan() : Ltaisan[0];
         txtNam.Text = temp.Nam;
         txtKy.Text = temp.Ky;
         txtBoPhanSuDung.Text = temp.MaBoPhanSuDung;
         txtTKTaiSan.Text = temp.TKTaiSan;
         txtTKKhauHao.Text = temp.TKKhauHao;
         txtTKChiPhi.Text = temp.TKChiPhi;
     }
     catch { }
 }
 private void txtMaTaiSan_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == CONFIG.KeyClass.key_TimKiem)
         {//Tìm kiếm
             FRM.frmTimKiem.taisan = null;
             FRM.frmTimKiem frm = new FRM.frmTimKiem(CONFIG.ConstFrm.frmDMTaiSan);
             frm.ShowDialog();
             if (FRM.frmTimKiem.taisan != null)
             {
                 taisan = FRM.frmTimKiem.taisan.Copy();
                 txtMaTaiSan.Text = FRM.frmTimKiem.taisan.MaTaiSan.ToUpper();
                 lblTenTaiSan.Text = FRM.frmTimKiem.taisan.TenTaiSan;
             }
             FRM.frmTimKiem.taisan = null;
         }
     }
     catch (Exception ex)
     {
         //
     }
 }
Ejemplo n.º 10
0
 public TaiSan Copy()
 {
     TaiSan kq = new TaiSan();
     kq.MaTaiSan = maTaiSan;
     kq.TenTaiSan = tenTaiSan;
     kq.MaLoaiTaiSan = maLoaiTaiSan;
     kq.MaLyDoTangGiamTaiSan = maLyDoTangGiamTaiSan;
     kq.NgayTangTaiSan = ngayTangTaiSan;
     kq.NgayTinhKhauHao = ngayTinhKhauHao;
     kq.SoKyKhauHao = soKyKhauHao;
     kq.MaBoPhanHachToan = maBoPhanHachToan;
     kq.MaPhanXuong = maPhanXuong;
     kq.MaPhi = maPhi;
     kq.MaBoPhanSuDung = maBoPhanSuDung;
     kq.TKTaiSan = tKTaiSan;
     kq.TKKhauHao = tKKhauHao;
     kq.TKChiPhi = tKChiPhi;
     kq.PhanNhom1 = phanNhom1;
     kq.PhanNhom2 = phanNhom2;
     kq.PhanNhom3 = phanNhom3;
     kq.TenKhac = tenKhac;
     kq.SoHieuTaiSan = soHieuTaiSan;
     kq.ThongSoKyThuat = thongSoKyThuat;
     kq.NuocSanXuat = nuocSanXuat;
     kq.NamSanXuat = namSanXuat;
     kq.NgayDuaVaoSuDung = ngayDuaVaoSuDung;
     kq.NgayDinhChiSuDung = ngayDinhChiSuDung;
     kq.LyDoDinhChi = lyDoDinhChi;
     kq.GhiChu = ghiChu;
     kq.Lchitiettaisan.AddRange(lchitiettaisan);
     kq.Lphutungkemtheo.AddRange(lphutungkemtheo);
     return kq;
 }
Ejemplo n.º 11
0
 //------------------------------------------>
 private void DongY()
 {
     if (vtIndex == -1) return;
     switch (chose)
     {
         case CONFIG.ConstFrm.frmDMLoaiTaiSan:
             {
                 loaitaisan = Utils.DataGridViewRow_to_LoaiTaiSan(DataGridView.Rows[vtIndex]);
                 break;
             }
         case CONFIG.ConstFrm.frmDMTaiSan:
             {
                 taisan = Utils.DataGridViewRow_to_TaiSan(DataGridView.Rows[vtIndex]);
                 break;
             }
         case CONFIG.ConstFrm.frmDMPhanNhomTaiSan:
             {
                 phannhomtaisan = Utils.DataGridViewRow_to_PhanNhomTaiSan(DataGridView.Rows[vtIndex]);
                 break;
             }
         case CONFIG.ConstFrm.frmDMLyDoTangGiamTaiSan:
             {
                 lydotanggiamtaisan = Utils.DataGridViewRow_to_LyDoTangGiamTaiSan(DataGridView.Rows[vtIndex]);
                 break;
             }
         case CONFIG.ConstFrm.frmDMBoPhanHachToan:
             {
                 bophanhachtoan = Utils.DataGridViewRow_to_BoPhanHachToan(DataGridView.Rows[vtIndex]);
                 break;
             }
         case CONFIG.ConstFrm.frmDMPhanXuong:
             {
                 phanxuong = Utils.DataGridViewRow_to_PhanXuong(DataGridView.Rows[vtIndex]);
                 break;
             }
         case CONFIG.ConstFrm.frmDMPhi:
             {
                 phi = Utils.DataGridViewRow_to_Phi(DataGridView.Rows[vtIndex]);
                 break;
             }
         case CONFIG.ConstFrm.frmDMBoPhanSuDung:
             {
                 bophansusung = Utils.DataGridViewRow_to_BoPhanSuDung(DataGridView.Rows[vtIndex]);
                 break;
             }
         case CONFIG.ConstFrm.frmDMNguonVon:
             {
                 nguonvon = Utils.DataGridViewRow_to_NguonVon(DataGridView.Rows[vtIndex]);
                 break;
             }
         default:
             break;
     }
 }
Ejemplo n.º 12
0
        private void btnDongY_Click(object sender, EventArgs e)
        {
            try
            {
                TaiSan temp = new TaiSan();
                temp.MaTaiSan = txtMaTaiSan.Text;
                temp.TenTaiSan = txtTenTaiSan.Text;
                temp.MaLoaiTaiSan = txtNhomTaiSan.Text;
                temp.MaLyDoTangGiamTaiSan = txtLyDoTang.Text;
                temp.NgayTangTaiSan = !string.IsNullOrEmpty(txtNgayTangTaiSan.Text) ? DateTime.Parse(txtNgayTangTaiSan.Text) : new DateTime(1753, 1, 1);
                temp.NgayTinhKhauHao = !string.IsNullOrEmpty(txtNgayTinhKhauHao.Text) ? DateTime.Parse(txtNgayTinhKhauHao.Text) : new DateTime(1753, 1, 1);
                temp.SoKyKhauHao = txtSoKyKhauHao.Text;
                temp.MaBoPhanHachToan = txtBoPhanHachToan.Text;
                temp.MaPhanXuong = txtMaPhanXuong.Text;
                temp.MaPhi = txtMaPhi.Text;
                temp.MaBoPhanSuDung = txtBoPhanSuDung.Text;
                temp.TKTaiSan = txtTKTaiSan.Text;
                temp.TKKhauHao = txtTKKhauHao.Text;
                temp.TKChiPhi = txtTKChiPhi.Text;
                temp.PhanNhom1 = txtPhanNhom1.Text;
                temp.PhanNhom2 = txtPhanNhom2.Text;
                temp.PhanNhom3 = txtPhanNhom3.Text;

                temp.TenKhac = txtTenKhac.Text;
                temp.SoHieuTaiSan = txtSoHieuTaiSan.Text;
                temp.ThongSoKyThuat = txtThongSoKyThuat.Text;
                temp.NuocSanXuat = txtNuocSanXuat.Text;
                temp.NamSanXuat = txtNamSanXuat.Text;
                temp.NgayDuaVaoSuDung = !string.IsNullOrEmpty(txtNgayDuaVaoSuDung.Text) ? DateTime.Parse(txtNgayDuaVaoSuDung.Text) : new DateTime(1753, 1, 1);
                temp.NgayDinhChiSuDung = !string.IsNullOrEmpty(txtNgayDinhChiSuDung.Text) ? DateTime.Parse(txtNgayDinhChiSuDung.Text) : new DateTime(1753, 1, 1);
                temp.LyDoDinhChi = txtLyDoDinhChi.Text;
                temp.GhiChu = txtGhiChu.Text;

                temp.Lchitiettaisan.AddRange(LChiTietTaiSan);
                temp.Lphutungkemtheo.AddRange(LPhuTungKemTheo);

                bool ThatBai = false;
                if (Them)
                {//Thêm
                    if (!CheckLoi(temp)) return;

                    int kq = TaiSanBiz.AddTaiSan(temp);
                    if (kq > 0) MSG.ThemThanhCong();
                    else
                    {
                        ThatBai = true;
                        MSG.ThemThatBai();
                    }
                }
                else
                {//Sửa
                    int kq = TaiSanBiz.EditTaiSan(temp);
                    if (kq > 0) MSG.SuaThanhCong();
                    else
                    {
                        ThatBai = true;
                        MSG.SuaThatBai();
                    }
                }
                if (ThatBai && MSG.MESSAGE("Bạn có muốn sửa lại dữ liệu không?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) return;
                this.Close();
            }
            catch (Exception ex)
            {
                MSG.Error(ex);
            }
        }
Ejemplo n.º 13
0
 bool CheckLoi(TaiSan data)
 {
     bool kq = true;
     //mã tài sản rỗng
     if (string.IsNullOrEmpty(data.MaTaiSan))
     {
         MSG.ErrorStand("Bạn chưa nhập mã tài sản!");
         txtMaTaiSan.Focus();
         return false;
     }
     //mã tài sản đã có trong cơ sở dữ liệu
     foreach (TaiSan item in frmDMTaiSan.Ldata)
     {
         if (item.MaTaiSan.ToUpper().Equals(txtMaTaiSan.Text.ToUpper()))
         {
             MSG.ErrorStand("Mã tài sản đã có trong cơ sở dữ liệu!");
             txtMaTaiSan.Focus();
             return false;
         }
     }
     return kq;
 }
Ejemplo n.º 14
0
        public static List<TaiSan> getListTaiSan(string MaTaiSanInput, int select)
        {
            List<TaiSan> kq = new List<TaiSan>();
            string sql = string.Empty;
            if (select == 0) sql = "SELECT * FROM  [VNAAccounting].[dbo].[TaiSan]";
            else if (select == 1) sql = "SELECT * FROM  [VNAAccounting].[dbo].[TaiSan] WHERE MaTaiSan = '" + MaTaiSanInput + "'";
            System.Data.DataTable dt = DAL.CSDL.hienthi(sql);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                TaiSan temp = new TaiSan();
                temp.MaTaiSan = dt.Rows[i]["MaTaiSan"].ToString();
                temp.TenTaiSan = dt.Rows[i]["TenTaiSan"].ToString();
                temp.MaLoaiTaiSan = dt.Rows[i]["MaLoaiTaiSan"].ToString();
                temp.MaLyDoTangGiamTaiSan = dt.Rows[i]["MaLyDoTangGiamTaiSan"].ToString();
                temp.NgayTangTaiSan = DateTime.Parse(dt.Rows[i]["NgayTangTaiSan"].ToString());
                temp.NgayTinhKhauHao = DateTime.Parse(dt.Rows[i]["NgayTinhKhauHao"].ToString());
                temp.SoKyKhauHao = dt.Rows[i]["SoKyKhauHao"].ToString();
                temp.MaBoPhanHachToan = dt.Rows[i]["MaBoPhanHachToan"].ToString();
                temp.MaPhanXuong = dt.Rows[i]["MaPhanXuong"].ToString();
                temp.MaPhi = dt.Rows[i]["MaPhi"].ToString();
                temp.MaBoPhanSuDung = dt.Rows[i]["MaBoPhanSuDung"].ToString();
                temp.TKTaiSan = dt.Rows[i]["TKTaiSan"].ToString();
                temp.TKKhauHao = dt.Rows[i]["TKKhauHao"].ToString();
                temp.TKChiPhi = dt.Rows[i]["TKChiPhi"].ToString();
                temp.PhanNhom1 = dt.Rows[i]["PhanNhom1"].ToString();
                temp.PhanNhom2 = dt.Rows[i]["PhanNhom2"].ToString();
                temp.PhanNhom3 = dt.Rows[i]["PhanNhom3"].ToString();
                temp.TenKhac = dt.Rows[i]["TenKhac"].ToString();
                temp.SoHieuTaiSan = dt.Rows[i]["SoHieuTaiSan"].ToString();
                temp.ThongSoKyThuat = dt.Rows[i]["ThongSoKyThuat"].ToString();
                temp.NuocSanXuat = dt.Rows[i]["NuocSanXuat"].ToString();
                temp.NamSanXuat = dt.Rows[i]["NamSanXuat"].ToString();
                temp.NgayDuaVaoSuDung = DateTime.Parse(dt.Rows[i]["NgayDuaVaoSuDung"].ToString());
                temp.NgayDinhChiSuDung = DateTime.Parse(dt.Rows[i]["NgayDinhChiSuDung"].ToString());
                temp.LyDoDinhChi = dt.Rows[i]["LyDoDinhChi"].ToString();
                temp.GhiChu = dt.Rows[i]["GhiChu"].ToString();

                temp.Lchitiettaisan = ChiTietTaiSanBiz.getListChiTietTaiSan(temp.MaTaiSan.ToUpper());
                temp.Lphutungkemtheo = PhuTungKemTheoBiz.getListPhuTungKemTheo(temp.MaTaiSan.ToUpper());

                kq.Add(temp);
            }
            return kq;
        }