private void PicClose_Click(object sender, EventArgs e) { _00_Databases._01_LIFSAcademyDataContext LFAD = new _00_Databases._01_LIFSAcademyDataContext(); _00_Databases.LIFSLOGIN User2 = LFAD.LIFSLOGIN.First(s => s.USERDID == Convert.ToInt32(_02_Forms._02_LoginForm.UserInfo[0])); User2.ONLINESTATUS = 0; LFAD.SubmitChanges(); Application.Exit(); }
private void SignInBtn_Click_1(object sender, EventArgs e) { UserName = TextUserName.text; Password = TextPassword.text; _00_Databases._01_LIFSAcademyDataContext LFAD = new _00_Databases._01_LIFSAcademyDataContext(); var User = LFAD.LIFSLOGIN.Where((w => w.USERNAME == UserName && w.PASSWORD == Password)).FirstOrDefault(); if (User == null) { MessageBox.Show("Olmadı"); } else if (UserName == User.USERNAME && Password == User.PASSWORD) { _03_MainForm MF = new _03_MainForm(); UserInfo[0] = User.USERDID.ToString(); UserInfo[1] = User.USERNAME.ToString(); UserInfo[2] = User.PASSWORD.ToString(); UserInfo[3] = User.AUTHORITY.ToString(); UserInfo[4] = User.PROFIL.ToString(); UserInfo[5] = User.NAME.ToString(); UserInfo[6] = User.LASTNAME.ToString(); _00_Databases.LIFSLOGIN User2 = LFAD.LIFSLOGIN.First(s => s.USERDID == Convert.ToInt32(UserInfo[0])); User2.ONLINESTATUS = 1; LFAD.SubmitChanges(); UserInfo[7] = User.ONLINESTATUS.ToString(); UserInfo[8] = User.USERAKA; this.Hide(); MF.Show(); } }