Example #1
0
 public static List<string> GetNamesOfSpreadsheetsForUser(AspNetUsers user)
 {
     List<string> NamesOfSpreadsheetsList = new List<string>();
     NamesOfSpreadsheetsList = spreadsheetsRepository.FindAll(s => s.AdministratorId_Id == user.Id).Select(t => t.Name).ToList();
       if(NamesOfSpreadsheetsList != null && NamesOfSpreadsheetsList.Count>0)
       {
           return NamesOfSpreadsheetsList;
       }
     return null;
 }
Example #2
0
 public static List<long> GetIdsOfSpreadsheetsForUser(AspNetUsers user)
 {
     List<long> IdsOfSpreadsheetsList = new List<long>();
     IdsOfSpreadsheetsList = spreadsheetsRepository.FindAll(s => s.AdministratorId_Id == user.Id).Select(t => t.Id).ToList();
     if (IdsOfSpreadsheetsList != null && IdsOfSpreadsheetsList.Count > 0)
     {
         return IdsOfSpreadsheetsList;
     }
     return null;
 }
Example #3
0
        public static List<AspNetUsers> GetAllRedactors(AspNetUsers user)
        {
            List<AspNetUsers> Allredactors = new List<AspNetUsers>();
            var redactorsListFromTableRedactors = RedactorsRepository.FindAll(r => r.Administrator_Id == user.Id).GroupBy(a => a.UserId_Id).Select(g => g.First()).OrderBy(i => i.UserId_Id).ToList();

            if (redactorsListFromTableRedactors != null)
            {
                foreach (var redactor in redactorsListFromTableRedactors)
                {
                    Allredactors.Add(UsersRepository.Find(u => u.Id == redactor.UserId_Id));
                }
                return Allredactors.OrderBy(u => u.Email).ToList();
            }
            else
                return null;
        }
Example #4
0
 partial void DeleteAspNetUsers(AspNetUsers instance);
Example #5
0
 partial void UpdateAspNetUsers(AspNetUsers instance);
Example #6
0
 partial void InsertAspNetUsers(AspNetUsers instance);