Ejemplo n.º 1
0
        private void Enter_Click(object sender, EventArgs e)
        {
            ServCon mnginput;

            mnginput = new ServCon();
            string userid = Username.Text;
            string pass   = Password.Text;
            string seclvl = "1";

            if (User.clrnce() == 1 && Aclvl.Text != null)
            {
                seclvl = Aclvl.Text;
            }
            else if (User.clrnce() == 3 || User.clrnce() == 2)
            {
                seclvl = "3";
            }
            string SQLcommand = "insert into login values('" + userid + "','" + pass + "'," + seclvl + ");";

            mnginput.modify(SQLcommand);
            MessageBox.Show("Your account has been created successfully.", "Success");
            Username.Text = "";
            Password.Text = "";
            Aclvl.Text    = "";
        }
Ejemplo n.º 2
0
        private void Delete_Click(object sender, EventArgs e)
        {
            ServCon mnginput;

            mnginput = new ServCon();
            string managerID = mngID.Text;
            string mngfname  = fnamebox.Text;
            string mnglname  = lnamebox.Text;

            string SQLcommand = "delete from login where username = " + managerID;

            mnginput.modify(SQLcommand);
        }
Ejemplo n.º 3
0
        private void Update_Click(object sender, EventArgs e)
        {
            ServCon mnginput;

            mnginput = new ServCon();
            string managerID = mngID.Text;
            string mngfname  = fnamebox.Text;
            string mnglname  = lnamebox.Text;

            string SQLcommand = "update login set username = '******', lastname = '" + mnglname + "' where mngID = " + managerID;

            mnginput.modify(SQLcommand);
            MessageBox.Show("The Information has been Updated", "Query Successful");
        }