示例#1
0
 public async Task <bool> IncreaseGoods(GoodsActorDto input)
 {
     try
     {
         instance.IncreaseGoods(input.StockNumber);
         if (input.SaveChanges)
         {
             await base.SaveAll(true);//异步保存
         }
         return(await Task.FromResult(true));
     }
     catch (Exception)
     {
         return(await Task.FromResult(false));
     }
 }
示例#2
0
 public async Task <bool> UpOrDownShelf(GoodsActorDto input)
 {
     try
     {
         instance.ChangeShelf(input.IsUpShelf);
         if (input.SaveChanges)
         {
             await base.SaveAll(true);//异步保存
         }
         return(await Task.FromResult(true));
     }
     catch (Exception)
     {
         return(await Task.FromResult(false));
     }
 }
示例#3
0
 public async Task <bool> UpdateBaseInfo(GoodsActorDto input)
 {
     try
     {
         instance.UpdateBaseInfo(input.Name, input.Price);
         if (input.SaveChanges)
         {
             await base.SaveAll(true);//异步保存
         }
         return(await Task.FromResult(true));
     }
     catch (Exception)
     {
         return(await Task.FromResult(false));
     }
 }
示例#4
0
 public async Task <bool> WithholdingGoodsStock(GoodsActorDto input)
 {
     try
     {
         if (!input.Rollback)
         {
             instance.SaleGoods(input.StockNumber);
         }
         else
         {
             instance.RollbackGoods(input.StockNumber);
         }
         if (input.SaveChanges)
         {
             await base.SaveAll(true);//异步保存
         }
         return(await Task.FromResult(true));
     }
     catch (Exception)
     {
         return(await Task.FromResult(false));
     }
 }