public static XuatNhapChiTiet getFromReader(IDataReader rd)
        {
            var Item = new XuatNhapChiTiet();

            if (rd.FieldExists("XNCT_ID"))
            {
                Item.ID = (Guid)(rd["XNCT_ID"]);
            }
            if (rd.FieldExists("XNCT_XN_ID"))
            {
                Item.XN_ID = (Guid)(rd["XNCT_XN_ID"]);
            }
            if (rd.FieldExists("XNCT_HH_ID"))
            {
                Item.HH_ID = (Guid)(rd["XNCT_HH_ID"]);
            }
            if (rd.FieldExists("XNCT_DV_ID"))
            {
                Item.DV_ID = (Guid)(rd["XNCT_DV_ID"]);
            }
            if (rd.FieldExists("XNCT_SoLuong"))
            {
                Item.SoLuong = (Double)(rd["XNCT_SoLuong"]);
            }
            if (rd.FieldExists("XNCT_DonGia"))
            {
                Item.DonGia = (Double)(rd["XNCT_DonGia"]);
            }
            if (rd.FieldExists("XNCT_Tong"))
            {
                Item.Tong = (Double)(rd["XNCT_Tong"]);
            }
            if (rd.FieldExists("XNCT_VAT"))
            {
                Item.VAT = (Double)(rd["XNCT_VAT"]);
            }
            if (rd.FieldExists("XNCT_CKTyLe"))
            {
                Item.CKTyLe = (Double)(rd["XNCT_CKTyLe"]);
            }
            if (rd.FieldExists("XNCT_CKTien"))
            {
                Item.CKTien = (Double)(rd["XNCT_CKTien"]);
            }
            if (rd.FieldExists("XNCT_NgayTao"))
            {
                Item.NgayTao = (DateTime)(rd["XNCT_NgayTao"]);
            }
            if (rd.FieldExists("XNCT_NguoiTao"))
            {
                Item.NguoiTao = (String)(rd["XNCT_NguoiTao"]);
            }
            if (rd.FieldExists("XNCT_NgayCapNhat"))
            {
                Item.NgayCapNhat = (DateTime)(rd["XNCT_NgayCapNhat"]);
            }
            if (rd.FieldExists("XNCT_NguoiCapNhat"))
            {
                Item.NguoiCapNhat = (String)(rd["XNCT_NguoiCapNhat"]);
            }
            if (rd.FieldExists("XNCT_GhiChu"))
            {
                Item.GhiChu = (String)(rd["XNCT_GhiChu"]);
            }
            if (rd.FieldExists("XNCT_Draff"))
            {
                Item.Draff = (Boolean)(rd["XNCT_Draff"]);
            }
            if (rd.FieldExists("XNCT_DraffDate"))
            {
                Item.DraffDate = (DateTime)(rd["XNCT_DraffDate"]);
            }
            if (rd.FieldExists("HH_Ten"))
            {
                Item.HH_Ten = (String)(rd["HH_Ten"]);
            }
            if (rd.FieldExists("DV_Ten"))
            {
                Item.DV_Ten = (String)(rd["DV_Ten"]);
            }
            if (rd.FieldExists("XNCT_KH_ID"))
            {
                Item.KH_ID = (Guid)(rd["XNCT_KH_ID"]);
            }
            if (rd.FieldExists("KH_Ten"))
            {
                Item.KH_Ten = (String)(rd["KH_Ten"]);
            }
            if (rd.FieldExists("HH_Ma"))
            {
                Item.HH_Ma = (String)(rd["HH_Ma"]);
            }
            Item._XuatNhap = XuatNhapDal.getFromReader(rd);
            Item._HangHoa  = HangHoaDal.getFromReader(rd);
            return(Item);
        }
示例#2
0
 public override BaseEntity getFromReader(IDataReader rd)
 {
     return(XuatNhapDal.getFromReader(rd));
 }