コード例 #1
0
 public static VetCaseListInfo[] GetAll(VetCaseListInfo filter)
 {
     using (DbManagerProxy manager = DbManagerFactory.Factory.Create(EidssUserContext.Instance))
     {
         return(VetCaseListItem.Accessor.Instance(null)
                .SelectListT(manager, FilterAutoBuilder.BuildFilter(filter))
                .Select(
                    c => new VetCaseListInfo()
         {
             Id = c.idfCase,
             CaseID = c.strCaseID,
             CaseClassification = new BaseReferenceItem()
             {
                 Id = c.idfsCaseClassification, Name = c.CaseClassification != null ? c.CaseClassification.name : ""
             },
             ReportedDate = c.datReportDate,
             FarmName = c.strNationalName,
             FarmID = c.strFarmCode,
             FarmAddress = new AddressInfo()
             {
                 idfGeoLocation = c.idfAddress.Value,
                 Country = new BaseReferenceItem()
                 {
                     Id = c.idfsCountry, Name = c.Country != null ? c.Country.strCountryName : ""
                 },
                 Region = new BaseReferenceItem()
                 {
                     Id = c.idfsRegion, Name = c.Region != null ? c.Region.strRegionName : ""
                 },
                 Rayon = new BaseReferenceItem()
                 {
                     Id = c.idfsRayon, Name = c.Rayon != null ? c.Rayon.strRayonName : ""
                 },
                 Settlement = new BaseReferenceItem()
                 {
                     Id = c.idfsSettlement, Name = c.Settlement != null ? c.Settlement.strSettlementName : ""
                 }
             },
             TotalAnimals = c.intTotalAnimalQty,
             SickAnimals = c.intSickAnimalQty,
             DeadAnimals = c.intDeadAnimalQty,
             Diagnosis = new BaseReferenceItem()
             {
                 Id = c.idfsDiagnosis, Name = c.Diagnosis != null ? c.Diagnosis.name : ""
             }
         }).ToArray());
     }
 }
コード例 #2
0
 public VetCaseListInfo[] GetVetCaseList(VetCaseListInfo filter)
 {
     Check(PermissionHelper.SelectPermission(EIDSSPermissionObject.VetCase));
     return(VetCaseListInfo.GetAll(filter));
 }