WPF Login system with SQLite using C#

  Рет қаралды 25,528

Tactic Devs

Tactic Devs

Күн бұрын

Пікірлер: 63
@bradh6207
@bradh6207 2 жыл бұрын
Legend, this solved all the problems i was having using mysql
@fooballers7883
@fooballers7883 Жыл бұрын
After few changes ... got it to work... Excellent. tutorial. Thank you
@jassielove8538
@jassielove8538 9 ай бұрын
You are amazing! Thank you ❤
@MadhuraD-s8w
@MadhuraD-s8w 5 ай бұрын
Thank you!
@Ddos2212
@Ddos2212 21 күн бұрын
Thank you, you are amazing
@nushanhansana1873
@nushanhansana1873 Жыл бұрын
Thank you for the video, explained very well!
@feeeliks2910
@feeeliks2910 2 жыл бұрын
Thank you for the video, explained very well!!
@tristy7364
@tristy7364 2 жыл бұрын
This tutorial is so great, is there a way to make the input not case sensitive?
@davidcurtis6429
@davidcurtis6429 Жыл бұрын
String.ToLower();
@AmirRobo
@AmirRobo 5 ай бұрын
wow. it's cool
@veloxdev
@veloxdev 2 жыл бұрын
can someone pls help me? at 14:09 i get an error when doing "var Password = PasswordText.Password;" it says 'Textbox' does not contain a definition of 'Password'
@TacticDevs
@TacticDevs 2 жыл бұрын
Make sure you use a “password textbox” control in the ui because the two types of textbox
@veloxdev
@veloxdev 2 жыл бұрын
@@TacticDevs huh
@TacticDevs
@TacticDevs 2 жыл бұрын
@@veloxdev In the UI there are two textbox controls defined one is for the username and the other one is for the password,just be sure that the text box for the password is a (password textbox), The reason it’s giving you the error is probably because you are using a normal textbox instead of a password textbox. WPF has two types of textbox ,(Textbox)and (PasswordTextBox)
@veloxdev
@veloxdev 2 жыл бұрын
@@TacticDevs tysm, Im kinda new to this...
@tristy7364
@tristy7364 2 жыл бұрын
I am using the .NET 5.0 framework and the OnStartup method isn't avaliable anymore, what can I do?
@tristy7364
@tristy7364 2 жыл бұрын
Also, what Framework is the project in this video running on?
@TacticDevs
@TacticDevs 2 жыл бұрын
The Onstartup method has to be overridden , you can type override in the App.xaml.cs class it will show up some suggestions of methods, check this part of the video 9:14
@TacticDevs
@TacticDevs 2 жыл бұрын
The Onstartup method has to be overridden , you can type override in the App.xaml.cs class it will show up some suggestions of methods
@tristy7364
@tristy7364 2 жыл бұрын
@@TacticDevs for me it is 'MainWindow.xaml.cs' class, I did some research and think the OnStartUp method is only supported by 4.0 framework, but I changed from the 4.0 framework to the 5.0 because one of the nuget packages doesn't support 4.0 framework, suggestions?
@TacticDevs
@TacticDevs 2 жыл бұрын
@@tristy7364 I used .net5 for this project ,the OnStartUp method is still supported(shorturl.at/lsuT0) it is part of the App or Application Class which mean you can only override it inside the App class (App.xaml.cs) not MainWindow , in your project there is a file named App.xaml click the expander next to it, it will reveal the (App.xaml.cs) file open that file to add the OnStartup Method
@AshwiniPatil-r8g2x
@AshwiniPatil-r8g2x Жыл бұрын
I am getting user not found, I already stored username and userpassword to SQLite table, but getting same issue.
@TacticDevs
@TacticDevs Жыл бұрын
try using a the (DB Browser for SQLite) software to verify if the user is in the database , also make sure the save changes method called each time you add a user this will ensure the user is saved
@Makku293
@Makku293 3 жыл бұрын
Which provider should I use on EF6? I'm trying to link through a connection string (App.Config) an EDM to an SQLite database?
@TacticDevs
@TacticDevs 3 жыл бұрын
You can try System.Data.SQLite.EF6
@tristy7364
@tristy7364 2 жыл бұрын
Is there a way to save the user ID into a variable?
@TacticDevs
@TacticDevs 2 жыл бұрын
Yes you can save it to variable however in this case the user the ID is auto generated by the database this is because we set the ID property to a primary key this prevents duplicates,however you can define your own user ID but just make sure they’re all different you can use a hashing function to do that ,
@tristy7364
@tristy7364 2 жыл бұрын
@@TacticDevs I want to save it so a variable so that it acts as a foreign key in another table, in order to do that I need to save the user ID with the input
@chanchan8406
@chanchan8406 2 жыл бұрын
hi i have an error in da.Fill(dt); what should i do?
@990stars
@990stars 2 жыл бұрын
how would you pass the successfully logged in user Object to the MainWindow ? without complicating things
@TacticDevs
@TacticDevs 2 жыл бұрын
You can write an extra constructor on the MainWindow class to take in a parameter which in this case is the user, then every time you login successfully and want to open the main window you can pass that object through the constructor. The other way is you can create a static instance of the user class that you can access throughout the application
@goccle2952
@goccle2952 Жыл бұрын
So i really want to make when i have added the user to the database when he login one time he doesn't have to login again "only one time window" i mean
@goccle2952
@goccle2952 Жыл бұрын
Only time window but if he logged in in the first time
@TacticDevs
@TacticDevs Жыл бұрын
Look at 2:10
@nyendwa
@nyendwa Жыл бұрын
Can we continute this tutorial? Dude you are a good tutor
@jerichosantonia6412
@jerichosantonia6412 2 жыл бұрын
thank you so much!
@coldhell738
@coldhell738 2 жыл бұрын
I did everything identical to yours, but every time it says "User not found". What could be the problem?
@TacticDevs
@TacticDevs 2 жыл бұрын
You have to manually add the user and once you add a user make sure you save the changes to the database
@coldhell738
@coldhell738 2 жыл бұрын
@@TacticDevs Thanks for the answer. But I added as many as two users, there are no errors in the code, but every time "User not found" :(
@coldhell738
@coldhell738 2 жыл бұрын
I solved the problem! Thanks again
@TacticDevs
@TacticDevs 2 жыл бұрын
@@coldhell738 awesome
@zergzerg4844
@zergzerg4844 3 жыл бұрын
Why your object MainPage main have method ""SHOW" but my haven't ? Do I need to install some library?
@TacticDevs
@TacticDevs 3 жыл бұрын
No I did not install any libraryThe main page is a “window class” the window class has a method called show,make sure you’re calling the method on the right object(windows object ) And you need to create an instance before you can call the show method
@TacticDevs
@TacticDevs 3 жыл бұрын
@@zergzerg4844 No that’s not a problem I also use .NET5
@TacticDevs
@TacticDevs 3 жыл бұрын
@@zergzerg4844 Before you can use the method you need to create an instance (new object )of the window class. Example “MainWindow mywindow = new MainWindow()" then “mywindow.Show();”
@gernothartung
@gernothartung 2 жыл бұрын
Great stuff, thanks a lot! Thumb is up and channel subscribed Allow me to ask: How to prevent users from simply reading the db file and get all the usernames and passwords? I mean sqlite dbs are mainly for local use, or am i wrong?
@TacticDevs
@TacticDevs 2 жыл бұрын
Hi welcome, check out this video ( kzbin.info/www/bejne/kJO4dJqLaKxksJY ) were I explain how to encrypt passwords before storing them to a database, this resolves the problem you just mentioned
@gernothartung
@gernothartung 2 жыл бұрын
@@TacticDevs Thank you sir! I just finnished watching that video... great Channel
@TacticDevs
@TacticDevs 2 жыл бұрын
@@gernothartung That’s good to hear I’m glad it helped
@classicsracingleague9441
@classicsracingleague9441 Жыл бұрын
Best practice is to prepend a 6-8 random salt to the password, then hash it to MD5. When writing your the DB, only the salt and hashed password are stored. Now, when the using enters his/her password, the salt is taken from the database and prepended to the password which is once again hashed to MD5. If both hashes match, let the user in. This way the actual password is never stored in the database
@black_sauce2478
@black_sauce2478 Жыл бұрын
All in one video
@sergsergesrgergseg
@sergsergesrgergseg 3 жыл бұрын
what use is this.. defeats the entire purpose of a login
@SigneTrance
@SigneTrance 3 жыл бұрын
Great tutorial. But... How to make a username from the dropdown list instead of login textbox?
@TacticDevs
@TacticDevs 3 жыл бұрын
Do you mean displaying previously used names in a drop-down list
@SigneTrance
@SigneTrance 3 жыл бұрын
@@TacticDevs yes. Usernames from db displaying as dropdown list + pin code / pass as passwordbox.
@TacticDevs
@TacticDevs 3 жыл бұрын
it's not ideal to display user names and passwords in a drop-down list for security reasons however you can cache previously entered information this can be done by storing the usernames to a json file I will make a tutorial on how to do it
@SigneTrance
@SigneTrance 3 жыл бұрын
@@TacticDevs I mean... Display only usernames as dropdown list... Passwords will be hidden. Its app for local users.
@sivasothytharsi1203
@sivasothytharsi1203 Жыл бұрын
how to bind those username and password? could you please tell me?
@TacticDevs
@TacticDevs Жыл бұрын
You use the data context property to pass the the user object to the ui , Once the object is available in the UI you can then simply bind the text property to the username and password, WPF will automatically bind to the password and username because you passed the object using the data context property which is found on the window that is holding the Ui
@sivasothytharsi1203
@sivasothytharsi1203 Жыл бұрын
@@TacticDevs thank you sir. sir how to use mvvm format to do a student registration system? could you please help me?
C# CRUD Operations With SQLite Database Using Entity Framework
40:05
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
How to Create Login Screen in Wpf with Sql DataBase
18:27
CodAffection
Рет қаралды 150 М.
Register & Login Form (with authentication) using C# | Cloud Firestore DB
26:44
The Amazing Codeverse
Рет қаралды 11 М.
The Basics of Data Binding in WPF
20:53
Tactic Devs
Рет қаралды 51 М.
Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF
28:34
Decomplexify
Рет қаралды 2,2 МЛН
you need to learn SQL RIGHT NOW!! (SQL Tutorial for Beginners)
24:25
NetworkChuck
Рет қаралды 1,6 МЛН
WPF UI/ Design a Modern Login Form/ Introducing to WPF
25:00
RJ Code Advance EN
Рет қаралды 145 М.
WPF in C# with MVVM using Caliburn Micro
1:23:30
IAmTimCorey
Рет қаралды 368 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН