public static string Sua(BangGiaDanhThiep bGiaDThiep)
        {
            var bangGiaDanhThiepLogic = new BangGiaDanhThiepLogic();
            var itemBDO = new BangGiaDanhThiepBDO();

            ChuyenDoDTOThanhBDO(bGiaDThiep, itemBDO);
            return(bangGiaDanhThiepLogic.Sua(itemBDO));
        }
        public decimal GiaDanhThiepTheoBang()
        {
            decimal kq = 0;

            if (this.IdBangGia > 0)
            {
                var bangGia = BangGiaDanhThiep.DocTheoId(this.IdBangGia);
                return(TinhToan.GiaBuoc(bangGia.DaySoLuong, bangGia.DayGia, this.SoLuongHop));
            }
            return(kq);
        }
        public static BangGiaDanhThiep DocTheoId(int idBangGia)
        {
            var bGiaInNhanhLogic         = new BangGiaDanhThiepLogic();
            BangGiaDanhThiep bGiaInNhanh = new BangGiaDanhThiep();

            try
            {
                var giayBDO = bGiaInNhanhLogic.DocTheoId(idBangGia);
                //Chuyen
                ChuyenDoiBDOThanhDTO(giayBDO, bGiaInNhanh);
            }
            catch
            {
            }
            return(bGiaInNhanh);
        }
 private static void ChuyenDoDTOThanhBDO(BangGiaDanhThiep bGiaDanhThiep, BangGiaDanhThiepBDO bGiaDanhThiepBDO)
 {
     bGiaDanhThiepBDO.ID                 = bGiaDanhThiep.ID;
     bGiaDanhThiepBDO.Ten                = bGiaDanhThiep.Ten;
     bGiaDanhThiepBDO.MoTa               = bGiaDanhThiep.MoTa;
     bGiaDanhThiepBDO.DaySoLuong         = bGiaDanhThiep.DaySoLuong;
     bGiaDanhThiepBDO.DayGia             = bGiaDanhThiep.DayGia;
     bGiaDanhThiepBDO.InHaiMat           = bGiaDanhThiep.InHaiMat;
     bGiaDanhThiepBDO.KhongCon           = bGiaDanhThiep.KhongCon;
     bGiaDanhThiepBDO.ThuTu              = bGiaDanhThiep.ThuTu;
     bGiaDanhThiepBDO.IdHangKhachHang    = bGiaDanhThiep.IdHangKhachHang;
     bGiaDanhThiepBDO.SoHopToiDa         = bGiaDanhThiep.SoHopToiDa;
     bGiaDanhThiepBDO.NoiDungBangGia     = bGiaDanhThiep.NoiDungBangGia;
     bGiaDanhThiepBDO.GiayBaoGom         = bGiaDanhThiep.GiayBaoGom;
     bGiaDanhThiepBDO.KhoToChay          = bGiaDanhThiep.KhoToChay;
     bGiaDanhThiepBDO.SoDanhThiepTrenHop = bGiaDanhThiep.SoDanhThiepTrenHop;
 }