private void buttonDelete_Click(object sender, EventArgs e) { Doctor doctor = new Doctor() { ID = textBoxEMPID.Text, Name = textBoxName.Text, Gender = textBoxGender.Text, Designation = comboBox1.SelectedValue.ToString(), Department = comboBox2.SelectedValue.ToString(), Email = textBoxEmail.Text, Address = textBoxAddress.Text, Tel = textBoxTel.Text, Password = textBoxPass.Text, PricePerAppointment = int.Parse(textboxprice.Text), }; DatabaseOps updateDoc = new DatabaseOps(); updateDoc.update(doctor, "doctorlogin"); textBoxName.ReadOnly = true; textBoxGender.ReadOnly = true; textBoxEmail.ReadOnly = true; textBoxAddress.ReadOnly = true; textBoxTel.ReadOnly = true; textBoxPass.ReadOnly = true; textboxprice.ReadOnly = true; }
private void buttonRoomUpdate_Click(object sender, EventArgs e) { Inpatient inpatient = new Inpatient() { PatID = int.Parse(comboBoxPatient.SelectedValue.ToString()), InPatID = int.Parse(textBoxInpatientID.Text), RoomNo = comboBoxRNo.SelectedValue.ToString(), Admission = dateTimePickerDOA.Value.Date, Discharge = dateTimePickerDOD.Value.Date, TotalAmount = int.Parse(textBox1.Text), }; DatabaseOps databaseOps = new DatabaseOps(); databaseOps.update(inpatient); display(); }
private void buttonReschedule_Click(object sender, EventArgs e) { Appointment appointment = new Appointment(); appointment.AppointmentID = textBoxAppointmentID.Text; appointment.AppointmentDate = Convert.ToDateTime(dateTimePicker1.Value.ToString("yyyy-MM-dd")); appointment.TimeslotID = Convert.ToInt32(comboBoxslots.SelectedValue.ToString()); appointment.DoctorID = Convert.ToInt32(comboBoxDoctor.SelectedValue.ToString()); appointment.PatientID = Convert.ToInt32(comboBoxpatient.SelectedValue.ToString()); DatabaseOps update = new DatabaseOps(); int oldslotid = update.gettimeslotidfromappointment(appointment.AppointmentID); update.updatetimeslotavailability(oldslotid, 1); update.update(appointment); update.updatetimeslotavailability(appointment.TimeslotID, 0); display(); }
private void buttonUpdate_Click(object sender, EventArgs e) { Laboratory lab1 = new Laboratory() { ID = textBoxLABid.Text, Name = textBoxLABName.Text, Gender = comboBoxLABGender.Text, Email = textBoxLABEmail.Text, Tel = textBoxLABTel.Text, Address = textBoxLABAddress.Text, testfor = comboBoxLABTEST.Text }; DatabaseOps updatelab = new DatabaseOps(); updatelab.update(lab1); display(); }
private void buttonUpdate_Click(object sender, EventArgs e) { Doctor doctor1 = new Doctor() { ID = textBoxid.Text, Name = textBoxName.Text, Gender = comboBoxGender.Text, Designation = textBoxDesignation.Text, Department = textBoxDepartment.Text, Email = textBoxEmail.Text, Address = textBoxAddress.Text, Tel = textBoxTel.Text }; DatabaseOps updateDoc = new DatabaseOps(); updateDoc.update(doctor1); display(); }
private void buttonPATUpdate_Click(object sender, EventArgs e) { Patient patient = new Patient() { ID = textBoxPATID.Text, Name = textBoxPATName.Text, Gender = comboBoxPATGender.Text, Tel = textBoxPATTel.Text, Date = dateTimePicker1.Value, CreatedBy = int.Parse(employeeid.Text), Email = emailt.Text, Address = textBoxPATAddress.Text, }; DatabaseOps databaseOps = new DatabaseOps(); databaseOps.update(patient); display(); }
private void buttonUpdate_Click(object sender, EventArgs e) { Employee doctor = new Employee() { ID = textBoxid.Text, Name = textBoxName.Text, Gender = comboBoxGender.Text, Designation = rolecbx.SelectedItem.ToString(), Pass = password.Text, Department = depcbx.SelectedItem.ToString(), Email = textBoxEmail.Text, Address = textBoxAddress.Text, Tel = textBoxTel.Text }; DatabaseOps updateDoc = new DatabaseOps(); updateDoc.update(doctor); display(); }
private void buttonRoomUpdate_Click(object sender, EventArgs e) { if (textBoxRoomNo.Text.Length != 0 && comboBoxFloorNo.Text.Length != 0) { Room room = new Room() { Room_No = int.Parse(textBoxRoomNo.Text), Room_status = comboBoxStatus.Text, Room_type = comboBoxType.Text, Floor_No = char.Parse(comboBoxFloorNo.Text), }; room.setPricePerHour(); DatabaseOps updateRoom = new DatabaseOps(); updateRoom.update(room); display(); } else { MessageBox.Show("Values Must not be Empty, Unable to updated data", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void buttonUpdate_Click(object sender, EventArgs e) { Doctor doctor = new Doctor() { ID = textBoxid.Text, Name = textBoxName.Text, Gender = comboBoxGender.Text, Designation = rolecbx.SelectedItem.ToString(), Department = depcbx.SelectedItem.ToString(), Email = textBoxEmail.Text, Address = textBoxAddress.Text, Password = "******", Tel = textBoxTel.Text, starttime = dateTimePicker1.Value, endtime = dateTimePicker2.Value, PricePerAppointment = int.Parse(priceperappointment.Text), }; DatabaseOps updateDoc = new DatabaseOps(); updateDoc.DeleteTimeSlots(DoctorID); updateDoc.update(doctor); display(); //doctor.addEmployee(doctor); }