private void button1_Click(object sender, EventArgs e) { Appointment appointment = new Appointment(); appointment.AppointmentDate = dateTimePicker1.Value; appointment.TimeslotID = Convert.ToInt32(comboBoxslots.SelectedValue.ToString()); appointment.DoctorID = Convert.ToInt32(comboBoxDoctor.SelectedValue.ToString()); appointment.PatientID = Convert.ToInt32(comboBoxpatient.SelectedValue.ToString()); DatabaseOps insert = new DatabaseOps(); insert.insert(appointment); insert.updatetimeslotavailability(appointment.TimeslotID, 0); display(); }
private void buttonInsert_Click(object sender, EventArgs e) { Doctor doctor = new Doctor(); doctor.Name = textBoxName.Text; doctor.Gender = comboBoxGender.Text; doctor.Designation = textBoxDesignation.Text; doctor.Department = textBoxDepartment.Text; doctor.Email = textBoxEmail.Text; doctor.Address = textBoxAddress.Text; doctor.Tel_No = textBoxTel.Text; DatabaseOps insertDoc = new DatabaseOps(); insertDoc.insert(doctor); }
private void buttonPATUpdate_Click(object sender, EventArgs e) { Patient patient = new Patient() { Name = textBoxPATName.Text, Gender = comboBoxPATGender.Text, Tel = textBoxPATTel.Text, DocCode = int.Parse(comboBoxDOCID.Text), Email = textBoxPATEmail.Text, Address = textBoxPATAddress.Text, }; DatabaseOps databaseOps = new DatabaseOps(); databaseOps.insert(patient); display(); }
private void buttonInsert_Click(object sender, EventArgs e) { Laboratory laboratory = new Laboratory() { Name = textBoxLABName.Text, Gender = comboBoxLABGender.Text, Email = textBoxLABEmail.Text, Tel = textBoxLABTel.Text, Address = textBoxLABAddress.Text, testfor = comboBoxLABTEST.Text }; DatabaseOps insetlab = new DatabaseOps(); insetlab.insert(laboratory); display(); }
private void buttonInsert_Click(object sender, EventArgs e) { Doctor doctor = new Doctor() { Name = textBoxName.Text, Gender = comboBoxGender.Text, Designation = textBoxDesignation.Text, Department = textBoxDepartment.Text, Email = textBoxEmail.Text, Address = textBoxAddress.Text, Tel = textBoxTel.Text }; DatabaseOps insertDoc = new DatabaseOps(); insertDoc.insert(doctor); display(); }
private void buttonPATInsert_Click(object sender, EventArgs e) { Patient patient = new Patient() { Name = textBoxPATName.Text, Gender = comboBoxPATGender.Text, Tel = textBoxPATTel.Text, CreatedBy = int.Parse(employeeid.Text), Date = dateTimePicker1.Value, Email = emailt.Text, Address = textBoxPATAddress.Text, }; DatabaseOps databaseOps = new DatabaseOps(); databaseOps.insert(patient); display(); }
private void buttonInsert_Click(object sender, EventArgs e) { Employee doctor = new Employee() { Name = textBoxName.Text, Gender = comboBoxGender.Text, Designation = rolecbx.SelectedItem.ToString(), Department = depcbx.SelectedItem.ToString(), Pass = password.Text, Email = textBoxEmail.Text, Address = textBoxAddress.Text, Tel = textBoxTel.Text }; DatabaseOps insertemp = new DatabaseOps(); insertemp.insert(doctor); display(); }
private void buttonRoomInsert_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 insertRoom = new DatabaseOps(); insertRoom.insert(room); display(); } else { MessageBox.Show("Values Must not be Empty, Data not inserted", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void buttonInsert_Click(object sender, EventArgs e) { Doctor doctor = new Doctor() { Name = textBoxName.Text, Gender = comboBoxGender.Text, Designation = rolecbx.SelectedItem.ToString(), Department = depcbx.SelectedItem.ToString(), Email = textBoxEmail.Text, Address = textBoxAddress.Text, Tel = textBoxTel.Text, starttime = dateTimePicker1.Value, endtime = dateTimePicker2.Value, PricePerAppointment = int.Parse(priceperappointment.Text), }; DatabaseOps insertDoc = new DatabaseOps(); insertDoc.insert(doctor); display(); //doctor.addEmployee(doctor); }
private void buttonRoomInsert_Click(object sender, EventArgs e) { Inpatient inpatient = new Inpatient(); inpatient.PatID = int.Parse(comboBoxPatient.SelectedValue.ToString()); inpatient.RoomNo = comboBoxRNo.SelectedValue.ToString(); inpatient.Admission = dateTimePickerDOA.Value.Date; inpatient.Discharge = dateTimePickerDOD.Value.Date; inpatient.TotalAmount = int.Parse(textBox1.Text); DatabaseOps databaseOps = new DatabaseOps(); if (inpatient.ifinpatientalreadyexisted(inpatient.PatID, inpatient.Admission) == true) { databaseOps.insert(inpatient); databaseOps.updateRoomAvailability(Convert.ToInt32(inpatient.RoomNo), "Unavailable"); } else { MessageBox.Show("Unable to Assign room because room already assignes", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } display(); }