private void btnCreateLogin_Click(object sender, EventArgs e) { DataClasses1DataContext context = new DataClasses1DataContext(); if (context.USERs.Any(c => c.User_ID == txtUserName.Text && c.User_ID == txtPassword.Text)) { Id = context.USERs.Where(c => c.UserName_Email == txtUserName.Text && c.User_ID == txtPassword.Text) .Select(c => Convert.ToInt16(c.User_ID)).First(); //bring user to next page Purchase prod = new Purchase(); prod.Show(); } else { MessageBox.Show("No Such Login"); Create_Login accnt = new Create_Login(); accnt.Show(); } }
private void Itembutton_Click(object sender, EventArgs e) { Form frm = new Create_Login(); frm.Show(); }