public void Create(WMS_C105_OutStoreDetail WMS_C105_OutStoreDetail) { WMS_C105_OutStoreDetail.CreateDt = DateTime.Now; tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User; WMS_C105_OutStoreDetail.CreateUser = tempUser.UserName; WMS_C105_OutStoreDetail.CompCode = tempUser.CompCode; WMS_C105_OutStoreDetail.Validate(); this.WMS_C105_OutStoreDetailRepository.Add(WMS_C105_OutStoreDetail); this.runtimeService.Commit(); }
public void MarkDeleteDetail(WMS_C105_OutStoreDetail outDetail) { var outStore = this.WMS_C104_OutStoreRepository.GetMany(i => i.Id == outDetail.OutStoreId).FirstOrDefault(); if (outStore != null && outStore.Status == "HasOutStore") { throw new AppException("此出库单已经出库,不允许删除"); } var existsTemp = this.outStoreDetailRepository.GetByID(outDetail.Id); this.outStoreDetailRepository.Delete(existsTemp); }
public void Update(WMS_C105_OutStoreDetail WMS_C105_OutStoreDetail) { WMS_C105_OutStoreDetail.ModifyDt = DateTime.Now; tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User; WMS_C105_OutStoreDetail.ModifyUser = tempUser.UserName; WMS_C105_OutStoreDetail.Validate(); var existstb_Sys_Menu = this.GetById(WMS_C105_OutStoreDetail.Id); this.WMS_C105_OutStoreDetailRepository.SetValues(WMS_C105_OutStoreDetail, existstb_Sys_Menu); this.runtimeService.Commit(); }