Exemplo n.º 1
0
        public async Task <IHttpActionResult> Update(params DeviceServerInfoInputDto[] inputDto)
        {
            //修改人员、时间
            inputDto?.ToList().ForEach((a) =>
            {
                a.LastUpdatedTime   = DateTime.Now;
                a.LastUpdatorUserId = User.Identity.Name;
            });
            var result = await DeviceServerInfoConract.EditDeviceServerInfos(inputDto);

            return(Json(result));
        }
Exemplo n.º 2
0
        public async Task <IHttpActionResult> Add(params DeviceServerInfoInputDto[] dtos)
        {
            //创建和修改的人员、时间
            dtos?.ToList().ForEach((a) =>
            {
                a.Id                = CombHelper.NewComb();
                a.CreatorUserId     = User.Identity.Name;
                a.CreatedTime       = DateTime.Now;
                a.LastUpdatedTime   = a.CreatedTime;
                a.LastUpdatorUserId = a.CreatorUserId;
            });
            var result = await DeviceServerInfoConract.AddDeviceServerInfos(dtos);

            return(Json(result));
        }
Exemplo n.º 3
0
        public async Task <IHttpActionResult> Remove(params Guid[] ids)
        {
            var result = await DeviceServerInfoConract.DeleteDeviceServerInfos(ids);

            return(Json(result));
        }