private void TenantsButton_Click(object sender, EventArgs e)
        {
            Tenants tenants = new Tenants();

            tenants.Show();
            this.Hide();
        }
Example #2
0
 private void DeleteRoomButton_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are You Sure To Delete???", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         query = "DELETE FROM New_student WHERE UserName='******'";
         fn.setData(query, "Deleted Successfully....");
         userNameTextBox.Text = FullTextBox.Text = PassTextBox.Text = BloodGroupComboBox.Text = DateTimePicker.Text = PhoneNumberTextBox.Text = TextBoxEmail.Text = GenderComboBox.Text = AddressTextBox.Text = EmergencyContactTextBox.Text = EmergencyPhoneNumberTextBox.Text = emergencyRelationTextBox.Text = IdNumberTextBox.Text = RoomNoText.Text = string.Empty;
         Tenants tenants = new Tenants();
         tenants.Show();
         this.Hide();
     }
 }
Example #3
0
        private void UpdateInfoButton_Click(object sender, EventArgs e)
        {
            Int64  mobile        = Int64.Parse(PhoneNumberTextBox.Text);
            Int64  eMobile       = Int64.Parse(EmergencyPhoneNumberTextBox.Text);
            String bookingStatus = RoomType.Text;

            query = " UPDATE New_student SET UserName ='******',FullName='" + FullTextBox.Text + "',Password='******',BloodGroup='" + BloodGroupComboBox.Text + "',DateOfBirth='" + DateTimePicker.Text + "',PhoneNumber=" + mobile + ",Email='" + TextBoxEmail.Text + "',Gender='" + GenderComboBox.Text + "',Address='" + AddressTextBox.Text + "',EmergencyContact='" + EmergencyFullNameTextBox.Text + "',EmergencyPhoneNumber=" + eMobile + ",EmergencyRelation='" + emergencyRelationTextBox.Text + "',VerficationId='" + IdNumberTextBox.Text + "',RoomNumber=" + RoomNoText.Text + " WHERE UserName='******' UPDATE rooms set Booked='" + bookingStatus + "' WHERE RoomNumber=" + RoomNoText.Text + "";
            fn.setData(query, "Updated Successfully......");
            userNameTextBox.Text = FullTextBox.Text = PassTextBox.Text = BloodGroupComboBox.Text = DateTimePicker.Text = PhoneNumberTextBox.Text = TextBoxEmail.Text = GenderComboBox.Text = AddressTextBox.Text = EmergencyContactTextBox.Text = EmergencyPhoneNumberTextBox.Text = emergencyRelationTextBox.Text = IdNumberTextBox.Text = RoomNoText.Text = string.Empty;
            Tenants tenants = new Tenants();

            tenants.Show();
            this.Hide();
        }