public void Create(ESOP_Publish ESOP_Publish) { ESOP_Publish.CreateDt = DateTime.Now; tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User; ESOP_Publish.CreateUser = tempUser.UserName; ESOP_Publish.Validate(); this.publishRepository.Add(ESOP_Publish); this.runtimeService.Commit(); }
public void Update(ESOP_Publish ESOP_Product) { ESOP_Product.ModifyDt = DateTime.Now; tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User; ESOP_Product.ModifyUser = tempUser.UserName; ESOP_Product.Validate(); var existstb_Sys_Menu = this.GetById(ESOP_Product.Id); this.publishRepository.SetValues(ESOP_Product, existstb_Sys_Menu); this.runtimeService.Commit(); }
public void Save(ESOP_Publish product) { tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User; var existsdevice = this.GetById(product.Id); if (existsdevice == null) { product.CompCode = tempUser.CompCode; product.CreateDt = DateTime.Now; product.CreateUser = tempUser.UserName; product.Validate(); this.publishRepository.Add(product); } else { product.ModifyDt = DateTime.Now; product.ModifyUser = tempUser.UserName; product.Validate(); this.publishRepository.SetValues(product, existsdevice); } this.runtimeService.Commit(); }