Exemplo n.º 1
0
 //猪舍类型
 public bool PigHouseRfidCompareByType(long typeid, int number)
 {
     var pigHouseService = new PigHouseService();
     return pigHouseService.FindByPigHouseTypeId(typeid).All(c => c.Number != number);
 }
Exemplo n.º 2
0
 //猪舍编号
 public bool PigHouseNumberCompare(int number, long housetypeid)
 {
     var pigHouseService = new PigHouseService();
     List<pig_house> pigHouses = pigHouseService.FindByPigHouseTypeId(housetypeid);
     int flag = 1;
     foreach (pig_house pigHouse in pigHouses)
     {
         if (pigHouse.Number == number)
         {
             flag = 0;
         }
     }
     if (flag == 0)
     {
         return false;
     }
     return true;
 }