예제 #1
0
        public virtual ActionResult Delete()
        {
            IList <Guid>    ids = SuHuiRequest.GetGuids("ids");
            OperationResult or  = Test3Service.Delete(c => ids.Contains(c.Id));

            return(this.JsonFormat(or));
        }
예제 #2
0
        public virtual ActionResult Add(Test3 entity)
        {
            OperationResult or     = new OperationResult(OperationResultType.Error);
            Guid            flowId = SuHuiRequest.GetGuid("flowId");

            if (flowId.IsNullOrEmpty())
            {
                or = Test3Service.Insert(entity);
            }
            else
            {
                User user = new User();
                user.Id = "00000000-0000-0000-0001-000000000001".GetGuid();
                or      = Test3Service.Insert(entity, false);
                or      = WFRunInstanceService.Execute(entity.Id.ToString(), flowId, user);
            }
            return(this.JsonFormat(or));
        }
예제 #3
0
        public virtual ActionResult Update(Test3 entity)
        {
            OperationResult or = Test3Service.Update(entity);

            return(this.JsonFormat(or));
        }