Exemplo n.º 1
0
 //--Hàm Chuyển
 public static void ChuyenBDOThanhDTO(MonThanhPhamBDO monTP_BDO, MonThanhPham monTP_DTO)
 {
     monTP_DTO.ID         = monTP_BDO.ID;
     monTP_DTO.Ten        = monTP_BDO.Ten;
     monTP_DTO.Ma_01      = monTP_BDO.Ma_01;
     monTP_DTO.Ma_02      = monTP_BDO.Ma_02;
     monTP_DTO.Ma_02      = monTP_BDO.Ma_03;
     monTP_DTO.DaySoLuong = monTP_BDO.DaySoLuong;
     monTP_DTO.DonViTinh  = monTP_BDO.DonViTinh;
     monTP_DTO.ThuTu      = monTP_BDO.ThuTu;
 }
Exemplo n.º 2
0
        public static MonThanhPham DocTheoId(int iD)
        {
            var             khoSanPhamLogic = new MonThanhPhamLogic();
            MonThanhPhamBDO khoSP_BDO       = null;
            MonThanhPham    khoSP_DTO       = null;

            try
            {
                khoSP_BDO = khoSanPhamLogic.DocTheoId(iD);
                if (khoSP_BDO != null)
                {
                    khoSP_DTO = new MonThanhPham();
                    //Chuyển đổi
                    MonThanhPham.ChuyenBDOThanhDTO(khoSP_BDO, khoSP_DTO);
                }
            }
            catch { }
            return(khoSP_DTO);
        }
Exemplo n.º 3
0
 public static DichVuThanhPham DocDVThanhPhamTheoId(int iDDVTP)
 {
     return(MonThanhPham.DocTatCaDichVuThanhPham().FirstOrDefault(x => x.ID == iDDVTP));
 }