private void deleteLesson_Click(object sender, EventArgs e) { cSQL cS = new cSQL(); List <Tuple <string, string, SqlDbType, int> > sParameters = new List <Tuple <string, string, SqlDbType, int> >(); try { int selectedrowindex = dataGridView1.SelectedCells[0].RowIndex; DataGridViewRow selectedRow = dataGridView1.Rows[selectedrowindex]; sParameters.Add(new Tuple <string, string, SqlDbType, int>("iID", selectedRow.Cells[0].Value.ToString(), SqlDbType.Int, -1)); if (cS.CallProcedure("DELETE_LESSON", sParameters)) { LoadDataset(); } } catch (Exception ee) { MessageBox.Show(ee.Message); } finally { cS = null; sParameters.Clear(); sParameters = null; } }
public void LoadDataset() { cSQL cS = new cSQL(); try { dataGridView1.DataSource = cS.CallProcedure("GET_LESSON", null, false, true); } catch (Exception ee) { MessageBox.Show(ee.Message); } finally { cS = null; } }
public void LoadLesson() { cSQL cS = new cSQL(); DataTable dt = new DataTable(); try { dt = cS.CallProcedure("GET_LESSON_ONLY_CODE", null, false, true); foreach (DataRow row in dt.Rows) { comboBox1.Items.Add(row[0].ToString()); } } catch (Exception ee) { MessageBox.Show(ee.Message); } finally { cS = null; } }
private void button_export_Click(object sender, EventArgs e) { cSQL cS = new cSQL(); DataTable dt = new DataTable(); List <Tuple <string, string, SqlDbType, int> > sParameters = new List <Tuple <string, string, SqlDbType, int> >(); try { List <string> Columns = new List <string>(); if (!this.isEnglish) { Columns.Add("ID : "); Columns.Add("Dersin Adı : "); Columns.Add("Kodu : "); Columns.Add("Yarıyıl : "); Columns.Add("Teori(saat / hafta : "); Columns.Add("Uygulama/Lab(saat / hafta) : "); Columns.Add("Yerel Kredi : "); Columns.Add("AKTS : "); Columns.Add("Ön-Koşul(lar) : "); Columns.Add("Dersin Dili : "); Columns.Add("Dersin Türü : "); Columns.Add("Dersin Düzeyi : "); Columns.Add("Dersin Koordinatörü : "); Columns.Add("Öğretim Eleman(lar)ı : "); Columns.Add("Yardımcı(ları) : "); Columns.Add("Dersin Amacı : "); Columns.Add("Öğrenme Çıktıları : "); Columns.Add("Ders Tanımı : "); Columns.Add("Dersin Kategorisi : "); Columns.Add("1. Hafta Konusu : "); Columns.Add("1. Hafta Ön Hazırlık : "); Columns.Add("2. Hafta Konusu : "); Columns.Add("2. Hafta Ön Hazırlık : "); Columns.Add("3. Hafta Konusu : "); Columns.Add("3. Hafta Ön Hazırlık : "); Columns.Add("4. Hafta Konusu : "); Columns.Add("4. Hafta Ön Hazırlık : "); Columns.Add("5. Hafta Konusu : "); Columns.Add("5. Hafta Ön Hazırlık : "); Columns.Add("6. Hafta Konusu : "); Columns.Add("6. Hafta Ön Hazırlık : "); Columns.Add("7. Hafta Konusu : "); Columns.Add("7. Hafta Ön Hazırlık : "); Columns.Add("8. Hafta Konusu : "); Columns.Add("8. Hafta Ön Hazırlık : "); Columns.Add("9. Hafta Konusu : "); Columns.Add("9. Hafta Ön Hazırlık : "); Columns.Add("10. Hafta Konusu : "); Columns.Add("10. Hafta Ön Hazırlık : "); Columns.Add("11. Hafta Konusu : "); Columns.Add("11. Hafta Ön Hazırlık : "); Columns.Add("12. Hafta Konusu : "); Columns.Add("12. Hafta Ön Hazırlık : "); Columns.Add("13. Hafta Konusu : "); Columns.Add("13. Hafta Ön Hazırlık : "); Columns.Add("14. Hafta Konusu : "); Columns.Add("14. Hafta Ön Hazırlık : "); Columns.Add("15. Hafta Konusu : "); Columns.Add("15. Hafta Ön Hazırlık : "); Columns.Add("16. Hafta Konusu : "); Columns.Add("16. Hafta Ön Hazırlık : "); Columns.Add("Dersin Kitabı : "); Columns.Add("Önerilen Okumalar/Materyaller : "); Columns.Add("Katılım Sayısı : "); Columns.Add("Katılım Katkı Payı : "); Columns.Add("Laboratuvar / Uygulama Sayısı : "); Columns.Add("Laboratuvar / Uygulama Katkı Payı : "); Columns.Add("Arazi Çalışması Sayısı : "); Columns.Add("Arazi Çalışması Katkı Payı : "); Columns.Add("Küçük Sınav / Stüdyo Kritiği Sayısı : "); Columns.Add("Küçük Sınav / Stüdyo Kritiği Katkı Payı : "); Columns.Add("Ödev Sayısı : "); Columns.Add("Ödev Katkı Payı : "); Columns.Add("Sunum / Jüri Önünde Sunum Sayısı : "); Columns.Add("Sunum / Jüri Önünde Sunum Katkı Payı : "); Columns.Add("Proje Sayısı : "); Columns.Add("Proje Katkı Payı : "); Columns.Add("Seminer/Çalıştay Sayısı : "); Columns.Add("Seminer/Çalıştay Katkı Payı : "); Columns.Add("Sözlü Sınav Sayısı : "); Columns.Add("Sözlü Sınav Katkı Payı : "); Columns.Add("Ara Sınav Sayısı : "); Columns.Add("Ara Sınav Katkı Payı : "); Columns.Add("Final Sınavı Sayısı : "); Columns.Add("Final Sınavı Katkı Payı : "); Columns.Add("Teorik Ders Sayısı : "); Columns.Add("Teorik Ders Süre(saat) : "); Columns.Add("Teorik Ders İş Yükü(saat) : "); Columns.Add("Laboratuvar / Uygulama Ders Sayısı : "); Columns.Add("Laboratuvar / Uygulama Ders Süre(saat) : "); Columns.Add("Laboratuvar / Uygulama Ders İş Yükü(saat) : "); Columns.Add("Sınıf Dışı Ders Sayısı : "); Columns.Add("Sınıf Dışı Ders Süre(saat) : "); Columns.Add("Sınıf Dışı Ders İş Yükü(saat) : "); Columns.Add("Arazi Çalışması Sayısı : "); Columns.Add("Arazi Çalışması Süre(saat) : "); Columns.Add("Arazi Çalışması İş Yükü(saat) : "); Columns.Add("Küçük Sınav / Stüdyo Kritiği Sayısı : "); Columns.Add("Küçük Sınav / Stüdyo Kritiği Süre(saat) : "); Columns.Add("Küçük Sınav / Stüdyo Kritiği İş Yükü(saat) : "); Columns.Add("Ödev Sayısı : "); Columns.Add("Ödev Süre(saat) : "); Columns.Add("Ödev İş Yükü(saat) : "); Columns.Add("Sunum / Jüri Önünde Sunum Sayısı : "); Columns.Add("Sunum / Jüri Önünde Sunum Süre(saat) : "); Columns.Add("Sunum / Jüri Önünde Sunum İş Yükü(saat) : "); Columns.Add("Proje Sayısı : "); Columns.Add("Proje Süre(saat) : "); Columns.Add("Proje İş Yükü(saat) : "); Columns.Add("Seminer/Çalıştay Sayısı : "); Columns.Add("Seminer/Çalıştay Süre(saat) : "); Columns.Add("Seminer/Çalıştay İş Yükü(saat) : "); Columns.Add("Sözlü Sınav Sayısı : "); Columns.Add("Sözlü Sınav Süre(saat) : "); Columns.Add("Sözlü Sınav İş Yükü(saat) : "); Columns.Add("Ara Sınavlar Sayısı : "); Columns.Add("Ara Sınavlar Süre(saat) : "); Columns.Add("Ara Sınavlar İş Yükü(saat) : "); Columns.Add("Final Sınavı Sayısı : "); Columns.Add("Final Sınavı Süre(saat) : "); Columns.Add("Final Sınavı İş Yükü(saat) : "); Columns.Add("1 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("1- Katkı Düzeyi : "); Columns.Add("2 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("2- Katkı Düzeyi : "); Columns.Add("3 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("3- Katkı Düzeyi : "); Columns.Add("4 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("4- Katkı Düzeyi : "); Columns.Add("5 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("5- Katkı Düzeyi : "); Columns.Add("6 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("6- Katkı Düzeyi : "); Columns.Add("7 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("7- Katkı Düzeyi : "); Columns.Add("8 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("8- Katkı Düzeyi : "); Columns.Add("9 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("9- Katkı Düzeyi : "); Columns.Add("10 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("10- Katkı Düzeyi : "); Columns.Add("11 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("11- Katkı Düzeyi : "); Columns.Add("12 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("12- Katkı Düzeyi : "); Columns.Add("13 - Program Yeterlilikleri / Çıktıları : "); Columns.Add("13- Katkı Düzeyi : "); } else { Columns.Add("ID : "); Columns.Add("Course Name : "); Columns.Add("Code : "); Columns.Add("Semester : "); Columns.Add("Theory(hour / week) : "); Columns.Add("Application/Lab(hour / week) : "); Columns.Add("Local Credits : "); Columns.Add("ECTS : "); Columns.Add("Prerequisites : "); Columns.Add("Course Language : "); Columns.Add("Course Type : "); Columns.Add("Course Level : "); Columns.Add("Course Coordinator : "); Columns.Add("Course Lecturer(s) : "); Columns.Add("Assistant(s) : "); Columns.Add("Course Objectives : "); Columns.Add("Learning Outcomes : "); Columns.Add("Course Description : "); Columns.Add("Course Category : "); Columns.Add("1. Week Subjects : "); Columns.Add("1. Week Ön Related Preparation : "); Columns.Add("2. Week Subjects : "); Columns.Add("2. Week Ön Related Preparation : "); Columns.Add("3. Week Subjects : "); Columns.Add("3. Week Ön Related Preparation : "); Columns.Add("4. Week Subjects : "); Columns.Add("4. Week Ön Related Preparation : "); Columns.Add("5. Week Subjects : "); Columns.Add("5. Week Ön Related Preparation : "); Columns.Add("6. Week Subjects : "); Columns.Add("6. Week Ön Related Preparation : "); Columns.Add("7. Week Subjects : "); Columns.Add("7. Week Ön Related Preparation : "); Columns.Add("8. Week Subjects : "); Columns.Add("8. Week Ön Related Preparation : "); Columns.Add("9. Week Subjects : "); Columns.Add("9. Week Ön Related Preparation : "); Columns.Add("10. Week Subjects : "); Columns.Add("10. Week Ön Related Preparation : "); Columns.Add("11. Week Subjects : "); Columns.Add("11. Week Ön Related Preparation : "); Columns.Add("12. Week Subjects : "); Columns.Add("12. Week Ön Related Preparation : "); Columns.Add("13. Week Subjects : "); Columns.Add("13. Week Ön Related Preparation : "); Columns.Add("14. Week Subjects : "); Columns.Add("14. Week Ön Related Preparation : "); Columns.Add("15. Week Subjects : "); Columns.Add("15. Week Ön Related Preparation : "); Columns.Add("16. Week Subjects : "); Columns.Add("16. Week Ön Related Preparation : "); Columns.Add("Course Notes/Textbooks : "); Columns.Add("Suggested Readings/Materials : "); Columns.Add("Participation Number : "); Columns.Add("Participation Weigthing : "); Columns.Add("Laboratory / Application Number : "); Columns.Add("Laboratory / Application Weigthing : "); Columns.Add("Field Work Number : "); Columns.Add("Field Work Weigthing : "); Columns.Add("Quizzes / Studio Critiques Number : "); Columns.Add("Quizzes / Studio Critiques Weigthing : "); Columns.Add("Homework / Assignments Number : "); Columns.Add("Homework / Assignments Weigthing : "); Columns.Add("Presentation / Jury Number : "); Columns.Add("Presentation / Jury Weigthing : "); Columns.Add("Project Number : "); Columns.Add("Project Weigthing : "); Columns.Add("Seminar / Workshop Number : "); Columns.Add("Seminar / Workshop Weigthing : "); Columns.Add("Oral Exams Number : "); Columns.Add("Oral Exams Weigthing : "); Columns.Add("Midterm Number : "); Columns.Add("Midterm Weigthing : "); Columns.Add("Final Exam Number : "); Columns.Add("Final Exam Weigthing : "); Columns.Add("Theoretical Course Number : "); Columns.Add("Theoretical Course Duration (Hours) : "); Columns.Add("Theoretical Course Workload : "); Columns.Add("Laboratory / Application Number : "); Columns.Add("Laboratory / Application (Hours) : "); Columns.Add("Laboratory / Application Workload : "); Columns.Add("Study Hours Out of Class Number : "); Columns.Add("Study Hours Out of Class Duration (Hours) : "); Columns.Add("Study Hours Out of Class Workload : "); Columns.Add("Field Work Number : "); Columns.Add("Field Work Duration (Hours) : "); Columns.Add("Field Work Workload : "); Columns.Add("Quizzes / Studio Critiques Number : "); Columns.Add("Quizzes / Studio Critiques Duration (Hours) : "); Columns.Add("Quizzes / Studio Critiques Workload : "); Columns.Add("Homework / Assignments Number : "); Columns.Add("Homework / Assignments Duration (Hours) : "); Columns.Add("Homework / Assignments Workload : "); Columns.Add("Presentation / Jury Number : "); Columns.Add("Presentation / Jury Duration (Hours) : "); Columns.Add("Presentation / Jury Workload : "); Columns.Add("Project Number : "); Columns.Add("Project Duration (Hours) : "); Columns.Add("Project Workload : "); Columns.Add("Seminar / Workshop Number : "); Columns.Add("Seminar / Workshop Duration (Hours) : "); Columns.Add("Seminar / Workshop Workload : "); Columns.Add("Oral Exam Number : "); Columns.Add("Oral Exam Duration (Hours) : "); Columns.Add("Oral Exam Workload : "); Columns.Add("Midterms Number : "); Columns.Add("Midterms Duration (Hours) : "); Columns.Add("Midterms Workload : "); Columns.Add("Final Exam Number : "); Columns.Add("Final Exam Duration (Hours) : "); Columns.Add("Final Exam Workload : "); Columns.Add("1 - Program Competencies/Outcomes : "); Columns.Add("1 - Contribution Level : "); Columns.Add("2 - Program Competencies/Outcomes : "); Columns.Add("2 - Contribution Level : "); Columns.Add("3 - Program Competencies/Outcomes : "); Columns.Add("3 - Contribution Level : "); Columns.Add("4 - Program Competencies/Outcomes : "); Columns.Add("4- Contribution Level : "); Columns.Add("5 - Program Competencies/Outcomes : "); Columns.Add("5 - Contribution Level : "); Columns.Add("6 - Program Competencies/Outcomes : "); Columns.Add("6- Contribution Level : "); Columns.Add("7 - Program Competencies/Outcomes : "); Columns.Add("7 - Contribution Level : "); Columns.Add("8 - Program Competencies/Outcomes : "); Columns.Add("8 - Contribution Level : "); Columns.Add("9 - Program Competencies/Outcomes : "); Columns.Add("9 - Contribution Level : "); Columns.Add("10 - Program Competencies/Outcomes : "); Columns.Add("10 - Contribution Level : "); Columns.Add("11 - Program Competencies/Outcomes : "); Columns.Add("11 - Contribution Level : "); Columns.Add("12 - Program Competencies/Outcomes : "); Columns.Add("12 - Contribution Level : "); Columns.Add("13 - Program Competencies/Outcomes : "); Columns.Add("13 - Contribution Level : "); } sParameters.Add(new Tuple <string, string, SqlDbType, int>("Code", comboBox1.SelectedItem.ToString(), SqlDbType.VarChar, -1)); dt = cS.CallProcedure("GET_LESSON_WITH_CODE", sParameters, false, true); string html = "<table>"; for (int j = 0; j < dt.Columns.Count; j++) { html += "<tr>"; html += "<td>" + Columns.ElementAt(j) + dt.Rows[0][j].ToString() + "</td>"; html += "</tr>"; } html += "</table>"; string path = Directory.GetCurrentDirectory() + "/test.html"; File.WriteAllText(path, html); System.Diagnostics.Process.Start(path); } catch (Exception ee) { MessageBox.Show(ee.Message); } finally { cS = null; }; }
private void button_import_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(textBox1.Text) || string.IsNullOrEmpty(textBox2.Text) || string.IsNullOrEmpty(textBox3.Text)) { return; } cSQL cS = new cSQL(); List <Tuple <string, string, SqlDbType, int> > sParameters = new List <Tuple <string, string, SqlDbType, int> >(); try { Uri url = new Uri(textBox1.Text); HTML html = new HTML(url); List <string> data = html.GetData(); sParameters.Add(new Tuple <string, string, SqlDbType, int>("sLessonName", textBox2.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Code", textBox3.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Semester", data[0], SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Theory", data[1], SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Application", data[2], SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Credits", data[3], SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("ECTS", data[4], SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Prerequisites", data[5], SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Language", data[6], SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Type", data[7], SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Level", data[8], SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Coordinator", data[9], SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Lecturer", "-", SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Assistant", "-", SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Objectives", "-", SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes", "-", SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Description", "-", SqlDbType.VarChar, -1)); if (this.isEnglish) { DialogResult dialog = new DialogResult(); dialog = MessageBox.Show("Do you approve course enrollment?", "CONFIRMATION", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialog == DialogResult.Yes) { if (cS.CallProcedure("ADD_LESSON_FROM_HTML", sParameters, true) == 1) { MessageBox.Show("Course registration successfully created", "SUCCES", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Error encountered while creating lecture record", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } else { DialogResult dialog = new DialogResult(); dialog = MessageBox.Show("Ders kaydını onaylıyor musunuz ?", "ONAY", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialog == DialogResult.Yes) { if (cS.CallProcedure("ADD_LESSON_FROM_HTML", sParameters, true) == 1) { MessageBox.Show("Ders kaydı başarıyla oluşturuldu", "BAŞARILI", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Ders kaydı oluştururken hata ile karşılaşıldı", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } } catch (Exception ee) { MessageBox.Show(ee.Message); } finally { cS = null; sParameters.Clear(); sParameters = null; } }
public void FieldBox(int iID) { cSQL cS = new cSQL(); DataTable dt = new DataTable(); List <Tuple <string, string, SqlDbType, int> > sParameters = new List <Tuple <string, string, SqlDbType, int> >(); try { sParameters.Add(new Tuple <string, string, SqlDbType, int>("iID", iID.ToString(), SqlDbType.Int, -1)); dt = cS.CallProcedure("GET_LESSON_FOR_UPDATE", sParameters, false, true); textBox1.Text = dt.Rows[0]["sLessonName"].ToString(); textBox7.Text = dt.Rows[0]["Code"].ToString(); textBox5.Text = dt.Rows[0]["Semester"].ToString(); textBox6.Text = dt.Rows[0]["Theory"].ToString(); textBox4.Text = dt.Rows[0]["Application"].ToString(); textBox2.Text = dt.Rows[0]["Credits"].ToString(); textBox3.Text = dt.Rows[0]["ECTS"].ToString(); textBox9.Text = dt.Rows[0]["Prerequisites"].ToString(); textBox8.Text = dt.Rows[0]["Language"].ToString(); textBox10.Text = dt.Rows[0]["Type"].ToString(); textBox12.Text = dt.Rows[0]["Level"].ToString(); textBox11.Text = dt.Rows[0]["Coordinator"].ToString(); textBox13.Text = dt.Rows[0]["Lecturer"].ToString(); textBox14.Text = dt.Rows[0]["Assistant"].ToString(); richTextBox1.Text = dt.Rows[0]["Objectives"].ToString(); richTextBox2.Text = dt.Rows[0]["Outcomes"].ToString(); richTextBox3.Text = dt.Rows[0]["Description"].ToString(); string temp = string.Empty; temp = dt.Rows[0]["CoreCoursesChecked"].ToString(); if (string.Equals(temp, CoreCourses.Text)) { checkBox1.Checked = true; } if (string.Equals(temp, MajorAreaCourses.Text)) { checkBox2.Checked = true; } if (string.Equals(temp, SupportiveCourses.Text)) { checkBox3.Checked = true; } if (string.Equals(temp, MediaandManagementSkillsCourses.Text)) { checkBox4.Checked = true; } if (string.Equals(temp, TransferableSkillCourses.Text)) { checkBox5.Checked = true; } textBox15.Text = dt.Rows[0]["week_1_Related"].ToString(); textBox31.Text = dt.Rows[0]["week_1_Subjects"].ToString(); textBox19.Text = dt.Rows[0]["week_2_Subjects"].ToString(); textBox32.Text = dt.Rows[0]["week_2_Related"].ToString(); textBox17.Text = dt.Rows[0]["week_3_Subjects"].ToString(); textBox33.Text = dt.Rows[0]["week_3_Related"].ToString(); textBox16.Text = dt.Rows[0]["week_4_Subjects"].ToString(); textBox34.Text = dt.Rows[0]["week_4_Related"].ToString(); textBox20.Text = dt.Rows[0]["week_5_Subjects"].ToString(); textBox35.Text = dt.Rows[0]["week_5_Related"].ToString(); textBox21.Text = dt.Rows[0]["week_6_Subjects"].ToString(); textBox36.Text = dt.Rows[0]["week_6_Related"].ToString(); textBox24.Text = dt.Rows[0]["week_7_Subjects"].ToString(); textBox37.Text = dt.Rows[0]["week_7_Related"].ToString(); textBox25.Text = dt.Rows[0]["week_8_Subjects"].ToString(); textBox38.Text = dt.Rows[0]["week_8_Related"].ToString(); textBox22.Text = dt.Rows[0]["week_9_Subjects"].ToString(); textBox39.Text = dt.Rows[0]["week_9_Related"].ToString(); textBox18.Text = dt.Rows[0]["week_10_Subjects"].ToString(); textBox40.Text = dt.Rows[0]["week_10_Related"].ToString(); textBox23.Text = dt.Rows[0]["week_11_Subjects"].ToString(); textBox41.Text = dt.Rows[0]["week_11_Related"].ToString(); textBox26.Text = dt.Rows[0]["week_12_Subjects"].ToString(); textBox42.Text = dt.Rows[0]["week_12_Related"].ToString(); textBox27.Text = dt.Rows[0]["week_13_Subjects"].ToString(); textBox43.Text = dt.Rows[0]["week_13_Related"].ToString(); textBox30.Text = dt.Rows[0]["week_14_Subjects"].ToString(); textBox44.Text = dt.Rows[0]["week_14_Related"].ToString(); textBox28.Text = dt.Rows[0]["week_15_Subjects"].ToString(); textBox45.Text = dt.Rows[0]["week_15_Related"].ToString(); textBox29.Text = dt.Rows[0]["week_16_Subjects"].ToString(); textBox46.Text = dt.Rows[0]["week_16_Related"].ToString(); richTextBox6.Text = dt.Rows[0]["Textbooks"].ToString(); richTextBox5.Text = dt.Rows[0]["Materials"].ToString(); textBox78.Text = dt.Rows[0]["Participation_Number"].ToString(); textBox62.Text = dt.Rows[0]["Participation_Weight"].ToString(); textBox74.Text = dt.Rows[0]["Laboratory_Applicationxtbooks_Number"].ToString(); textBox61.Text = dt.Rows[0]["Laboratory_Applicationxtbooks_Weight"].ToString(); textBox76.Text = dt.Rows[0]["FieldWork_Number"].ToString(); textBox60.Text = dt.Rows[0]["FieldWork_Weight"].ToString(); textBox77.Text = dt.Rows[0]["Quizzes_StudioCritiques_Number"].ToString(); textBox59.Text = dt.Rows[0]["Quizzes_StudioCritiques_Weight"].ToString(); textBox73.Text = dt.Rows[0]["Homework_Assignments_Number"].ToString(); textBox58.Text = dt.Rows[0]["Homework_Assignments_Weight"].ToString(); textBox72.Text = dt.Rows[0]["Presentation_Jury_Number"].ToString(); textBox57.Text = dt.Rows[0]["Presentation_Jury_Weight"].ToString(); textBox69.Text = dt.Rows[0]["Project_Number"].ToString(); textBox56.Text = dt.Rows[0]["Project_Weight"].ToString(); textBox68.Text = dt.Rows[0]["Seminar_Workshop_Number"].ToString(); textBox55.Text = dt.Rows[0]["Seminar_Workshop_Weight"].ToString(); textBox71.Text = dt.Rows[0]["OralExams_Number"].ToString(); textBox54.Text = dt.Rows[0]["OralExams_Weight"].ToString(); textBox75.Text = dt.Rows[0]["Midterm_Number"].ToString(); textBox53.Text = dt.Rows[0]["Midterm_Weight"].ToString(); textBox70.Text = dt.Rows[0]["FinalExam_Number"].ToString(); textBox52.Text = dt.Rows[0]["FinalExam_Weight"].ToString(); textBox90.Text = dt.Rows[0]["TheoreticalCourseHours_Num"].ToString(); textBox79.Text = dt.Rows[0]["TheoreticalCourseHours_Duration"].ToString(); textBox93.Text = dt.Rows[0]["TheoreticalCourseHours_Workload"].ToString(); textBox86.Text = dt.Rows[0]["Laboratory_Application_Hours_Number"].ToString(); textBox67.Text = dt.Rows[0]["Laboratory_Application_Hour_Duration"].ToString(); textBox94.Text = dt.Rows[0]["Laboratory_Application_Hours_Workload"].ToString(); textBox88.Text = dt.Rows[0]["Study_Hours_Out_of_Class_Number"].ToString(); textBox66.Text = dt.Rows[0]["Study_Hours_Out_of_Class_Duration"].ToString(); textBox95.Text = dt.Rows[0]["Study_Hours_Out_of_Class_Workload"].ToString(); textBox89.Text = dt.Rows[0]["Field_Work_Number"].ToString(); textBox65.Text = dt.Rows[0]["Field_Work_Duration"].ToString(); textBox96.Text = dt.Rows[0]["Field_Work_Workload"].ToString(); textBox85.Text = dt.Rows[0]["Quizzes_Studio_Critiques_Number"].ToString(); textBox64.Text = dt.Rows[0]["Quizzes_Studio_Critiques_Duration"].ToString(); textBox97.Text = dt.Rows[0]["Quizzes_Studio_Critiques_Workload"].ToString(); textBox84.Text = dt.Rows[0]["Homework_Assignmentss_Number"].ToString(); textBox63.Text = dt.Rows[0]["Homework_Assignmentss_Duration"].ToString(); textBox98.Text = dt.Rows[0]["Homework_Assignmentss_Workload"].ToString(); textBox81.Text = dt.Rows[0]["Presentation_Juryy_Number"].ToString(); textBox51.Text = dt.Rows[0]["Presentation_Juryy_Duration"].ToString(); textBox99.Text = dt.Rows[0]["Presentation_Juryy_Workload"].ToString(); textBox80.Text = dt.Rows[0]["Projectt_Number"].ToString(); textBox50.Text = dt.Rows[0]["Projectt_Duration"].ToString(); textBox100.Text = dt.Rows[0]["Projectt_Workload"].ToString(); textBox83.Text = dt.Rows[0]["Seminar_Workshopp_Number"].ToString(); textBox49.Text = dt.Rows[0]["Seminar_Workshopp_Duration"].ToString(); textBox101.Text = dt.Rows[0]["Seminar_Workshopp_Workload"].ToString(); textBox87.Text = dt.Rows[0]["Oral_Exam_Number"].ToString(); textBox48.Text = dt.Rows[0]["Oral_Exam_Duration"].ToString(); textBox102.Text = dt.Rows[0]["Oral_Exam_Workload"].ToString(); textBox82.Text = dt.Rows[0]["Midtermss_Number"].ToString(); textBox47.Text = dt.Rows[0]["Midtermss_Duration"].ToString(); textBox103.Text = dt.Rows[0]["Midtermss_Workload"].ToString(); textBox91.Text = dt.Rows[0]["Final_Exam_Number"].ToString(); textBox92.Text = dt.Rows[0]["Final_Exam_Duration"].ToString(); textBox104.Text = dt.Rows[0]["Final_Exam_Workload"].ToString(); textBox105.Text = dt.Rows[0]["Outcomes_1_Text"].ToString(); numericUpDown1.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_1_Value"]); textBox106.Text = dt.Rows[0]["Outcomes_2_Text"].ToString(); numericUpDown2.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_2_Value"]); textBox107.Text = dt.Rows[0]["Outcomes_3_Text"].ToString(); numericUpDown3.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_3_Value"]); textBox108.Text = dt.Rows[0]["Outcomes_4_Text"].ToString(); numericUpDown4.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_4_Value"]); textBox109.Text = dt.Rows[0]["Outcomes_5_Text"].ToString(); numericUpDown5.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_5_Value"]); textBox110.Text = dt.Rows[0]["Outcomes_6_Text"].ToString(); numericUpDown6.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_6_Value"]); textBox111.Text = dt.Rows[0]["Outcomes_7_Text"].ToString(); numericUpDown7.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_7_Value"]); textBox112.Text = dt.Rows[0]["Outcomes_8_Text"].ToString(); numericUpDown8.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_8_Value"]); textBox113.Text = dt.Rows[0]["Outcomes_9_Text"].ToString(); numericUpDown9.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_9_Value"]); textBox114.Text = dt.Rows[0]["Outcomes_10_Text"].ToString(); numericUpDown10.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_10_Value"]); textBox115.Text = dt.Rows[0]["Outcomes_11_Text"].ToString(); numericUpDown11.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_11_Value"]); textBox116.Text = dt.Rows[0]["Outcomes_12_Text"].ToString(); numericUpDown12.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_12_Value"]); textBox117.Text = dt.Rows[0]["Outcomes_13_Text"].ToString(); numericUpDown13.Value = Convert.ToInt32(dt.Rows[0]["Outcomes_13_Value"]); } catch (Exception ee) { MessageBox.Show(ee.Message); } finally { cS = null; dt.Dispose(); sParameters.Clear(); sParameters = null; } }
private void buttun_save_Click(object sender, EventArgs e) { cSQL cS = new cSQL(); List <Tuple <string, string, SqlDbType, int> > sParameters = new List <Tuple <string, string, SqlDbType, int> >(); try { sParameters.Add(new Tuple <string, string, SqlDbType, int>("sLessonName", textBox1.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Code", textBox7.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Semester", textBox5.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Theory", textBox6.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Application", textBox4.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Credits", textBox2.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("ECTS", textBox3.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Prerequisites", textBox9.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Language", textBox8.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Type", textBox10.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Level", textBox12.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Coordinator", textBox11.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Lecturer", textBox13.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Assistant", textBox14.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Objectives", richTextBox1.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes", richTextBox2.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Description", richTextBox3.Text.ToString(), SqlDbType.VarChar, -1)); string temp = string.Empty; if (checkBox1.Checked) { temp = CoreCourses.Text; } if (checkBox2.Checked) { temp = MajorAreaCourses.Text; } if (checkBox3.Checked) { temp = SupportiveCourses.Text; } if (checkBox4.Checked) { temp = MediaandManagementSkillsCourses.Text; } if (checkBox5.Checked) { temp = TransferableSkillCourses.Text; } sParameters.Add(new Tuple <string, string, SqlDbType, int>("CoreCoursesChecked", temp, SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_1_Subjects", textBox15.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_1_Related", textBox31.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_2_Subjects", textBox19.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_2_Related", textBox32.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_3_Subjects", textBox17.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_3_Related", textBox33.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_4_Subjects", textBox16.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_4_Related", textBox34.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_5_Subjects", textBox20.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_5_Related", textBox35.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_6_Subjects", textBox21.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_6_Related", textBox36.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_7_Subjects", textBox24.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_7_Related", textBox37.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_8_Subjects", textBox25.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_8_Related", textBox38.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_9_Subjects", textBox22.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_9_Related", textBox39.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_10_Subjects", textBox18.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_10_Related", textBox40.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_11_Subjects", textBox23.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_11_Related", textBox41.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_12_Subjects", textBox26.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_12_Related", textBox42.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_13_Subjects", textBox27.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_13_Related", textBox43.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_14_Subjects", textBox30.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_14_Related", textBox44.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_15_Subjects", textBox28.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_15_Related", textBox45.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_16_Subjects", textBox29.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("week_16_Related", textBox46.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Textbooks", richTextBox6.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Materials", richTextBox5.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Participation_Number", textBox78.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Participation_Weight", textBox62.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Laboratory_Applicationxtbooks_Number", textBox74.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Laboratory_Applicationxtbooks_Weight", textBox61.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("FieldWork_Number", textBox76.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("FieldWork_Weight", textBox60.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Quizzes_StudioCritiques_Number", textBox77.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Quizzes_StudioCritiques_Weight", textBox59.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Homework_Assignments_Number", textBox73.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Homework_Assignments_Weight", textBox58.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Presentation_Jury_Number", textBox72.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Presentation_Jury_Weight", textBox57.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Project_Number", textBox69.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Project_Weight", textBox56.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Seminar_Workshop_Number", textBox68.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Seminar_Workshop_Weight", textBox55.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("OralExams_Number", textBox71.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("OralExams_Weight", textBox54.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Midterm_Number", textBox75.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Midterm_Weight", textBox53.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("FinalExam_Number", textBox70.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("FinalExam_Weight", textBox52.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("TheoreticalCourseHours_Num", textBox90.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("TheoreticalCourseHours_Duration", textBox79.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("TheoreticalCourseHours_Workload", textBox93.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Laboratory_Application_Hours_Number", textBox86.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Laboratory_Application_Hour_Duration", textBox67.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Laboratory_Application_Hours_Workload", textBox94.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Study_Hours_Out_of_Class_Number", textBox88.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Study_Hours_Out_of_Class_Duration", textBox66.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Study_Hours_Out_of_Class_Workload", textBox95.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Field_Work_Number", textBox89.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Field_Work_Duration", textBox65.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Field_Work_Workload", textBox96.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Quizzes_Studio_Critiques_Number", textBox85.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Quizzes_Studio_Critiques_Duration", textBox64.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Quizzes_Studio_Critiques_Workload", textBox97.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Homework_Assignmentss_Number", textBox84.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Homework_Assignmentss_Duration", textBox63.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Homework_Assignmentss_Workload", textBox98.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Presentation_Juryy_Number", textBox81.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Presentation_Juryy_Duration", textBox51.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Presentation_Juryy_Workload", textBox99.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Projectt_Number", textBox80.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Projectt_Duration", textBox50.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Projectt_Workload", textBox100.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Seminar_Workshopp_Number", textBox83.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Seminar_Workshopp_Duration", textBox49.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Seminar_Workshopp_Workload", textBox101.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Oral_Exam_Number", textBox87.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Oral_Exam_Duration", textBox48.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Oral_Exam_Workload", textBox102.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Midtermss_Number", textBox82.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Midtermss_Duration", textBox47.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Midtermss_Workload", textBox103.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Final_Exam_Number", textBox91.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Final_Exam_Duration", textBox92.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Final_Exam_Workload", textBox104.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_1_Text", textBox105.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_1_Value", numericUpDown11.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_2_Text", textBox106.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_2_Value", numericUpDown2.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_3_Text", textBox107.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_3_Value", numericUpDown3.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_4_Text", textBox108.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_4_Value", numericUpDown4.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_5_Text", textBox109.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_5_Value", numericUpDown5.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_6_Text", textBox110.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_6_Value", numericUpDown6.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_7_Text", textBox111.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_7_Value", numericUpDown7.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_8_Text", textBox112.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_8_Value", numericUpDown8.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_9_Text", textBox113.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_9_Value", numericUpDown9.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_10_Text", textBox114.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_10_Value", numericUpDown10.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_11_Text", textBox115.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_11_Value", numericUpDown11.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_12_Text", textBox116.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_12_Value", numericUpDown12.Value.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_13_Text", textBox117.Text.ToString(), SqlDbType.VarChar, -1)); sParameters.Add(new Tuple <string, string, SqlDbType, int>("Outcomes_13_Value", numericUpDown13.Value.ToString(), SqlDbType.VarChar, -1)); if (this.isEnglish) { DialogResult dialog = new DialogResult(); dialog = MessageBox.Show("Do you approve course enrollment?", "CONFIRMATION", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialog == DialogResult.Yes) { if (this.isUpdate) { sParameters.Add(new Tuple <string, string, SqlDbType, int>("iID", this.iID.ToString(), SqlDbType.Int, -1)); if (cS.CallProcedure("UPDATE LESSON", sParameters, true) == 1) { MessageBox.Show("Course registration successfully updated", "SUCCES", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Error encountered while updating lecture record", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { if (cS.CallProcedure("ADD_LESSON", sParameters, true) == 1) { MessageBox.Show("Course registration successfully created", "SUCCES", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Error encountered while creating lecture record", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } } else { DialogResult dialog = new DialogResult(); dialog = MessageBox.Show("Ders kaydını onaylıyor musunuz ?", "ONAY", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialog == DialogResult.Yes) { if (this.isUpdate) { sParameters.Add(new Tuple <string, string, SqlDbType, int>("iID", this.iID.ToString(), SqlDbType.Int, -1)); if (cS.CallProcedure("UPDATE_LESSON", sParameters, true) == 1) { MessageBox.Show("Ders kaydı başarıyla güncellendi", "BAŞARILI", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Ders kaydı güncellenirken hata ile karşılaşıldı", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { if (cS.CallProcedure("ADD_LESSON", sParameters, true) == 1) { MessageBox.Show("Ders kaydı başarıyla oluşturuldu", "BAŞARILI", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Ders kaydı oluştururken hata ile karşılaşıldı", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } } } catch (Exception ee) { MessageBox.Show(ee.Message); } finally { cS = null; sParameters.Clear(); sParameters = null; } }