Example #1
0
        public UserTenantView Any(UpdateUserTenant request)
        {
            var res = Repository.UpdateTenantUsers(request);  // specialita: UPDATE D_Tenant_Id

            //Repository.GrantUserPermToDms(request.D_Tenant_Id);
            RefreshSessionAndClearCache(request.D_User_Id);
            return(res);
        }
        // specialita: framework nedokaze spravit UPDATE D_Tenant_ID
        public UserTenantView UpdateTenantUsers(UpdateUserTenant request)
        {
            var rec = Db.SingleById <UserTenant>(request.D_UserTenant_Id);

            request.UpdateEntity(rec);
            rec.DatumZmeny = DateTime.Now;
            rec.Zmenil     = Session.UserIdGuid;
            Db.Update(rec);
            return(GetById <UserTenantView>(request.D_UserTenant_Id));
        }