Ejemplo n.º 1
0
 public static AscmDeliveryOrderMainService GetInstance()
 {
     //return ascmDeliveryOrderMainServices ?? new AscmDeliveryOrderMainService();
     if (ascmDeliveryOrderMainServices == null)
         ascmDeliveryOrderMainServices = new AscmDeliveryOrderMainService();
     return ascmDeliveryOrderMainServices;
 }
 public void SetMain(List <AscmDeliveryOrderDetail> list)
 {
     if (list != null && list.Count > 0)
     {
         string ids = string.Empty;
         foreach (AscmDeliveryOrderDetail ascmDeliveryOrderDetail in list)
         {
             if (!string.IsNullOrEmpty(ids))
             {
                 ids += ",";
             }
             ids += "" + ascmDeliveryOrderDetail.mainId + "";
         }
         string sql = "from AscmDeliveryOrderMain where id in (" + ids + ")";
         IList <AscmDeliveryOrderMain> ilistAscmDeliveryOrderMain = YnDaoHelper.GetInstance().nHibernateHelper.Find <AscmDeliveryOrderMain>(sql);
         if (ilistAscmDeliveryOrderMain != null && ilistAscmDeliveryOrderMain.Count > 0)
         {
             List <AscmDeliveryOrderMain> listAscmDeliveryOrderMain = YnBaseClass2.Helper.ConvertHelper.ConvertIListToList <AscmDeliveryOrderMain>(ilistAscmDeliveryOrderMain);
             AscmDeliveryOrderMainService.GetInstance().SetSupplier(listAscmDeliveryOrderMain);
             AscmDeliveryOrderMainService.GetInstance().SetBatch(listAscmDeliveryOrderMain);
             AscmDeliveryOrderMainService.GetInstance().SetWipEntity(listAscmDeliveryOrderMain);
             foreach (AscmDeliveryOrderDetail ascmDeliveryOrderDetail in list)
             {
                 ascmDeliveryOrderDetail.ascmDeliveryOrderMain = listAscmDeliveryOrderMain.Find(e => e.id == ascmDeliveryOrderDetail.mainId);
             }
         }
     }
 }
Ejemplo n.º 3
0
 public static AscmDeliveryOrderMainService GetInstance()
 {
     //return ascmDeliveryOrderMainServices ?? new AscmDeliveryOrderMainService();
     if (ascmDeliveryOrderMainServices == null)
     {
         ascmDeliveryOrderMainServices = new AscmDeliveryOrderMainService();
     }
     return(ascmDeliveryOrderMainServices);
 }