🔒 Closed C# Login Data patulong

Status
Not open for further replies.
Unique ID: 1 - id of your user

create a table. to save them.
Unique ID, Username, Time&Date etc.

how to connect?
Use the ID of ur username to retrieve them from another table and u have login logbook

format.
(Unique)User ID, Username, Password, Status, Remarks | (Unique) LogID, (Foreign ID)UserID, Username, Time , Date
 
[XX='PHC-Minchi, c: 1115376, m: 857057'][/XX] kunin mo lang yung username at password, then check mo if existing dun sa table mo, if existing, i log mo yung datetime value sa new table kung kailan sila nag login, which is yung sinabi ni idol sa taas :D
 
Umpisahan mo gumawa ng login.

Create a table for login.
User ID
Username
Password
Status
Remarks

Complete this with Graphical User Interface (GUI). Working GUI login connected to database.
(Don't sweat small details)
Proceed to make a working login so we can help u.
If you have build a code we can help you a lot faster than actually giving u theory.

Focus first on making a working login. Post ur working login code here.
we can revise it on the spot alot faster.

also avoid posting same threads.. ;)
 
private void btnlogin_Click(object sender, EventArgs e)
{
if (txtun.Text == "" || txtpw.Text == "")
{
MessageBox.Show("Provide Username and Password");
return;

}
try
{
SqlConnection con = new SqlConnection(mycon);
SqlDataAdapter sda = new SqlDataAdapter("Select utype from user_table where username like '" + txtun.Text + "' COLLATE SQL_Latin1_General_CP1_CS_AS and password like'" + txtpw.Text + "' COLLATE SQL_Latin1_General_CP1_CS_AS", con);
DataTable dt = new DataTable();
sda.Fill(dt);
if(dt.Rows.Count==1)
{
ut = dt.Rows[0][0].ToString();
if(ut=="ADMIN")
{
adminform FRM = new adminform();
FRM.Show();
this.Hide();
}
else if (ut=="CASHIER")
{
cashierform FRM = new cashierform();
FRM.Show();
this.Hide();
}
}
else
{
MessageBox.Show("Check Username and Password");
}

}
catch(Exception ex)
{

}

}
 
Ok naman. yung sunod naman gawin mo. pero this time. kukunin mo yung ID at isasave sa logbook na entry. with time and date.

Yung prev chat ko nandun. complete na yung logic mo. nanjan na din mga kailngan mo na codes same lng yan sila. imbis na retrieve save nlng. I re-retrive mo yung data the kunin mo userid, username at idadagdag.


format.
ex.
(Unique)User ID, Username, Password, Status, Remarks .

pag maglogin ka dba kukunin mo yung role nya same lng imbis na role kunin mo UserID, Username, Role at isasave dito sa baba. Every time mag lologin ka mag execute yung save mo to logbook.


for logbook ikaw bahala kung I revise mo.
(Unique) LogID, (Foreign ID)UserID, Username, Time , Date
 
boss baka pwede pa-assist na din? willing to pay. c# + HTML sa VIsual Studio, kaya po kaya., kahit sa may log in/register lang na may database
 
Status
Not open for further replies.

About this Thread

  • 11
    Replies
  • 498
    Views
  • 6
    Participants
Last reply from:
1nn0c3ntv5

Trending Topics

Online now

Members online
550
Guests online
809
Total visitors
1,359

Forum statistics

Threads
2,272,673
Posts
28,944,492
Members
1,237,336
Latest member
sasfreitas1975
Back
Top