Beispiel #1
0
 public static ValidateMsg<Trays> TrayCanPrint(string trayId)
 {
     using (IUnitOfWork unit = MSSqlHelper.DataContext())
     {
         ValidateMsg<Trays> msg = new ValidateMsg<Trays>() { Valid = false };
         ITraysRep tr = new TraysRep(unit);
         Trays t = tr.GetSingleById(trayId);
         if (t == null)
             msg.Message.Add("托盘标签:"+trayId+" 错误!");
         else
             msg.Valid = true;
         return msg;
     }
 }
 public List<SinglePackage> TraySPDetail(string trayId)
 {
     using (IUnitOfWork unit = MSSqlHelper.DataContext())
     {
         try
         {
             ITraysRep tr = new TraysRep(unit);
             Trays t = tr.GetSingleById(trayId);
             if (t == null)
                 return null;
             ITrayItemRep tir = new TrayItemRep(unit);
             return tir.GetSPByTrayId(trayId);
         }
         catch
         {
             return null;
         }
     }
 }