1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using PP_Ven_MosS.ModelBase;
- using System;
- using System.Collections.Generic;
- using System.Data.Entity;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace PP_Ven_MosS.Classes
- {
- public class Events
- {
- public List<Event> eve;
- public Events()
- {
- eve = newevent();
- }
- public List<Event> newevent()
- {
- List<Event> events = new List<Event>();
- Event buff;
- List<Event> bdevent = Database.entities.Event.ToList();
- foreach (Event evn in bdevent)
- {
- buff = new Event();
- buff.Id_event = evn.Id_event;
- buff.Title_event = evn.Title_event;
- buff.Description_event = evn.Description_event;
- }
- return events;
- }
- public class Users
- {
- public List<User> usr;
- public Users()
- {
- usr = newuser();
- }
- public List<User> newuser()
- {
- List<User> users = new List<User>();
- User buff;
- List<User> bdusers = Database.entities.User.ToList();
- foreach (User user in bdusers)
- {
- buff = new User();
- buff.Id_user = user.Id_user;
- buff.Surname = user.Surname;
- buff.Name = user.Name;
- buff.Patronymic = user.Patronymic;
- buff.Post = user.Post;
- buff.Phone_number = user.Phone_number;
- buff.Login = user.Login;
- buff.Password = user.Password;
- users.Add(buff);
- }
- return users;
- }
- }
- }
- }
|