What's new

C# Login Data patulong

PHC-Minchi

Forum Veteran
Joined
Apr 16, 2017
Posts
1,046
Reaction
3,748
Points
862
Pano gagawin ko mga mam/sir kailangan nasasave yung mga naglologin with time and date. parang logbook.
 
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.. ;)
 
may working login UI na po ako and may table na rin for login pero yung table is wala pang time and date
 
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
 
Last edited by a moderator:
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
 

Similar threads

Back
Top