private void btnSearch_Click_1(object sender, EventArgs e) { if (txtboxContactID.Text != "") { ContactClass c = new ContactClass(); ContactClass d = new ContactClass(); d = c.Search("ContactID = '" + txtboxContactID.Text + "'"); txtboxFirstName.Text = d.FirstName; txtboxLastName.Text = d.LastName; txtboxContactNumber.Text = d.ContactNo; txtboxAddress.Text = d.Address; if (d.Gender.Equals("Male")) { radioMale.Checked = true; } else { radioFemale.Checked = false; } dob.Value = Convert.ToDateTime(d.DateOfBirth); // new DateTime(int year, int month, int date); // c.DateOfBirth = dob.Value.ToString("yyyy-MM-dd"); // txtAge.Text = d.age; cmbRoomType.Text = d.RoomType; cmbRoom.Text = d.Room.ToString(); getRoomPrice(); } }
private void btnSearch_Click(object sender, EventArgs e) { if (txtboxContactID.Text != "") { ContactClass c = new ContactClass(); ContactClass d = new ContactClass(); d = c.Search("ContactID = '" + txtboxContactID.Text + "'"); txtboxFirstName.Text = d.FirstName; txtboxLastName.Text = d.LastName; textBoxNIC.Text = d.NIC; txtboxContactNumber.Text = d.ContactNo; txtboxAddress.Text = d.Address; if (d.Gender.Equals("Male")) { radioMale.Checked = true; } else { radioFemale.Checked = false; } dob.Value = Convert.ToDateTime(d.checkin); dateTimePicker1.Value = Convert.ToDateTime(d.checkout); // new DateTime(int year, int month, int date); // c.DateOfBirth = dob.Value.ToString("yyyy-MM-dd"); // txtAge.Text = d.age; adults.Text = d.adults; children.Text = d.children; cmbDeluxeRoom.Text = d.DeluxeRoom.ToString(); cmbSuiteRoom.Text = d.SuiteRoom.ToString(); cmbStandardRoom.Text = d.StandardRoom.ToString(); // cmbSuiteRoom.Text = d.Room.ToString(); // getRoomPrice(); } }