示例#1
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            Staff s = new Staff();

            s.Staffnum   = Convert.ToInt32(lblstaffno.Text);
            s.Staffname  = staffnametbx.Text;
            s.Dob        = lbldob.Text;
            s.Bankaccnum = lblbankno.Text;
            s.Contactnum = Convert.ToInt32(contatbx.Text);
            s.Homeadd    = homeaddtbx.Text;
            s.Dutytype   = dutytbx.Text;
            s.Username   = usernametbx.Text;
            s.Password   = passtbx.Text;

            if (SWENDbmanager.UpdateStaff(s) == 1)
            {
                lblSuccesful.Text = "Staff Update Completed..";
            }
            else
            {
                lblSuccesful.Text = "Staff Update Failed..";
            }
        }
示例#2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Staff s1 = new Staff();

            s1.Staffnum   = Convert.ToInt32(lblstaffnum.Text);
            s1.Staffname  = staffnametbx.Text;
            s1.Dob        = dobtbx.Text;
            s1.Bankaccnum = banktbx.Text;
            s1.Contactnum = Convert.ToInt32(conttbx.Text);
            s1.Dutytype   = lblduty.Text;
            s1.Homeadd    = hometbx.Text;
            s1.Username   = usertbx.Text;
            s1.Password   = pwtbx.Text;


            if (SWENDbmanager.UpdateStaff(s1) == 1)
            {
                lblupdated.Text = "Profile Update Completed..";
            }
            else
            {
                lblupdated.Text = "Profile Update Failed..";
            }
        }