コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
        }