Пример #1
0
        public async Task <ApiResult> LoadFormAsync(int Id)
        {
            int          ActId = Id;
            var          res   = new Dictionary <string, object>();
            Fct_Activity Model = await dapper.GetByIDAsync <Fct_Activity>(Id);

            res[nameof(ActId)] = ActId;
            res[nameof(Model)] = Model.ToNewByNull();
            return(new ApiResult(StatusCodeEnum.成功, "", res));
        }
        /// <summary>
        /// 加载表单 数据
        /// </summary>
        /// <param name="ActId"></param>
        /// <returns></returns>
        public async Task <Dictionary <string, object> > LoadFormAsync(int ActId)
        {
            var res = new Dictionary <string, object>();

            //var Model = await this.FindByIdAsync(ActId);


            var Model = await dapper.GetByIDAsync <Fct_Activity>(ActId);

            //var User = await userDb.FindByIdAsync(Model?.ActId);

            res[nameof(ActId)] = ActId;
            res[nameof(Model)] = Model.ToNewByNull();
            //res[nameof(User)] = User.ToNewByNull();

            return(res);
        }