private void listbxlapCato_SelectedValueChanged(object sender, EventArgs e) { try { if (listbxlapCato.SelectedIndex == 0) { c.OpenConection(); string query = "select Service_code as 'كود الخدمة', Service_name as 'اسم الخدمة',Repeat as 'التكرار', price as 'السعر', Notes as 'ملاحظات' from orders_lap_service where lap_code='lap2'"; DataTable dt = (DataTable)c.ShowDataInGridView(query); dataGridServices.DataSource = dt; c.CloseConnection(); } else if (listbxlapCato.SelectedIndex == 1) { c.OpenConection(); string query = "select Service_code as 'كود الخدمة', Service_name as 'اسم الخدمة',Repeat as 'التكرار', price as 'السعر', Notes as 'ملاحظات' from orders_lap_service where lap_code='lap1'"; DataTable dt = (DataTable)c.ShowDataInGridView(query); dataGridServices.DataSource = dt; c.CloseConnection(); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void تنفيذ_خطه_HIS_Load(object sender, EventArgs e) { dataGridView1.DefaultCellStyle.Font = new Font("Calibri", 10.25f, FontStyle.Regular); dataGridView1.ColumnHeadersDefaultCellStyle.Font = new Font("Calibri", 11, FontStyle.Regular); dataGridView1.ColumnHeadersDefaultCellStyle.BackColor = Color.RoyalBlue; dataGridView1.EnableHeadersVisualStyles = false; dataGridView1.BorderStyle = 0; dataGridView1.RowHeadersVisible = false; dataGridView1.BackgroundColor = Color.White; try { con.OpenConection(); dataGridView1.DataSource = con.ShowDataInGridView("Hemodialysis_Plan_select"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void غرق_العلاج_الطبيعى_Load(object sender, EventArgs e) { try { object x = new object(); x = con.ShowDataInGridView("physiotherapy_physiotherapy_Rooms_select"); dataGridView1.DataSource = (DataTable)x; } catch (Exception ex) { MessageBox.Show("error"); } //finally { con.CloseConnection(); } }
private void button1_Click_1(object sender, EventArgs e) { start_date = (comboBox2.SelectedIndex + 1).ToString() + "-1-" + comboBox1.SelectedItem; if (new[] { 1, 3, 5, 7, 8, 10, 12 }.Contains(comboBox2.SelectedIndex + 1)) { month = "-31-"; } else if (new[] { 4, 6, 9, 11 }.Contains(comboBox2.SelectedIndex + 1)) { month = "-30-"; } else { month = "-28-"; } end_date = (comboBox2.SelectedIndex + 1).ToString() + month + comboBox1.SelectedItem; query = "select count(pid) as count, arabic_name from treat_patient ,shift_time, clinic where shift_time.start_time between'" + start_date + "' and '" + end_date + "' group by arabic_name"; object dt = conn.ShowDataInGridView(query); reportViewer1.LocalReport.DataSources.Clear(); var rtds = new ReportDataSource("DataSet1", dt); reportViewer1.LocalReport.DataSources.Add(rtds); reportViewer1.RefreshReport(); //dataGridView1.DataSource = conn.ShowDataInGridView(query) ; }
private void button1_Click(object sender, EventArgs e) { try { Connection conn = new Connection(); string query; DataTable dt = new DataTable(); conn.OpenConection(); query = @"SELECT Registeration_patientRegisteration.patient_name, Registeration_patientRegisteration.patient_id FROM physiotherapy_Treatment_Plan INNER JOIN physiotherapy_has_plan ON physiotherapy_Treatment_Plan.plan_code = physiotherapy_has_plan.plan_code INNER JOIN doctors ON physiotherapy_has_plan.doc_code = doctors.doc_ssn INNER JOIN entranceoffice_visit INNER JOIN Registeration_patientRegisteration ON entranceoffice_visit.pat_id = Registeration_patientRegisteration.patient_id INNER JOIN physiotherapy_Reception ON entranceoffice_visit.visit_id = physiotherapy_Reception.patient_id ON physiotherapy_Treatment_Plan.physiotherapy_patient_code = physiotherapy_Reception.physiotherapy_patient_code WHERE (physiotherapy_Treatment_Plan.plan_start >= '" + dateTimePicker1.Value.ToString("MM/dd/yyyy 00:00:00") + "') AND (physiotherapy_Treatment_Plan.plan_end <= '" + dateTimePicker2.Value.ToString("MM/dd/yyyy 23:59:59") + "') AND (doctors.doc_ssn =" + textBox1.Text + ")"; dt.Clear(); dt = (DataTable)conn.ShowDataInGridView(query); conn.CloseConnection(); reportViewer1.LocalReport.DataSources.Clear(); var rtds = new ReportDataSource("DataSet1", dt); reportViewer1.LocalReport.DataSources.Add(rtds); reportViewer1.RefreshReport(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnSearch_Click(object sender, EventArgs e) { if (txtPNumber.Text == "") { MessageBox.Show("من فضلك ادخل كود المريض", "خطأ"); txtPNumber.Focus(); } else { try { Connection conn = new Connection(); string query; DataTable dt = new DataTable(); conn.OpenConection(); query = @"SELECT id, MealID, mealType, [_date], station, account_number FROM dbo.orders_patientHasMeal where account_number='" + txtPNumber.Text + "'"; dt.Clear(); dt = (DataTable)conn.ShowDataInGridView(query); conn.CloseConnection(); reportViewer1.LocalReport.DataSources.Clear(); var rtds = new ReportDataSource("DataSet1", dt); reportViewer1.LocalReport.DataSources.Add(rtds); reportViewer1.RefreshReport(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
private void button1_Click(object sender, EventArgs e) { try { Connection conn = new Connection(); string query; DataTable dt = new DataTable(); conn.OpenConection(); query = @"SELECT infected_Employee.code, employee.name, employee.gender,infected_Employee.vaccination_date, doctors.full_name FROM employee INNER JOIN infected_Employee ON employee.emp_id = infected_Employee.Emp_code INNER JOIN doctors ON employee.emp_id = doctors.emp_id AND infected_Employee.Doctor_Code = doctors.doc_ssn WHERE (infected_Employee.vaccination_date >= '" + dateTimePicker1.Value.ToString("MM/dd/yyyy 00:00:00") + "') AND (infected_Employee.vaccination_date <= '" + dateTimePicker2.Value.ToString("MM/dd/yyyy 23:59:59") + "') OR (doctors.full_name = '" + textBox1.Text + "')"; dt.Clear(); dt = (DataTable)conn.ShowDataInGridView(query); conn.CloseConnection(); reportViewer1.LocalReport.DataSources.Clear(); var rtds = new ReportDataSource("DataSet1", dt); reportViewer1.LocalReport.DataSources.Add(rtds); reportViewer1.RefreshReport(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void عرض_الطبيب_للغسيل_Load_1(object sender, EventArgs e) { try { con.OpenConection(); dataGridView1.DataSource = con.ShowDataInGridView("doctors_select"); //con = new SqlConnection(@"Server=MYDOCUMENTS-PC;Database=FHIS;Integrated Security=true"); //try //{ // con.Open(); // cmd = new SqlCommand("doctors_select", con); // cmd.CommandType = CommandType.StoredProcedure; // dr = cmd.ExecuteReader(); // DataTable dt = new DataTable(); // dt.Load(dr); // dataGridView1.DataSource = dt; // dr.Close(); // con.Close(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void button1_Click(object sender, EventArgs e) { try { Connection conn = new Connection(); string query; DataTable dt = new DataTable(); conn.OpenConection(); query = @"SELECT entranceoffice_visit.visit_id, Registeration_patientRegisteration.patient_name, tb_Second_Level_Service.SLS_Aname, Hemodialysis_Plan.Excuation_date FROM Hemodialysis_PatientReception INNER JOIN Hemodialysis_Plan ON Hemodialysis_PatientReception.Code = Hemodialysis_Plan.patient_id INNER JOIN tb_Second_Level_Service ON Hemodialysis_Plan.Service_Code = tb_Second_Level_Service.SLS_id INNER JOIN entranceoffice_visit ON Hemodialysis_PatientReception.patient_id = entranceoffice_visit.visit_id INNER JOIN Registeration_patientRegisteration ON entranceoffice_visit.pat_id = Registeration_patientRegisteration.patient_id INNER JOIN tb_Frist_Level_Service ON tb_Second_Level_Service.SLS_FLS_id = tb_Frist_Level_Service.FLS_id"; dt.Clear(); dt = (DataTable)conn.ShowDataInGridView(query); conn.CloseConnection(); reportViewer1.LocalReport.DataSources.Clear(); var rtds = new ReportDataSource("DataSet1", dt); reportViewer1.LocalReport.DataSources.Add(rtds); reportViewer1.RefreshReport(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void المستخدمين_Load(object sender, EventArgs e) { dataGridView1.DefaultCellStyle.Font = new Font("Calibri", 10.25f, FontStyle.Regular); dataGridView1.ColumnHeadersDefaultCellStyle.Font = new Font("Calibri", 11, FontStyle.Regular); dataGridView1.ColumnHeadersDefaultCellStyle.BackColor = Color.RoyalBlue; dataGridView1.EnableHeadersVisualStyles = false; dataGridView1.BorderStyle = 0; dataGridView1.RowHeadersVisible = false; dataGridView1.BackgroundColor = Color.White; try { con.OpenConection(); dataGridView1.DataSource = con.ShowDataInGridView("MedicalSheet_Users_select"); con.CloseConnection(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void اضافة_مكافحة_عدوى_موظفين_Load(object sender, EventArgs e) { // dataGridView1.DefaultCellStyle.Font = new Font("Calibri", 10.25f, FontStyle.Regular); // dataGridView1.ColumnHeadersDefaultCellStyle.Font = new Font("Calibri", 11, FontStyle.Regular); // dataGridView1.ColumnHeadersDefaultCellStyle.BackColor = Color.RoyalBlue; // dataGridView1.EnableHeadersVisualStyles = false; // dataGridView1.BorderStyle = 0; // dataGridView1.RowHeadersVisible = false; // dataGridView1.BackgroundColor = Color.Snow; try { con.OpenConection(); con.DataReader("select_Employee"); dataGridView1.DataSource = con.ShowDataInGridView("infection_employee_show"); con.CloseConnection(); //select_Employee } catch (Exception ex) { MessageBox.Show(ex.ToString()); } con.CloseConnection(); }
private void button1_Click(object sender, EventArgs e) { try { /*employee ON adminstration.id_admin = employee.id_admin INNER JOIN*/ Connection conn = new Connection(); string query; DataTable dt = new DataTable(); conn.OpenConection(); query = @"SELECT vaccination.vaccination_code, vaccination.vaccination_Arabic_name, vaccination.vaccination_English_name, vaccination.vaccination_kind, vaccination.vaccination_appointment FROM departement INNER JOIN employee ON employee.dep_code = departement.code INNER JOIN vaccination INNER JOIN infected_Employee ON vaccination.vaccination_code = infected_Employee.vaccination_code ON employee.emp_id = infected_Employee.Emp_code WHERE (vaccination.vaccination_appointment >= '" + dateTimePicker1.Value.ToString("MM/dd/yyyy 00:00:00") + "') AND (vaccination.vaccination_appointment <= '" + dateTimePicker2.Value.ToString("MM/dd/yyyy 23:59:59") + @"') OR (employee.name = '" + textBox3.Text + "') OR (departement.name = '" + textBox2.Text + "')"; dt.Clear(); dt = (DataTable)conn.ShowDataInGridView(query); conn.CloseConnection(); reportViewer1.LocalReport.DataSources.Clear(); var rtds = new ReportDataSource("DataSet1", dt); reportViewer1.LocalReport.DataSources.Add(rtds); reportViewer1.RefreshReport(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button1_Click(object sender, EventArgs e) { // bool x = true; try { if (استقبال_العلاج_الطبيعي.ContainsArabicLetters(textBox1.Text)) { while (true) { con.OpenConection(); decimal y = 0; if (numericUpDown1.Value == y || numericUpDown2.Value == y) { MessageBox.Show("من فضلك حدد بداية ونهاية الفترة"); break; //x = false;} } else { string[] pramname = new string[3]; string[] pramvalue = new string[3]; SqlDbType[] pramtype = new SqlDbType[3]; pramname[0] = "@Duration_name"; pramname[1] = "@Duration_satrt"; pramname[2] = "@Duration_end"; pramvalue[0] = textBox1.Text; pramvalue[1] = numericUpDown1.Value.ToString(); pramvalue[2] = numericUpDown2.Value.ToString(); pramtype[0] = SqlDbType.VarChar; pramtype[1] = SqlDbType.VarChar; pramtype[2] = SqlDbType.VarChar; con.ExecuteInsertOrUpdateOrDeleteUsingStoredProc("physiotherapy_physiotherapy_Treatment_Duration_insert", pramname, pramvalue, pramtype); object x = new object(); x = con.ShowDataInGridView("physiotherapy_physiotherapy_Treatment_Duration_select"); dataGridView1.DataSource = (DataTable)x;; break; } } } else { MessageBox.Show("من ضلك ادخل اسم الفترة باللغة العربية"); } } catch (Exception ex) { MessageBox.Show("Error"); } finally { con.CloseConnection(); } }
private void button1_Click(object sender, EventArgs e) { try { con.OpenConection(); dt.Clear(); if (استقبال_العلاج_الطبيعي.ContainsArabicLetters(AR_N.Text)) { string[] pramname = new string[3]; string[] pramvalue = new string[3]; SqlDbType[] pramtype = new SqlDbType[3]; pramname[0] = "@Arabic_name"; pramname[1] = "@English_name"; pramname[2] = "@Room_code"; pramvalue[0] = AR_N.Text; pramvalue[1] = EN_N.Text; pramvalue[2] = Room_code.Text; pramtype[0] = SqlDbType.VarChar; pramtype[1] = SqlDbType.VarChar; pramtype[2] = SqlDbType.Int; con.ExecuteInsertOrUpdateOrDeleteUsingStoredProc("physiotherapy_physiotherapy_Devices_insert", pramname, pramvalue, pramtype); object x = new object(); x = con.ShowDataInGridView("physiotherapy_physiotherapy_Devices_select"); dataGridView1.DataSource = (DataTable)x; } else { MessageBox.Show("من فضلك ادخل اسم الجهاز باللغة العربية"); } } catch (Exception ex) { if (AR_N.Text.Equals("") || EN_N.Text.Equals("") || Room_code.Text.Equals("")) { MessageBox.Show("من فضلك ادخل البيانات كاملة"); } else { MessageBox.Show("خطأ فى النظام "); } } finally { con.CloseConnection(); } }
private void عرض_المرضى_Load(object sender, EventArgs e) { try { object x = new object(); x = con.ShowDataInGridView("physiotherapy_displayPatient_select"); dataGridView1.DataSource = (DataTable)x; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void عرض_المرضى_لعمل_خطة_علاجية_Load(object sender, EventArgs e) { try { con.OpenConection(); dataGridView1.DataSource = con.ShowDataInGridView("Hemodialysis_patient_select"); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.CloseConnection(); } }
private void اعداد_فئات_الشتات_الطبيه_Load(object sender, EventArgs e) { dataGridView1.DefaultCellStyle.Font = new Font("Calibri", 10.25f, FontStyle.Regular); dataGridView1.ColumnHeadersDefaultCellStyle.Font = new Font("Calibri", 11, FontStyle.Regular); dataGridView1.ColumnHeadersDefaultCellStyle.BackColor = Color.RoyalBlue; dataGridView1.EnableHeadersVisualStyles = false; dataGridView1.BorderStyle = 0; dataGridView1.RowHeadersVisible = false; dataGridView1.BackgroundColor = Color.White; con.OpenConection(); con.DataReader("MedicalSheet_Category_select_All"); dataGridView1.DataSource = con.ShowDataInGridView("MedicalSheet_Category_select_All"); con.CloseConnection(); }
private void عرض_موظفى_العلاج_الطبيعي_Load(object sender, EventArgs e) { try { con.OpenConection(); object x = new object(); x = con.ShowDataInGridView("physiotherapy_Doctors_select"); dataGridView1.DataSource = (DataTable)x; } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.CloseConnection(); } }
private void showData() { Connection mycon = new Connection(); mycon.OpenConection(); //con.Open(); DataTable dt = (DataTable)mycon.ShowDataInGridView("select id_workdirection,[arabic name],[english name] from workdirection;"); dataGridView1.DataSource = dt; mycon.CloseConnection(); }
private void button4_Click(object sender, EventArgs e) { con.OpenConection(); string query = @"SELECT applicant_data.applicant_name, applicant_data.applicant_date, applicant_data.gender, applicant_data.courses, applicant_data.languages, applicant_data.experince_years, applicant_data.qualifications, applicant_data.job_name, applicant_data.nationality, interview.interviewer_name, interview.interview_date, interview.interview_evaluate FROM applicant_data INNER JOIN interview ON applicant_data.applicant_id = interview.applicant_id WHERE applicant_data.applicant_name='" + textBox1.Text + "'"; dataGridView1.DataSource = (DataTable)con.ShowDataInGridView(query); con.CloseConnection(); }
private void عرض_المرضى_للغسل_الكلوى_Load(object sender, EventArgs e) { try { con.OpenConection(); dataGridView1.DataSource = con.ShowDataInGridView("Registeration_patientRegisteration_select3"); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } con.CloseConnection(); }
private void عرض_فترات_العلاج_الطبيعىcs_Load(object sender, EventArgs e) { try { object x = new object(); x = con.ShowDataInGridView("physiotherapy_physiotherapy_Treatment_Duration_select"); dataGridView1.DataSource = (DataTable)x; } catch (Exception ex) { MessageBox.Show(ex.Message); } // finally{con.Close();} }
private void القاعات_Load(object sender, EventArgs e) { try { con.OpenConection(); dataGridView1.DataSource = con.ShowDataInGridView("Room_selects"); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } con.CloseConnection(); }
private void كود_الفتره_Load(object sender, EventArgs e) { try { con.OpenConection(); dataGridView1.DataSource = con.ShowDataInGridView("Hemodialysis_Priod_select3"); } catch (Exception ex) { MessageBox.Show(ex.Message); } // finally { con.CloseConnection(); } }
private void عرض_خدمات_الغسيل_الكلوى_Load(object sender, EventArgs e) { try { con.OpenConection(); dataGridView1.DataSource = con.ShowDataInGridView("Hemodialysis_services_select"); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } con.CloseConnection(); }
private void استقبال_العلاج_الطبيعي_Load(object sender, EventArgs e) { try { object x = new object(); x = con.ShowDataInGridView("physiotherapy_physiotherapy_hasplan_select"); dataGridView1.DataSource = (DataTable)x; } catch (Exception ex) { MessageBox.Show("error"); } }
private void عرض_الاقسام_Load(object sender, EventArgs e) { try { con.OpenConection(); con.DataReader("infection_department_select"); dataGridView1.DataSource = con.ShowDataInGridView("infection_department_select"); con.CloseConnection(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void تعديل_الخطة_العلاجية_للعلاج_الطبيعى_Load(object sender, EventArgs e) { try { object x = new object(); x = con.ShowDataInGridView("physiotherapy_plan_edit_select"); dataGridView1.DataSource = (DataTable)x; } catch (Exception ex) { MessageBox.Show(ex.Message); } //finally { con.CloseConnection(); } }
private void عرض_موظفين_تم_لهم_مكافحه_العدوي_Load(object sender, EventArgs e) { try { con.OpenConection(); con.DataReader("select_infected_Employee"); dataGridView1.DataSource = con.ShowDataInGridView("select_infected_Employee"); con.CloseConnection(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void عرض_التطعيم_Load(object sender, EventArgs e) { try { //infection_vaccinations_select con.OpenConection(); con.DataReader("infection_add_select"); dataGridView1.DataSource = con.ShowDataInGridView("infection_add_select "); con.CloseConnection(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }