1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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 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;
- }
- }
- }
|