private void searchPB_click(object sender, EventArgs e) { addPatientPanel.Hide(); informPanel.Hide(); medicalPanel.Hide(); addDetailPanel.Hide(); searchPanel.Show(); addPatientPB.BorderStyle = BorderStyle.None; medicalDetailPB.BorderStyle = BorderStyle.None; displayPB.BorderStyle = BorderStyle.None; searchPB.BorderStyle = BorderStyle.Fixed3D; DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); addPatientHandler addPatientHandler = new addPatientHandler(); patientDAT.DataSource = addPatientHandler.getAllPatient(databaseConnertor.getconn()); DatabaseConnertor database = new DatabaseConnertor(); databaseConnertor.connect(); pmdetailsHandler pmdetailsHandler = new pmdetailsHandler(); dataGridView1.DataSource = pmdetailsHandler.getAlldetails(databaseConnertor.getconn()); }
private void History_Load(object sender, EventArgs e) { DatabaseConnertor database = new DatabaseConnertor(); database.connect(); realtimeHandler realtimeHandler = new realtimeHandler(); dgvHistory.DataSource = realtimeHandler.getAlldetails(database.getconn()); database.connect(); addPatientHandler addPatientHandler = new addPatientHandler(); dgvPatient.DataSource = addPatientHandler.getAllPatient(database.getconn()); }
private void btnAdd_Click(object sender, EventArgs e) { DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); setalarm setalarm = new setalarm(); setalarm.P_id = int.Parse(AlarmPatientIdTextBox.Text); setalarm.P_min_pulse_rate = int.Parse(tbminP.Text); setalarm.P_max_pulse = int.Parse(tbmaxP.Text); setalarm.P_min_temperature = int.Parse(tbminT.Text); setalarm.P_max_temperature = int.Parse(tbmaxT.Text); setalarm.P_min_breathing_rate = int.Parse(tbminB.Text); setalarm.P_max_breathing = int.Parse(tbmaxB.Text); setalarm.P_min_blood_sys = int.Parse(tbminS.Text); setalarm.P_max_sys = int.Parse(tbmaxS.Text); setalarm.P_min_blood_dias = int.Parse(tbminD.Text); setalarm.P_max_dias = int.Parse(tbmaxD.Text); setalarmHandler setalarmHandler = new setalarmHandler(); int recordCnt = setalarmHandler.addSetAlarm(databaseConnertor.getconn(), setalarm); MessageBox.Show(recordCnt + " record has been inserted !!"); this.Close(); SetAlarmLimit setAlarmLimit = new SetAlarmLimit(); setAlarmLimit.Show(); }
private void btnSaveN_Click(object sender, EventArgs e) { DateTime dateTime = dtpDOB.Value; const string after = "yyyyMMdd"; string password = dateTime.ToString(after); DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); addNurses addNurses = new addNurses(); addNurses.S_position = lbPN.Text; addNurses.S_firstName = tbFN.Text; addNurses.S_lastName = tbLN.Text; addNurses.S_dob = this.dtpDOB.Value; addNurses.S_age = int.Parse(lbAge.Text); addNurses.S_email = tbEmail.Text; addNurses.S_contact = int.Parse(tbContact.Text); addNurses.S_loginid = tbFN.Text + tbLN.Text; addNurses.S_password = password; addNursesHandler addNursesHandler = new addNursesHandler(); int recordCnt = addNursesHandler.addNewNurse(databaseConnertor.getconn(), addNurses); MessageBox.Show(recordCnt + " record has been inserted !!"); }
private void btnRegister_Click(object sender, EventArgs e) { DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); addPatient addPatient = new addPatient(); addPatient.P_firstName = firstNameTB.Text; addPatient.P_lastName = lastNameTB.Text; addPatient.P_age = int.Parse(ageLabel.Text); addPatient.P_dob = this.dobDTP.Value; addPatient.P_contact = int.Parse(contactTB.Text); addPatient.P_emergencyContact = int.Parse(emergencyContactTB.Text); addPatient.P_gender = genderCB.Text; addPatient.P_address = addressTB.Text; addPatient.P_floor = tbFloor.Text; addPatient.P_bedNum = int.Parse(tbBed.Text); addPatient.P_admission = this.dtpAdmission.Value; addPatientHandler addPatientHandler = new addPatientHandler(); int recordCnt = addPatientHandler.addNewPatient(databaseConnertor.getconn(), addPatient); MessageBox.Show(recordCnt + " record has been inserted !!"); }
private void btnSave_Click(object sender, EventArgs e) { DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); addPatient addPatient = new addPatient(); addPatient.P_firstName = tbFN.Text; addPatient.P_lastName = tbLN.Text; addPatient.P_age = int.Parse(lbAge.Text); addPatient.P_dob = this.dtpDob.Value; addPatient.P_contact = int.Parse(tbContact.Text); addPatient.P_emergencyContact = int.Parse(tbEmergency.Text); addPatient.P_gender = cbGender.Text; addPatient.P_address = tbAddress.Text; addPatient.P_bedNum = int.Parse(tbBed.Text); addPatient.P_floor = tbFloor.Text; addPatient.P_admission = dtpAdmission.Value; addPatientHandler addPatientHandler = new addPatientHandler(); int recordCnt = addPatientHandler.addNewPatient(databaseConnertor.getconn(), addPatient); MessageBox.Show(recordCnt + " record has been inserted !!"); }
private void btnMute_Click(object sender, EventArgs e) { if (tbStaffName.Text == "") { MessageBox.Show("Insert Staff Name"); } else { SendMessageW(this.Handle, WM_APPCOMMAND, this.Handle, (IntPtr)APPCOMMAND_VOLUME_MUTE); DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); active active = new active(); active.Ms_name = tbStaffName.Text; active.Bed_number = int.Parse(bedNo.Text); active.Staff_checkdatetime = DateTime.Parse(lbDateTime.Text); activeHandler activeHandler = new activeHandler(); int recordCnt1 = activeHandler.addActive(databaseConnertor.getconn(), active); Timer.Stop(); MessageBox.Show("Checked Patient"); } }
private void btnSave_Click(object sender, EventArgs e) { DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); pmdetails pmdetails = new pmdetails(); pmdetails.P_id = int.Parse(patientIDTB.Text); pmdetails.P_systolic = int.Parse(systolicTB.Text); pmdetails.P_diastolic = int.Parse(diastolicTB.Text); pmdetails.P_breathing = int.Parse(breathingTB.Text); pmdetails.P_pulse = int.Parse(pulseTB.Text); pmdetails.P_temperater1 = double.Parse(temperatureTB.Text); pmdetailsHandler pmdetailsHandler = new pmdetailsHandler(); int recordCnt2 = pmdetailsHandler.addNewDetails(databaseConnertor.getconn(), pmdetails); MessageBox.Show(recordCnt2 + " record has been inserted !!"); }
private void pbRegister_Click(object sender, EventArgs e) { DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); rederegister rederegister = new rederegister(); rederegister.Ms_id = int.Parse(lbMedicalID.Text); rederegister.Register_date = this.dateTimePicker2.Value; rederegister.Register_time = tbTime.Text; rederegister.Deregister_date = this.dateTimePicker1.Value; rederegister.Deregister_time = tbDtime.Text; rederegisterHandler rederegisterHandler = new rederegisterHandler(); int recordCnt1 = rederegisterHandler.addReDeregister(databaseConnertor.getconn(), rederegister); MessageBox.Show(recordCnt1 + " record has been inserted !!"); this.Close(); DeRegister deRegister = new DeRegister(); deRegister.Show(); }
private void registerPictureBox_Click(object sender, EventArgs e) { DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); registers register = new registers(); register.S_id = int.Parse(LoginIdLabel.Text); register.Register_date = this.datePicker.Value; register.Register_time = tbTime.Text; register.Deregister_date = this.datePicker1.Value; register.Deregister_time = tbDtime.Text; registerHandler registerHandler = new registerHandler(); int recordCnt1 = registerHandler.addRegister(databaseConnertor.getconn(), register); MessageBox.Show(recordCnt1 + " record has been inserted !!"); this.Close(); Register register1 = new Register(); register1.Show(); }
private void timer2_Tick(object sender, EventArgs e) { //This code for Connet with realtime /*bsys.Text = RealTime.passingtext1; * bdia.Text = RealTime.passingtext2; * bpul.Text = RealTime.passingtext3; * bbre.Text = RealTime.passingtext4; * btem.Text = RealTime.passingtext5; * pid.Text = RealTime.passingtext6;*/ bsrandomnum = random.Next(85, 145); bdrandomnum = random.Next(65, 100); prandomnum = random.Next(65, 75); brandomnum = random.Next(12, 20); trandomnum = random.Next(36, 37); bsys.Text = bsrandomnum.ToString(); bdia.Text = bdrandomnum.ToString(); bpul.Text = prandomnum.ToString(); bbre.Text = brandomnum.ToString(); btem.Text = trandomnum.ToString(); int bsyst = int.Parse(bsys.Text); int bdiat = int.Parse(bdia.Text); int bpult = int.Parse(bpul.Text); int bbret = int.Parse(bbre.Text); int btemt = int.Parse(btem.Text); int sysmin = int.Parse(sysMin.Text); int sysmax = int.Parse(sysMax.Text); int diamin = int.Parse(diaMin.Text); int diamax = int.Parse(diaMax.Text); int pulmin = int.Parse(pulMin.Text); int pulmax = int.Parse(pulMax.Text); int bremin = int.Parse(breMin.Text); int bremax = int.Parse(breMax.Text); int temmin = int.Parse(temMin.Text); int temmax = int.Parse(temMax.Text); if (bsyst <= sysmin || bsyst >= sysmax) { bcolor.BackColor = Color.Red; SoundPlayer player1 = new System.Media.SoundPlayer(Properties.Resources.Alarm); player1.Play(); DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); active active = new active(); active.Bed_number = int.Parse(bedNo.Text); active.Emergency_datetime = DateTime.Parse(lbDateTime.Text); active.Systolic = int.Parse(bsys.Text); activeHandler activeHandler = new activeHandler(); int recordCnt1 = activeHandler.addActive(databaseConnertor.getconn(), active); } else if (bdiat <= diamin || bdiat >= diamax) { bcolor.BackColor = Color.Red; SoundPlayer player1 = new System.Media.SoundPlayer(Properties.Resources.Alarm); player1.Play(); DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); active active = new active(); active.Bed_number = int.Parse(bedNo.Text); active.Emergency_datetime = DateTime.Parse(lbDateTime.Text); active.Diastolic = int.Parse(bdia.Text); activeHandler activeHandler = new activeHandler(); int recordCnt1 = activeHandler.addActive(databaseConnertor.getconn(), active); } else if (bpult <= pulmin || bpult >= pulmax) { bcolor.BackColor = Color.Red; SoundPlayer player1 = new System.Media.SoundPlayer(Properties.Resources.Alarm); player1.Play(); DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); active active = new active(); active.Bed_number = int.Parse(bedNo.Text); active.Emergency_datetime = DateTime.Parse(lbDateTime.Text); active.Pulse = int.Parse(bpul.Text); activeHandler activeHandler = new activeHandler(); int recordCnt1 = activeHandler.addActive(databaseConnertor.getconn(), active); } else if (bbret <= bremin || bbret >= bremax) { bcolor.BackColor = Color.Red; SoundPlayer player1 = new System.Media.SoundPlayer(Properties.Resources.Alarm); player1.Play(); DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); active active = new active(); active.Bed_number = int.Parse(bedNo.Text); active.Emergency_datetime = DateTime.Parse(lbDateTime.Text); active.Breathing = int.Parse(bbre.Text); activeHandler activeHandler = new activeHandler(); int recordCnt1 = activeHandler.addActive(databaseConnertor.getconn(), active); } else if (btemt <= temmin || btemt >= temmax) { bcolor.BackColor = Color.Red; SoundPlayer player1 = new System.Media.SoundPlayer(Properties.Resources.Alarm); player1.Play(); DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); active active = new active(); active.Bed_number = int.Parse(bedNo.Text); active.Emergency_datetime = DateTime.Parse(lbDateTime.Text); active.Temperature = int.Parse(btem.Text); activeHandler activeHandler = new activeHandler(); int recordCnt1 = activeHandler.addActive(databaseConnertor.getconn(), active); } else { bcolor.BackColor = Color.Green; } }
private void timer1_Tick(object sender, EventArgs e) { DatabaseConnertor databaseConnertor = new DatabaseConnertor(); databaseConnertor.connect(); realtimeclass realtimeclass = new realtimeclass(); realtimeclass.P_id = int.Parse(pID.Text); realtimeclass.P_systolic = int.Parse(lbSys.Text); realtimeclass.P_diastolic = int.Parse(lbDia.Text); realtimeclass.P_breathing = int.Parse(lbBre.Text); realtimeclass.P_pulse = int.Parse(lbPul.Text); realtimeclass.P_temperature = int.Parse(lbTem.Text); realtimeHandler realtimeHandler = new realtimeHandler(); int recordCnt1 = realtimeHandler.addRealTime(databaseConnertor.getconn(), realtimeclass); bsrandomnum = random.Next(105, 145); bdrandomnum = random.Next(65, 100); prandomnum = random.Next(65, 75); //prandomnum = random.Next(0); brandomnum = random.Next(12, 20); trandomnum = random.Next(36, 37); lbSys.Text = bsrandomnum.ToString(); lbDia.Text = bdrandomnum.ToString(); lbPul.Text = prandomnum.ToString(); lbBre.Text = brandomnum.ToString(); lbTem.Text = trandomnum.ToString(); chart1.Series[0].Points.AddXY(bstime++, bsrandomnum); chart1.Series[0].Color = Color.LightGreen; chart1.Series[1].Points.AddXY(bdtime++, bdrandomnum); if (chart1.Series[0].Points.Count > 5) { chart1.Series[0].Points.Remove(chart1.Series[0].Points[0]); chart1.ChartAreas[0].AxisX.Minimum = chart1.Series[0].Points[0].XValue; chart1.ChartAreas[0].AxisX.Maximum = bstime; } chart2.Series[0].Points.AddXY(ptime++, prandomnum); chart2.Series[0].Color = Color.LightGreen; if (chart2.Series[0].Points.Count > 5) { chart2.Series[0].Points.Remove(chart2.Series[0].Points[0]); chart2.ChartAreas[0].AxisX.Minimum = chart2.Series[0].Points[0].XValue; chart2.ChartAreas[0].AxisX.Maximum = ptime; } chart3.Series[0].Points.AddXY(btime++, brandomnum); chart3.Series[0].Color = Color.LightGreen; if (chart3.Series[0].Points.Count > 5) { chart3.Series[0].Points.Remove(chart3.Series[0].Points[0]); chart3.ChartAreas[0].AxisX.Minimum = chart3.Series[0].Points[0].XValue; chart3.ChartAreas[0].AxisX.Maximum = btime; } chart4.Series[0].Points.AddXY(ttime++, trandomnum); chart4.Series[0].Color = Color.LightGreen; if (chart4.Series[0].Points.Count > 5) { chart4.Series[0].Points.Remove(chart4.Series[0].Points[0]); chart4.ChartAreas[0].AxisX.Minimum = chart4.Series[0].Points[0].XValue; chart4.ChartAreas[0].AxisX.Maximum = ttime; } if (lbPul.Text == "0") { timer.Stop(); // SoundPlayer player = new System.Media.SoundPlayer(); SoundPlayer player1 = new SoundPlayer(Properties.Resources.BedsideSoundss); player1.Play(); // player.Stop(); } else { System.Media.SoundPlayer player = new System.Media.SoundPlayer(Properties.Resources.BedsideSounds); player.Play(); } passingtext1 = lbSys.Text; passingtext2 = lbDia.Text; passingtext3 = lbPul.Text; passingtext4 = lbBre.Text; passingtext5 = lbTem.Text; passingtext6 = pID.Text; }