Ejemplo n.º 1
0
 public async Task<ResultUpdateOutput> DeletePermission(DeletePermissionInput input)
 {
     var result = new ResultUpdateOutput
                  {
         Status = 1
     };
     int test = await _permissionBll.DeletePermission(input.Ids);
     if (test > 0)
         result.Status = 0;
     return result;
 }
Ejemplo n.º 2
0
 public async Task<ResultUpdateOutput> CreatePermission(CreatePermissionInput input)
 {
     var result = new ResultUpdateOutput
                  {
         Status = 1
     };
     int test = await _permissionBll.InsertPermission(input);
     if (test > 0)
         result.Status = 0;
     return result;
 }
Ejemplo n.º 3
0
        public async Task<ResultUpdateOutput> DeleteRequestDevice(DeleteDeviceInput input)
        {
            var result = new ResultUpdateOutput
                         {
                             Status = 1
                         };
            try
            {
                int test = await _deviceBll.DeleteRequestDevice(input.Ids);
                if (test > 0)
                    result.Status = 0;
            }
            catch (Exception ex)
            {
                ErrorStore.LogExceptionWithoutContext(ex);
            }

            return result;
        }
Ejemplo n.º 4
0
 public async Task<ResultUpdateOutput> UpdateDevice(UpdateDeviceInput input)
 {
     var result = new ResultUpdateOutput
                  {
                      Status = 1
                  };
     try
     {
         if (string.IsNullOrEmpty(input.ClientId))
             input.ClientId = "MSoatVe";
         int test = await _deviceBll.UpdateDevice(input);
         if (test > 0)
             result.Status = 0;
     }
     catch (Exception ex)
     {
         ErrorStore.LogExceptionWithoutContext(ex);
     }
  
     return result;
 }
Ejemplo n.º 5
0
 public async Task<ResultUpdateOutput> UpdateGroupPermissions(UpdateGroupPermissionInput input)
 {
     var result = new ResultUpdateOutput
                  {
         Status = 1
     };
     int status = await _permissionBll.UpdateGroupPermissions(input);
     if (status > 0)
         result.Status = 0;
     return result;
 }
Ejemplo n.º 6
0
 public async Task<ResultUpdateOutput> UpdatePermissionGrants(UpdatePermissionGrantsInput input)
 {
     var result = new ResultUpdateOutput
                  {
         Status = 1
     };
     int test = await _permissionBll.UpdatePermissionGrants(input);
     if (test > 0)
         result.Status = 0;
     return result;
 }
Ejemplo n.º 7
0
 public Task<ResultUpdateOutput> UpdateUserApp(UpdateUserAppInput input, AppApiType appType)
 {
     Mapper.CreateMap<UpdateUserAppInput, UserApp>();
     UserApp userApp = Mapper.Map<UserApp>((object)input);
     userApp.ApiType = appType;
     ResultUpdateOutput result = new ResultUpdateOutput()
     {
         Status = 1
     };
     if (this._userTable.UpdateUserApp(userApp) > 0)
         result.Status = 0;
     return Task.FromResult<ResultUpdateOutput>(result);
 }