StoreHouseUtil.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using Library;
  2. using MySystem.Service.Main;
  3. using System;
  4. using System.Collections.Generic;
  5. namespace MySystem
  6. {
  7. /// <summary>
  8. /// 仓库工具类
  9. /// </summary>
  10. public class StoreHouseUtil
  11. {
  12. #region 修改仓库库存(仓库出货)
  13. /// <summary>
  14. /// 修改仓库库存(仓库出货)
  15. /// </summary>
  16. /// <param name="StoreId">仓库Id</param>
  17. /// <param name="LaveNum">剩余库存数</param>
  18. /// <param name="OutNum">出货数</param>
  19. public static void EditStoreStock(int StoreId, int LaveNum, int OutNum)
  20. {
  21. Dictionary<string, object> storeData = new Dictionary<string, object>();
  22. storeData.Add("LaveNum", LaveNum -= 1);
  23. storeData.Add("OutNum", OutNum += 1);
  24. StoreHouseService.Edit(storeData, StoreId);
  25. }
  26. #endregion
  27. #region 修改仓库剩余库存数
  28. /// <summary>
  29. /// 修改仓库剩余库存数
  30. /// </summary>
  31. /// <param name="StoreId">仓库Id</param>
  32. /// <param name="LaveNum">剩余库存数</param>
  33. public static void EditStoreLaveNum(int StoreId, int LaveNum)
  34. {
  35. Dictionary<string, object> storeData = new Dictionary<string, object>();
  36. storeData.Add("LaveNum", LaveNum);
  37. StoreHouseService.Edit(storeData, StoreId);
  38. }
  39. #endregion
  40. }
  41. }