private void fill_patient() { try { comboBox1.Items.Clear(); comboBox1.Text = ""; comboBox2.Items.Clear(); comboBox2.Text = ""; conn.OpenConection(); query = @"SELECT Registeration_patientRegisteration.patient_name, Registeration_patientRegisteration.patient_id FROM entranceoffice_visit INNER JOIN Registeration_patientRegisteration ON entranceoffice_visit.pat_id = Registeration_patientRegisteration.patient_id WHERE entranceoffice_visit.state_of_visit=0"; dr = conn.DataReader(query); comboBox2.Items.Add("0"); comboBox1.Items.Add("الكــــل"); while (dr.Read()) { comboBox2.Items.Add(dr[0].ToString()); comboBox1.Items.Add(dr[1].ToString()); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { conn.CloseConnection(); } }
private void Form1_Load(object sender, EventArgs e) { /* * * create procedure clinic_اعدادات_العيادات_الخارجية_clinic_hosptial_service * as * begin * select code as 'الكود', arabic_des as 'الاسم العربى' , english_des as 'الاسم الانجليزى' from hospital_service where arabic_des='ex_clinic'; * * end * create procedure clinic_search_all_select * as * begin * select Clinic_code as 'الكود', arabic_name as 'الاسم العربى' , english_name as 'الاسم الانجليزى' from Clinic; * end * * * */ //cmd.Connection = con; //da = new SqlDataAdapter("select code as 'الكود', arabic_des as 'الاسم العربى' , english_des as 'الاسم الانجليزى' from hospital_service where arabic_des='ex_clinic';select Clinic_code as 'الكود', Arabic_name as 'الاسم العربى' , English_name as 'الاسم الانجليزى' from clinic;", con); //cmd.CommandText = "select code as 'الكود', arabic_des as 'الاسم العربى' , english_des as 'الاسم الانجليزى' from service where arabic_des='ex_clinic'"; //dr = cmd.ExecuteReader(); //dt.Load(dr); //con.Open(); //da = new SqlDataAdapter("clinic_اعدادات_العيادات_الخارجية_clinic_hosptial_service", con); //da.Fill(ds); con1.OpenConection(); dr = con1.DataReader("clinic_اعدادات_العيادات_الخارجية_clinic_hosptial_service"); DataTable dt = new DataTable(); dt.Load(dr); dataGridView2.DataSource = dt; dr.Close(); con1.CloseConnection(); con1.OpenConection(); dr = con1.DataReader("clinic_search_all_select"); DataTable dt1 = new DataTable(); dt1.Load(dr); dataGridView1.DataSource = dt1; // dataGridView1.DataSource = ds.Tables[1]; // dataGridView2.DataSource = ds.Tables[0]; //dr.NextResult(); // dataGridView1.DataSource = dr[1]; /*dr.Close(); * con.Close(); * * con.Open(); * cmd.Connection = con; * cmd.CommandText = "select code as 'الكود', arabic_des as 'الاسم العربى' , english_des as 'الاسم الانجليزى' from clinic"; * dr = cmd.ExecuteReader(); * dt.Load(dr); * dataGridView1.DataSource = dt; * dr.Close();*/ con1.CloseConnection(); }
private void fill_Visit() { try { comboBox1.Items.Clear(); comboBox1.Text = ""; comboBox3.Items.Clear(); comboBox3.Text = ""; con.OpenConection(); string query = @"SELECT SLS_id, SLS_Aname FROM tb_Second_Level_Service WHERE (SLS_Service_Category = 'Physiotherapy') AND (SLS_Status = 1)"; dr = con.DataReader(query); while (dr.Read()) { comboBox3.Items.Add(dr[0].ToString()); comboBox1.Items.Add(dr[1].ToString()); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.CloseConnection(); } }
private void Case_Sheet_Load(object sender, EventArgs e) { con.OpenConection(); if (comboBox1.Items.Count > 0) { comboBox1.Items.Clear(); } textBox2.Enabled = false; // اسماء كل المرضي dr = con.DataReader("SELECT patient_name, patient_id FROM [dbo].[Registeration_patientRegisteration]"); while (dr.Read()) { comboBox1.Items.Add(dr[0].ToString()); code.Add(dr[1].ToString()); } // textBox1.Text = code[0].ToString(); ////////////// dr.Close(); /////////////////////////////////////////////////////////////////////// // اسم كل الدكاتره if (comboBox2.Items.Count > 0) { comboBox2.Items.Clear(); } dr = con.DataReader("select full_name , doc_ssn from doctors "); while (dr.Read()) { comboBox2.Items.Add(dr[0].ToString()); } dr.Close(); }
private void fill_Visit() { try { comboBox1.Items.Clear(); comboBox1.Text = ""; comboBox2.Items.Clear(); comboBox2.Text = ""; conn.OpenConection(); query = @"SELECT entranceoffice_visit.visit_id, Registeration_patientRegisteration.patient_name FROM entranceoffice_visit,Registeration_patientRegisteration WHERE entranceoffice_visit.state_of_visit=1 AND entranceoffice_visit.pat_id = Registeration_patientRegisteration.patient_id AND entranceoffice_visit.visit_id=ANY(SELECT visit_ID FROM Visit_Bill WHERE (value_payment + discount_amount) > (Visit_Bill.patient_service_amount + Visit_Bill.patient_residence_amount + Visit_Bill.patient_medicine_amount ))"; dr = conn.DataReader(query); while (dr.Read()) { comboBox2.Items.Add(dr[0].ToString()); comboBox1.Items.Add(dr[1].ToString()); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { conn.CloseConnection(); } }
private void Intial_Assessment_Load(object sender, EventArgs e) { Connection con = new Connection(); con.OpenConection(); // اسم كل الدكاتره if (comboBox2.Items.Count > 0) { comboBox2.Items.Clear(); } dr = con.DataReader("select full_name from doctors "); while (dr.Read()) { comboBox2.Items.Add(dr[0].ToString()); } dr.Close(); if (comboBox1.Items.Count > 0) { comboBox1.Items.Clear(); } // اسماء كل المرضي dr = con.DataReader("SELECT patient_name, patient_id FROM [dbo].[Registeration_patientRegisteration]"); while (dr.Read()) { comboBox1.Items.Add(dr[0].ToString()); code.Add(dr[1].ToString()); } dr.Close(); }
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(); SqlDataReader dr = con.DataReader("MedicalSheet_Special_get"); while (dr.Read()) { comboBox3.Items.Add(dr[0].ToString()); } con.CloseConnection(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void fill_Visit() { try { comboBox1.Items.Clear(); comboBox1.Text = ""; comboBox2.Items.Clear(); comboBox2.Text = ""; conn.OpenConection(); query = @"SELECT DISTINCT patient_id, patient_name FROM Registeration_patientRegisteration"; dr = conn.DataReader(query); comboBox2.Items.Add("0"); comboBox1.Items.Add("الكــــل"); while (dr.Read()) { comboBox2.Items.Add(dr[0].ToString()); comboBox1.Items.Add(dr[1].ToString()); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { conn.CloseConnection(); } }
private void fill_data() { if (VISIT_ID == "" || VISIT_ID == null) { return; } try { clear(); conn.OpenConection(); query = @"SELECT Registeration_patientRegisteration.patient_name, entranceoffice_visit.type_of_visit, entranceoffice_visit.entrance_date FROM entranceoffice_visit INNER JOIN Registeration_patientRegisteration ON entranceoffice_visit.pat_id = Registeration_patientRegisteration.patient_id WHERE entranceoffice_visit.visit_id=" + VISIT_ID + ""; dr = conn.DataReader(query); if (dr.Read()) { label6.Text = VISIT_ID; label7.Text = dr[0].ToString(); label12.Text = dr[1].ToString(); label14.Text = dr[2].ToString(); } dr.Close(); query = " SELECT (SELECT ISNULL(SUM(value),0) FROM Visit_Payment WHERE type=0 AND visit_id=" + VISIT_ID + ")-(SELECT ISNULL(SUM(value),0) FROM Visit_Payment WHERE type=1 AND visit_id=" + VISIT_ID + ")"; dr = conn.DataReader(query); if (dr.Read()) { label18.Text = dr[0].ToString(); } dr.Close(); query = @"SELECT Visit_Payment.ID,Visit_Payment.value, Visit_Payment.date, employee.name FROM employee INNER JOIN Users ON employee.emp_id = Users.emp_id INNER JOIN Visit_Payment ON Users.User_Code = Visit_Payment.User_code WHERE type=0 AND visit_id=" + VISIT_ID + ""; dr = conn.DataReader(query); dataGridView1.Rows.Clear(); while (dr.Read()) { dataGridView1.Rows.Add(dr[0], dr[1], dr[2], dr[3], "طباعة"); } dr.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { conn.CloseConnection(); } }
private void button1_Click(object sender, EventArgs e) { try { con1.OpenConection(); if (textBox5.Text == "" && textBox6.Text == "") { dr = con1.DataReader("select code as كود_الجهاز, arabic_name as الاسم_العربى from asset , asset_category where asset_category.code = asset.code and arabic_description = 'مناظير'"); dt = new DataTable(); dt.Load(dr); dataGridView1.DataSource = dt; dr.Close(); con1.CloseConnection(); } else if (textBox5.Text == "") { dr = con1.DataReader("select code as كود_الجهاز, arabic_name as الاسم_العربى from asset , asset_category where asset_category.code = asset.code and arabic_description = 'مناظير' and code = '" + (textBox6.Text) + "'"); dt = new DataTable(); dt.Load(dr); dataGridView1.DataSource = dt; dr.Close(); con1.CloseConnection(); } else if (textBox6.Text == "") { dr = con1.DataReader("select code as كود_الجهاز, arabic_name as الاسم_العربى from asset , asset_category where asset_category.code = asset.code and arabic_description = 'مناظير' and DeviceArabicName = '" + textBox5.Text + "'"); dt = new DataTable(); dt.Load(dr); dataGridView1.DataSource = dt; dr.Close(); con1.CloseConnection(); } else { //cmd.CommandText = "select code as كود_الجهاز, DeviceArabicName as الاسم_العربى, DeviceLatinName as الاسم_اللاتينى from Instruments_and_tools where DeviceArabicName = '" + textBox5.Text + "' and code = '" + (textBox6.Text) + "'"; //dr = cmd.ExecuteReader(); //select code , arabic_name , from asset , asset_category where asset_category.code = asset.code and arabic_description = 'مناظير' and DeviceArabicName = '" + textBox5.Text + "' and code = '" + (textBox6.Text) + "'" dr = con1.DataReader("select code as كود_الجهاز, arabic_name as الاسم_العربى from asset , asset_category where asset_category.code = asset.code and arabic_description = 'مناظير' and DeviceArabicName = '" + textBox5.Text + "' and code = '" + (textBox6.Text) + "'"); dt = new DataTable(); dt.Load(dr); dataGridView1.DataSource = dt; dr.Close(); con1.CloseConnection(); } } catch (Exception exp) { MessageBox.Show(exp.Message + " error"); } }
private void financial_rep_Load(object sender, EventArgs e) { if (comboBox2.Items.Count > 0) { comboBox2.Items.Clear(); } dr = con.DataReader("select name from employee "); while (dr.Read()) { comboBox2.Items.Add(dr[0].ToString()); } dr.Close(); if (comboBox3.Items.Count > 0) { comboBox3.Items.Clear(); } dr = con.DataReader("select name from employee "); while (dr.Read()) { comboBox3.Items.Add(dr[0].ToString()); } dr.Close(); if (comboBox4.Items.Count > 0) { comboBox4.Items.Clear(); } dr = con.DataReader("select name from employee "); while (dr.Read()) { comboBox4.Items.Add(dr[0].ToString()); } dr.Close(); if (comboBox1.Items.Count > 0) { comboBox1.Items.Clear(); } dr = con.DataReader("select name from employee "); while (dr.Read()) { comboBox1.Items.Add(dr[0].ToString()); } dr.Close(); }
private void Request_a_mealForm_Load(object sender, EventArgs e) { rbPatient.Focus(); try { c.OpenConection(); SqlDataReader dr = c.DataReader("select account_number from entranceoffice_internalpatient "); while (dr.Read()) { cb_account_number.Items.Add(dr["account_number"].ToString()); } c.CloseConnection(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void fill_Visit1() { try { comboBox1.Items.Clear(); comboBox1.Text = ""; comboBox3.Items.Clear(); comboBox3.Text = ""; con.OpenConection(); string query = @"SELECT Device_code, Arabic_name FROM dbo.physiotherapy_Devices"; dr = con.DataReader(query); while (dr.Read()) { comboBox3.Items.Add(dr[0].ToString()); comboBox1.Items.Add(dr[1].ToString()); } } 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.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 get_percentage() { try { query = @"SELECT (patient_medicine_amount/total_medicine*100) FROM Visit_Bill WHERE visit_ID=" + VISIT_ID + ""; dr = conn.DataReader(query); if (dr.Read()) { discount_percentage = Convert.ToInt32(dr[0].ToString()); } dr.Close(); } catch { } }
private void Form1_Load(object sender, EventArgs e) { /*create procedure clinic_خدمات_doctor_select * as * begin * select degree from doctor * end */ // class_con.OpenConection(); //class_con.ExecuteQueries("clinic_خدمات_doctor_select"); // da = new SqlDataAdapter("clinic_خدمات_doctor_select", con); // da = new SqlDataAdapter("select degree from doctor;", con); // da.Fill(ds); con1.OpenConection(); dr = con1.DataReader("clinic_خدمات_doctor_select"); DataTable dt = new DataTable(); //dt = ds.Tables[0]; dt.Load(dr); for (int i = 0; i < dt.Rows.Count; i++) { if (!comboBox2.Items.Contains(dt.Rows[i][0])) { comboBox2.Items.Add(dt.Rows[i][0].ToString()); } } con1.CloseConnection(); }
private void fill_data() { if (VISIT_ID == "" || VISIT_ID == null) { return; } try { conn.OpenConection(); query = @"SELECT Registeration_patientRegisteration.patient_name, entranceoffice_visit.type_of_visit, entranceoffice_visit.entrance_date FROM entranceoffice_visit INNER JOIN Registeration_patientRegisteration ON entranceoffice_visit.pat_id = Registeration_patientRegisteration.patient_id WHERE entranceoffice_visit.visit_id=" + VISIT_ID + ""; dr = conn.DataReader(query); if (dr.Read()) { label6.Text = VISIT_ID; label7.Text = dr[0].ToString(); label12.Text = dr[1].ToString(); label14.Text = dr[2].ToString(); } dr.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { conn.CloseConnection(); } }
private void fill_employee() { try { comboBox1.Items.Clear(); comboBox1.Text = ""; comboBox2.Items.Clear(); comboBox2.Text = ""; con.OpenConection(); string query = @"SELECT applicant_id, applicant_name FROM applicant_data"; SqlDataReader dr = con.DataReader(query); while (dr.Read()) { comboBox2.Items.Add(dr[0].ToString()); comboBox1.Items.Add(dr[1].ToString()); } } 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; try { con.OpenConection(); con.DataReader("users_select_User_Code_AND_User_Name"); dataGridView1.DataSource = con.ShowDataInGridView("users_select_User_Code_AND_User_Name"); con.CloseConnection(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void العيادة_الخارجية_Load(object sender, EventArgs e) { //con = new SqlConnection("server=localhost;database=graduationDB;uid=root;pwd=root"); //con.Open(); //cmd = new SqlCommand("select Clinic_code as كود_العيادة ,Arabic_name as الاسم_العربي ,English_name as الاسم_الانجليزي from Clinic;", con); //cmd = new SqlCommand(); //cmd.Connection = con; //cmd.CommandText = "clinic_select"; //cmd.CommandType = CommandType.StoredProcedure; //dr = cmd.ExecuteReader(); /* * create procedure clinic_select * as * begin * select Clinic_code as 'كود_العيادة' ,Arabic_name as 'الاسم_العربي' ,English_name as 'الاسم_الانجليزي' from Clinic * end * */ con1.OpenConection(); dr = con1.DataReader("clinic_select"); dt = new DataTable(); dt.Load(dr); dataGridView1.DataSource = dt; }
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(); try { con.DataReader("MedicalSheet_BodyComponent_select"); dataGridView1.DataSource = con.ShowDataInGridView("MedicalSheet_BodyComponent_select"); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } con.CloseConnection(); }
private void button1_Click(object sender, EventArgs e) { /* * * create procedure clinic_التخصصات_الطبية_speciality_select * as * begin * select code as 'الكود', arabic_des as 'الاسم العربى' , latini_des as 'الاسم اللاتينى' from speciality * end * * */ //con.Open(); // cmd.Connection = con; // // cmd.CommandText = "select code as 'الكود', arabic_des as 'الاسم العربى' , latini_des as 'الاسم اللاتينى' from speciality"; // cmd.CommandText = "clinic_التخصصات_الطبية_speciality_select"; // cmd.CommandType = CommandType.StoredProcedure; // dr = cmd.ExecuteReader(); con1.OpenConection(); dr = con1.DataReader("clinic_التخصصات_الطبية_speciality_select"); dt.Load(dr); dataGridView2.DataSource = dt; dr.Close(); con1.CloseConnection(); }
private void Form2_Load(object sender, EventArgs e) { //create procedure clinic_اضافه_عياده_speciality // as // begin // select arabic_des from speciality // end //da = new SqlDataAdapter("select arabic_des from speciality;", con); //da.Fill(ds); //dt = ds.Tables[0]; con1.OpenConection(); dr = con1.DataReader("clinic_اضافه_عياده_speciality"); DataTable dt = new DataTable(); dt.Load(dr); for (int i = 0; i < dt.Rows.Count; i++) { if (!comboBox2.Items.Contains(dt.Rows[i][0])) { comboBox2.Items.Add(dt.Rows[i][0].ToString()); } } dr.Close(); con1.CloseConnection(); }
void showlist() { try { /*create procedure setescope_Endoscope_room_select * as * begin * select RoomCode as 'الكود',ArabicName as 'الوصف العربي' from Endoscope_room; * end * */ con.OpenConection(); SqlDataReader dr = con.DataReader("setescope_Endoscope_room_select"); while (dr.Read()) { string a_name = dr["ArabicName"].ToString(); comboBox2.Items.Add(a_name); } dr.Close(); con.CloseConnection(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void الطبيب_Load(object sender, EventArgs e) { // //con = new SqlConnection("server=localhost;database=graduationDB;uid=root;pwd=root"); //// con.Open(); // //cmd = new SqlCommand("select doctor_id as كود_الطبيب ,doc_name as اسم_الدكتور ,specialization as التخصص from doctor;", con); // cmd = new SqlCommand(); // cmd.Connection = con; //cmd.CommandText = "clinic_Doctor_select"; //cmd.CommandType = CommandType.StoredProcedure; /* * create procedure clinic_Doctor_select * as * begin * select doctor_id ,doc_name ,specialization from doctor; * end * */ con1.OpenConection(); dr = con1.DataReader("clinic_Doctor_select"); dt = new DataTable(); dt.Load(dr); dataGridView1.DataSource = dt; con1.CloseConnection(); }
void showlist() { try { //con=new SqlConnection(@"server=.\SQLEXPRESS;database=manal;Integrated Security=true;"); con.OpenConection(); SqlDataReader dr = con.DataReader("setescope_rooms_select"); //cmd = new SqlCommand("setescope_Endoscope_room_select", con); //cmd.CommandType = CommandType.StoredProcedure; //dr = cmd.ExecuteReader(); while (dr.Read()) { string a_name = dr[1].ToString(); comboBox2.Items.Add(a_name); } dr.Close(); con.CloseConnection(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
//**************************************الاضافة******************************************************************* private void btn_add_Click(object sender, EventArgs e) { try { con1.OpenConection(); SqlDataReader dr; //****************** check empty fields************************* if (txtId.Text == "" || txtarb_des.Text == "" || txteng_des.Text == "") { MessageBox.Show("بعض الحقول فارغة الرجاء اعادة المحاولة"); txtId.Text = ""; txtarb_des.Text = ""; txteng_des.Text = ""; cb_patientstatus.Text = ""; cb_type.Text = ""; chb_defualt.Checked = false; } //**********************check dublicated ID********************* else { con1.OpenConection(); dr = (SqlDataReader)con1.DataReader("select Id from reasons_of_exit where Id=" + txtId.Text); if (dr.HasRows) { MessageBox.Show(" هذا الكود موجود بالفعل حاول مرة اخرى"); txtId.Text = ""; txtarb_des.Text = ""; txteng_des.Text = ""; cb_patientstatus.Text = ""; cb_type.Text = ""; chb_defualt.Checked = false; } //**********************insert into database**************** else { dr.Close(); string[] paramname = new string[] { "@param1", "@param2", "@param3", "@param4", "@param5", "@param6" }; string[] paramvalue = new string[] { txtId.Text, txtarb_des.Text, txteng_des.Text, cb_patientstatus.Text, cb_type.Text, chb_defualt.Checked.ToString() }; SqlDbType[] paramtype = new SqlDbType[] { SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.Bit }; con1.ExecuteInsertOrUpdateOrDeleteUsingStoredProc("addingreasons_of_exit1", paramname, paramvalue, paramtype); txtId.Text = ""; txtarb_des.Text = ""; txteng_des.Text = ""; cb_patientstatus.Text = ""; cb_type.Text = ""; chb_defualt.Checked = false; dis_data(); MessageBox.Show("تمت الاضافة"); } } } catch (Exception ee) { MessageBox.Show(ee.Message); } }
private void مخزن_مستلزمات_Load(object sender, EventArgs e) { try { con1.OpenConection(); dr = con1.DataReader("select category_id , categoryName from Inventory_categories"); dt = new DataTable(); dt.Load(dr); dataGridView1.DataSource = dt; dr.Close(); } catch (Exception exp) { MessageBox.Show(exp.Message + " error"); } con1.CloseConnection(); }
public void showdi(ref string code, string query, string tit) { _title.Text = tit; conn.OpenConection(); DataTable dt = new DataTable(); SqlDataReader dr = conn.DataReader(query); dt.Load(dr); dataGridView1.DataSource = dt; conn.CloseConnection(); this.ShowDialog(); if (str1 != "") { code = str1; } }
private void button2_Click(object sender, EventArgs e) { Connection con = new Connection(); con.OpenConection(); dr.Close(); dr = con.DataReader(" select * from initial_assessment where inventry_id= '" + textBox45.Text + "' and doc_code= '" + textBox46.Text + "' and intial_assesment_date = '" + dateTimePicker1.Value.ToString("yyyy-MM-dd") + "' "); while (dr.Read()) { textBox45.Text = dr[1].ToString(); // "@initial_assessment_date" , textBox46.Text = dr[2].ToString(); // "@doc_code" , // weight , textBox15.Text = dr[3].ToString(); // head textBox1.Text = dr[4].ToString(); textBox14.Text = dr[5].ToString(); // length textBox2.Text = dr[6].ToString(); // "@patient_id" , textBox7.Text = dr[7].ToString(); // "@general_apperance_age" , textBox8.Text = dr[8].ToString(); // "@general_apperance_conscious_level" , textBox3.Text = dr[9].ToString(); // "@general_apperance_glass_coma_score" , textBox4.Text = dr[10].ToString(); // "@general_apperance_h_r" , textBox6.Text = dr[11].ToString(); // "@general_apperance_r_r" , textBox5.Text = dr[12].ToString(); // "@general_apperance_tempreture" , textBox17.Text = dr[13].ToString(); // "@general_apperance_blood_pressure" , textBox16.Text = dr[14].ToString(); // "@general_apperance_color" , textBox11.Text = dr[15].ToString(); // "@general_apperance_turgor", textBox9.Text = dr[16].ToString(); // "@general_apperance_eruption" , textBox10.Text = dr[17].ToString(); // "@head_neck_fascies" , textBox18.Text = dr[18].ToString(); // "@head_neck_eyes" , textBox12.Text = dr[19].ToString(); // "@head_neck_mouth_tongue" , textBox13.Text = dr[20].ToString(); // "@head_neck_pharynx" , textBox19.Text = dr[21].ToString(); // "@head_neck_lymph_nodes" , textBox40.Text = dr[22].ToString(); // "@head_neck_oters" , textBox29.Text = dr[23].ToString(); // "@heart_precordial_bulge" , textBox27.Text = dr[24].ToString(); // "@heart_apex_beat" , textBox28.Text = dr[25].ToString(); // "@heart_thrill", textBox26.Text = dr[26].ToString(); // "@heart_heart_sound" , textBox24.Text = dr[27].ToString(); // "@heart_murmurs", textBox25.Text = dr[28].ToString(); // "@heart_others" , textBox21.Text = dr[29].ToString(); // "@chest_shape" , textBox22.Text = dr[30].ToString(); // "@chest_movement" , textBox20.Text = dr[31].ToString(); textBox23.Text = dr[32].ToString(); // "@chest_reactions" , textBox39.Text = dr[33].ToString(); // "@chest_air_entry" , textBox37.Text = dr[34].ToString(); // "@chest_breath_sounds" , textBox38.Text = dr[35].ToString(); // "@chest_adventure_sounds" , textBox36.Text = dr[36].ToString(); // "@abdomen_liver", textBox34.Text = dr[37].ToString(); // "@abdomen_spleen" , textBox35.Text = dr[38].ToString(); // "@abdomen_kidneys" , textBox33.Text = dr[39].ToString(); // "@abdomen_ascites" , textBox31.Text = dr[40].ToString(); // "@abdomen_others" , textBox32.Text = dr[41].ToString(); // "@back_spine_deformity" , textBox30.Text = dr[42].ToString(); // "@back_spine_sweling" , textBox43.Text = dr[43].ToString(); // "@neurological_examination_mentality" , textBox44.Text = dr[44].ToString(); textBox42.Text = dr[45].ToString(); textBox41.Text = dr[46].ToString(); } }