コード例 #1
0
        public static TuVanDichVu getFromReader(IDataReader rd)
        {
            var Item = new TuVanDichVu();

            if (rd.FieldExists("TVDV_ID"))
            {
                Item.ID = (Guid)(rd["TVDV_ID"]);
            }
            if (rd.FieldExists("TVDV_KH_ID"))
            {
                Item.KH_ID = (Guid)(rd["TVDV_KH_ID"]);
            }
            if (rd.FieldExists("TVDV_TV_ID"))
            {
                Item.TV_ID = (Guid)(rd["TVDV_TV_ID"]);
            }
            if (rd.FieldExists("TVDV_DV_ID"))
            {
                Item.DV_ID = (Guid)(rd["TVDV_DV_ID"]);
            }
            if (rd.FieldExists("TVDV_NgayTao"))
            {
                Item.NgayTao = (DateTime)(rd["TVDV_NgayTao"]);
            }
            if (rd.FieldExists("TVDV_NguoiTao"))
            {
                Item.NguoiTao = (String)(rd["TVDV_NguoiTao"]);
            }
            if (rd.FieldExists("TVDV_Ma"))
            {
                Item.Ma = (String)(rd["TVDV_Ma"]);
            }
            if (rd.FieldExists("TVDV_Gia"))
            {
                Item.Gia = (Double)(rd["TVDV_Gia"]);
            }
            if (rd.FieldExists("TVDV_GhiChu"))
            {
                Item.GhiChu = (String)(rd["TVDV_GhiChu"]);
            }
            if (rd.FieldExists("TVDV_SoLan"))
            {
                Item.SoLan = (Int32)(rd["TVDV_SoLan"]);
            }
            if (rd.FieldExists("TVDV_ThanhToan"))
            {
                Item.ThanhToan = (Double)(rd["TVDV_ThanhToan"]);
            }
            if (rd.FieldExists("TVDV_ConNo"))
            {
                Item.ConNo = (Double)(rd["TVDV_ConNo"]);
            }
            if (rd.FieldExists("TVDV_NgayLap"))
            {
                Item.NgayLap = (DateTime)(rd["TVDV_NgayLap"]);
            }
            if (rd.FieldExists("TVDV_BaoHanh_ID"))
            {
                Item.BaoHanh_ID = (Guid)(rd["TVDV_BaoHanh_ID"]);
            }
            if (rd.FieldExists("BaoHanh_Ten"))
            {
                Item.BaoHanh_Ten = (String)(rd["BaoHanh_Ten"]);
            }
            if (rd.FieldExists("KHO_Ten"))
            {
                Item.KHO_Ten = (String)(rd["KHO_Ten"]);
            }
            if (rd.FieldExists("TVDV_KHO_ID"))
            {
                Item.KHO_ID = (Guid)(rd["TVDV_KHO_ID"]);
            }
            if (rd.FieldExists("TVDV_CK"))
            {
                Item.CK = (Double)(rd["TVDV_CK"]);
            }
            if (rd.FieldExists("TVDV_NhanVien"))
            {
                Item.NhanVien = (String)(rd["TVDV_NhanVien"]);
            }
            if (rd.FieldExists("TVDV_NhanVien_Ten"))
            {
                Item.NhanVien_Ten = (String)(rd["TVDV_NhanVien_Ten"]);
            }
            if (rd.FieldExists("TVDV_Loai"))
            {
                Item.Loai = (Int32)(rd["TVDV_Loai"]);
            }
            if (rd.FieldExists("TVDV_LoaiQuy"))
            {
                Item.LoaiQuy = (Int32)(rd["TVDV_LoaiQuy"]);
            }
            Item._KhachHang = KhachHangDal.getFromReader(rd);
            Item._DichVu    = DichVuDal.getFromReader(rd);
            Item._TuVan     = TuVanDal.getFromReader(rd);
            return(Item);
        }
コード例 #2
0
ファイル: TuVan.cs プロジェクト: nhatkycon/AoCuoiHongNhung
 public override BaseEntity getFromReader(IDataReader rd)
 {
     return(TuVanDal.getFromReader(rd));
 }
コード例 #3
0
ファイル: TuVan.cs プロジェクト: nhatkycon/AoCuoiHongNhung
 public void del(string id)
 {
     TuVanDal.DeleteById(new Guid(id));
 }
コード例 #4
0
ファイル: TuVan.cs プロジェクト: nhatkycon/AoCuoiHongNhung
 public BaseObject get(string id)
 {
     return(TuVanDal.SelectById(new Guid(id)));
 }