Beispiel #1
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            var result = Request.QueryString.ToString();
            int a      = Convert.ToInt32(result);

            HumanBeing  UpdateHuman = new HumanBeing();
            InvolvingDB involvingDB = new InvolvingDB();

            UpdateHuman.Firstname1  = Fname.Text;
            UpdateHuman.Lastname1   = LName.Text;
            UpdateHuman.Middlename1 = MiddleName.Text;

            UpdateHuman.DateOfBirth1     = Calendar1.SelectedDate;
            UpdateHuman.AlternateEmail1  = AltEmail.Text;
            UpdateHuman.Email1           = email.Text;
            UpdateHuman.AlternateNumber1 = AltPnumber.Text;
            UpdateHuman.PhoneNumber1     = Pnumber.Text;



            if (Roles.SelectedValue == "1")
            {
                UpdateHuman.Role1 = 1;
            }
            else if (Roles.SelectedValue == "2")
            {
                UpdateHuman.Role1 = 2;
            }
            else if (Roles.SelectedValue == "3")
            {
                UpdateHuman.Role1 = 3;
            }
            involvingDB.UpdateUser(UpdateHuman, a);
            CleaningUp();
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var result = Request.QueryString.ToString();
                int a      = Convert.ToInt32(result);

                InvolvingDB involvingDB = new InvolvingDB();
                HumanBeing  Updatehuman = new HumanBeing();
                involvingDB.GetfromDB(Updatehuman, a);
                Label1.Text = "Hello " + Updatehuman.Firstname1 + "";



                Fname.Text             = Updatehuman.Firstname1;
                LName.Text             = Updatehuman.Lastname1;
                MiddleName.Text        = Updatehuman.Middlename1;
                Roles.SelectedValue    = $"{Updatehuman.Role1}";
                Calendar1.SelectedDate = Updatehuman.DateOfBirth1;
                email.Text             = Updatehuman.Email1;
                AltEmail.Text          = Updatehuman.AlternateEmail1;
                Pnumber.Text           = Updatehuman.PhoneNumber1;
                AltPnumber.Text        = Updatehuman.AlternateNumber1;
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            InvolvingDB involvingDB = new InvolvingDB();



            involvingDB.GetAllfromDB(ref Person);
        }
Beispiel #4
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            HumanBeing  Human       = new HumanBeing();
            InvolvingDB involvingDB = new InvolvingDB();

            Human.Firstname1  = FirstName.Text;
            Human.Lastname1   = Surname.Text;
            Human.Middlename1 = MiddleName.Text;

            Human.DateOfBirth1     = Calendar1.SelectedDate;
            Human.AlternateEmail1  = AltEmail.Text;
            Human.Email1           = Email.Text;
            Human.AlternateNumber1 = AltPhoneNumber.Text;
            Human.PhoneNumber1     = PhoneNumber.Text;

            if (IsbusinessEmail.Checked)
            {
                Human.IsBusiness1 = 1;
            }
            else
            {
                Human.IsBusiness1 = 0;
            }
            if (IsnoActive.Checked)
            {
                Human.IsActive1 = 1;
            }
            else
            {
                Human.IsActive1 = 0;
            }

            if (Roles.SelectedValue == "1")
            {
                Human.Role1 = 1;
            }
            else if (Roles.SelectedValue == "2")
            {
                Human.Role1 = 2;
            }
            else if (Roles.SelectedValue == "3")
            {
                Human.Role1 = 3;
            }
            involvingDB.SentToDB(Human);

            CleaningUp();
        }