Ejemplo n.º 1
0
 public static int SaveStoreAttachment(List <StoreAttachment> attas)
 {
     if (attas.Count <= 0)
     {
         return(0);
     }
     using (var trans = TransactionManager.Create())
     {
         //StoreDA.DeleteAttachmentBySellerSysNo(attas[0].SellerSysNo.Value);
         foreach (var item in attas)
         {
             if (item.SysNo.HasValue)
             {
                 //TODO update
                 StoreDA.UpdateStoreAttachment(item);
             }
             else
             {
                 StoreDA.InsertStoreAttachment(item);
             }
         }
         trans.Complete();
     }
     return(1);
 }