private void Loginbutton1_Click(object sender, EventArgs e) { //SqlConnection con = new SqlConnection(); //con.ConnectionString = "Data Source=.;Initial Catalog=ManaDigital;Integrated Security=true"; //con.Open(); string userid = UserbunifuMaterialTextbox1.Text; string password = PassbunifuMaterialTextbox2.Text; //SqlCommand cmd = new SqlCommand($"select [user], [password] from [Logins] where [user] = '{UserbunifuMaterialTextbox1.Text}' and [password] = '{PassbunifuMaterialTextbox2.Text}';", con); //SqlDataAdapter da = new SqlDataAdapter(cmd); //DataTable dt = new DataTable(); //da.Fill(dt); var result = new userLogic().login(userid, password); if (result) { SuccessLoginForm SLF = new SuccessLoginForm(); DashboardForm df1 = new DashboardForm(); SLF.Show(); this.Hide(); } else { FialLoginForm flf = new FialLoginForm(); flf.Show(); } // con.Close(); }
public LoginScreen() { InitializeComponent(); myUserLogic = new userLogic(); user = new UserModel(); }