Beispiel #1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            var    context = new OLXDataContext();
            string email   = tboxEmail.Text;
            string hash    = Program.makeHash(tboxPassword.Text);

            if (LoginPageTRANSACTION(email, hash) == true)
            {
                MessageBox.Show("Esti logat!");
                Program.OLXusername = email;

                if (actiune == "ADD")
                {
                    AddAnunt a = new AddAnunt();
                    a.Show();
                }
                if (actiune == "FAV")
                {
                    context.spAddToFavorite(Program.OLXusername, anunt);
                }
                if (actiune == "CHAT")
                {
                    CasutaChat c = new CasutaChat(Program.OLXusername, corespondent);
                    c.Show();
                }

                this.Close();
                OLX.MainPage.load_LogOutButton();
            }
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var context = new OLXDataContext();
            var result  = from u in context.DB_USERs
                          where u.ID == Program.OLXusername
                          select u.ID;
            List <string> t = new List <string>();

            foreach (var item in result)
            {
                t.Add(item.ToString());
            }
            if (t.Count != 0)//e in DB_USERS
            {
                if (USER == Program.OLXusername)
                {
                    ListaConversatii list = new ListaConversatii();
                    list.Show();
                }
                else
                {
                    CasutaChat chat = new CasutaChat(Program.OLXusername, USER);
                    chat.Show();
                }
            }
            else
            {
                Login log = new Login("CHAT", USER);
                log.Show();
            }
        }
Beispiel #3
0
        private void buttonConversatie_Click(object sender, EventArgs e)
        {
            Button button = (Button)sender;

            CHATselectat = button.Text;
            CasutaChat chat = new CasutaChat(Program.OLXusername, CHATselectat);

            chat.Show();
        }