public Form1() { InitializeComponent(); ShopEntities shop = new ShopEntities(); Magazin magazin = new Magazin(); magazin.Show(); }
public int getUserID_Vanzatordb() { ShopEntities shop = new ShopEntities(); Form1 form1 = new Form1(); string emailUser = Form1.emailAdress; var getinformation = shop.Users.Where(a => a.Email == emailUser).FirstOrDefault(); int userID_Vanzatordb = getinformation.UserId; return(userID_Vanzatordb); }
private void info_user_Click(object sender, EventArgs e) { List <User> users = new List <User>(); users = UserController.GetUsers().ToList(); UserInfo info = new UserInfo(); ShopEntities shop = new ShopEntities(); string numeUser = viewUsersLIst.GetItemText(viewUsersLIst.SelectedItem).ToString(); var getinformation = shop.Users.Where(a => a.NumePrenume == numeUser).FirstOrDefault(); info.returnEmail().Text = getinformation.Email; info.returnAdresa().Text = getinformation.Adresa; info.returnNickname().Text = getinformation.Nickname; info.returnTelfon().Text = getinformation.Telefon; info.returnName().Text = "Informatii utilizator :" + getinformation.NumePrenume; info.Show(); }