示例#1
0
        public Form1()
        {
            InitializeComponent();
            ShopEntities shop    = new ShopEntities();
            Magazin      magazin = new Magazin();

            magazin.Show();
        }
示例#2
0
        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);
        }
示例#3
0
        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();
        }