Пример #1
0
        public virtual ActionResult Delete()
        {
            IList <Guid>    ids = SuHuiRequest.GetGuids("ids");
            OperationResult or  = UDControllerService.Delete(c => ids.Contains(c.Id));

            return(this.JsonFormat(or));
        }
Пример #2
0
        /// <summary>
        /// 获取指定表的字段信息
        /// </summary>
        /// <returns>返回操作结果</returns>
        public virtual ActionResult GetAll()
        {
            Guid tableId = SuHuiRequest.GetGuid("tableId");
            IQueryable <DBColumn> items = DBColumnService.Entities.Where(c => c.TableId == tableId);
            OperationResult       or    = new OperationResult(OperationResultType.Success, string.Empty, items);

            return(this.JsonFormat(or));
        }
Пример #3
0
        public virtual ActionResult Add(Test2 entity)
        {
            OperationResult or     = new OperationResult(OperationResultType.Error);
            Guid            flowId = SuHuiRequest.GetGuid("flowId");

            if (flowId.IsNullOrEmpty())
            {
                or = Test2Service.Insert(entity);
            }
            else
            {
                User user = new User();
                user.Id = "00000000-0000-0000-0001-000000000001".GetGuid();
                or      = Test2Service.Insert(entity, false);
                or      = WFRunInstanceService.Execute(entity.Id.ToString(), flowId, user);
            }
            return(this.JsonFormat(or));
        }