FOYDALANILGAN ADABIYOTLAR




Download 1,57 Mb.
bet11/11
Sana24.11.2023
Hajmi1,57 Mb.
#104490
1   2   3   4   5   6   7   8   9   10   11
Bog'liq
Shablon Talaba Ma\'lumoti
Reja Sanoq sistemasi tushunchasi. Pozitsion va pozitsion bo’lmag-fayllar.org, Документ Microsoft Word, Qollanma, Testlar javobi, HOW TO DO PRESENTATION WORKS IN POWER POINT, Overpopulation, HISTORICAL PLACES OF UZBEKISTAN 2 , Places of interest in the USA, Billiard sharlari, cisco 1 odilov, 87. Falsafa Darslik, 1123885.pptx, Hometown ( always in use ), Find a site that advertises a real work in a hospital
FOYDALANILGAN ADABIYOTLAR
1. Сергей Тепляков. Паттерны проектирования на платформе .NET 2..
2. Date C.J. An Introduction to Database Systems (8 th edition). Addison-Wesley: 2003. – P. 1034.
3. Основы систем баз данных: Учебник. / Е. Ж. Айтхожаева – Алматы: КазНИТУ имени К. И. Сатпаева, 2016. – 279 с. Ил. 38. Табл. 8. Библиогр. –53 назв.
4. Андон Ф., Резниченко В. Язык запросов SQL: Учеб. курс. – СПб.: Питер, 2006. – 416 с.
5. Бейли Л. Изучаем SQL /Пер. с англ. – СПб.: Питер, 2012. – 573 с.
6.https://xabar.uz/uz/talim/talim-tizimini-isloh-qilishni-nimadan-boshlash-kerak
7.https://tdi.uz/activity/monitoring/
8. Unity и C#. Геймдев от идеи до реализации | Гибсон Бонд Гибсон Бонд
Джереми
9. Ицик Бен-Ган. Microsoft SQL Server 2012. Основы T-SQL
10. Дж. Скит. C# для профессионалов. Тонкости программирования
11. Joe Duffy. Concurrent Programming on Windows
12. Эрик Фримен и др. Head First. Паттерны проектирования
13. Сергей Тепляков. Паттерны проектирования на платформе .NET

ILOVALAR
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace TalabalarMalumoti
{
public partial class Fakultelar : Form
{
public Fakultelar()
{
InitializeComponent();
}

private void Fakultelar_FormClosing(object sender, FormClosingEventArgs e)


{
new Menu().Show();
Hide();
}
Query q = new Query();
private void Refresh0()
{
q.FillComboBox("fak", "Fakultetlar", fakCombo);
fakCombo.Text = "";
}
private void Refresh1(int fak_id)
{
q.FillListBox("Yon", "Yonalishlar",fak_id, listBoxYonalish);
}

private void Fakultelar_Load(object sender, EventArgs e)


{
Refresh0();
}
private void Ochirish1_Click(object sender, EventArgs e)
{
if (MessageBox.Show($"'{fakCombo.SelectedItem}' fakultetiga tegishli barcha ma'lumotlar(Yo'nalish, Guruh, Talabalar) qayta tiklash imkoniyatisiz o'chib ketadi. O'chirish?","Diqqat!",MessageBoxButtons.YesNo) == DialogResult.Yes)
{
q.Delete($"delete from Fakultetlar where fak = '{fakCombo.SelectedItem}'");
q.Delete($"delete from Yonalishlar where fak_id = {fak_id}");
q.Delete($"delete from Guruhlar where fak_id = {fak_id}");
q.Delete($"delete from Talabalar where fak_id = {fak_id}");
Refresh0();
}
}

private void YangiFakButton_Click(object sender, EventArgs e)


{
panel7.Visible = true;
YangiFakButton.Enabled = Ochirish1.Enabled = false;
}

private void bekorBtn_Click(object sender, EventArgs e)


{
panel7.Visible = false;
YangiFakButton.Enabled = Ochirish1.Enabled = true;
YangiFakTxt.Text = "";
}

private void OkFak_Click(object sender, EventArgs e)


{
if (YangiFakTxt.Text != "")
{
q.Insert($"insert into Fakultetlar values('{YangiFakTxt.Text}')");
MessageBox.Show($"'{YangiFakTxt.Text}' qo'shildi");
Refresh0();
panel7.Visible = false;
YangiFakTxt.Text = "";
YangiFakButton.Enabled = Ochirish1.Enabled = true;
}
else
{
MessageBox.Show("Maydonni to'ldiring!");
}
}
private int fak_id = -1;
private void fakCombo_SelectedIndexChanged(object sender, EventArgs e)
{
fak_id = (int)q.Select($"select id from Fakultetlar where fak = '{fakCombo.Text}'").Rows[0][0];
Refresh1(fak_id);
}

private void YangiYonButton_Click(object sender, EventArgs e)


{
if (fakCombo.Text != "")
{
YangiYonButton.Enabled = Ochirish2.Enabled = false;
panel8.Visible = true;
}
else
{
MessageBox.Show("Fakultet tanlang");
}

}

private void button1_Click(object sender, EventArgs e)


{
YangiYonTxt.Text = "";
YangiYonButton.Enabled = Ochirish2.Enabled = true;
panel8.Visible = false;

}

Jahongir 120, [11/1/2023 5:10 PM]


private void OkYon_Click(object sender, EventArgs e)
{
if (YangiYonTxt.Text != "")
{
q.Insert($"insert into Yonalishlar values('{YangiYonTxt.Text}',{fak_id})");
MessageBox.Show($"'{YangiYonTxt.Text}' qo'shildi");
Refresh1(fak_id);
panel8.Visible = false;
YangiYonTxt.Text = "";
YangiYonButton.Enabled = Ochirish2.Enabled = true;
}
else
{
MessageBox.Show("Maydonni to'ldiring!");
}
}
private bool selected = false;
private void Ochirish2_Click(object sender, EventArgs e)
{
if (selected)
{
if (MessageBox.Show($"'{listBoxYonalish.SelectedItem}' yo'nalishiga tegishli barcha ma'lumotlar(Guruh, Talabalar) qayta tiklash imkoniyatisiz o'chib ketadi. O'chirish?", "Diqqat!", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
q.Delete($"delete from yonalishlar where yon = '{listBoxYonalish.SelectedItem}'");
q.Delete($"delete from Guruhlar where yon_id = {yon_id}");
q.Delete($"delete from Talabalar where yon_id = {yon_id}");
Refresh1(fak_id);
selected = false;
}
}

}
private int yon_id = -1;


private void listBoxYonalish_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
selected = true;
yon_id = (int)q.Select($"select id from Yonalishlar where yon = '{listBoxYonalish.SelectedItem}'").Rows[0][0];
}
catch
{

}
}
}


}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TalabalarMalumoti


{
public partial class Guruhlar : Form
{
public Guruhlar()
{
InitializeComponent();
}
private void Guruhlar_FormClosing(object sender, FormClosingEventArgs e)
{
new Menu().Show();
Hide();
}
private void YangiGuruhButton_Click(object sender, EventArgs e)
{
if (fakCombo.Text != "" && YonCombo.Text != "")
{
YangiGuruhButton.Enabled = Ochirish1.Enabled = false;
groupBox2.Visible = true;
}
else
{
MessageBox.Show("Fakultet bilan yo'nalishni tanlang");
}
}
private void button1_Click(object sender, EventArgs e)
{
YangiGuruhButton.Enabled = Ochirish1.Enabled = true;
groupBox2.Visible = false;
YangiGuruhTxt.Text = "";
}
private int fak_id = -1;
private int yon_id = -1;
private void fakCombo_SelectedIndexChanged(object sender, EventArgs e)
{
fak_id = (int)q.Select($"select id from Fakultetlar where fak = '{fakCombo.Text}'").Rows[0][0];
q.FillComboBox("yon", $"Yonalishlar where fak_id = {fak_id}", YonCombo);
q.FillListBox("guruh","Guruhlar",fak_id,listBoxGuruh);
YonCombo.Text = "";
}
Query q = new Query();
private void Guruhlar_Load(object sender, EventArgs e)
{
q.FillComboBox("fak","Fakultetlar",fakCombo);
q.FillComboBox("yon","Yonalishlar",YonCombo);
q.FillListBox1("guruh", "Guruhlar", yon_id, listBoxGuruh);
}
private void YonCombo_SelectedIndexChanged(object sender, EventArgs e)
{
yon_id = (int)q.Select($"select id from Yonalishlar where yon = '{YonCombo.Text}'").Rows[0][0];
q.FillListBox1("guruh", "Guruhlar", yon_id, listBoxGuruh);
}
private void OKButton_Click(object sender, EventArgs e)
{
if (YangiGuruhTxt.Text != "")
{
q.Insert($"insert into Guruhlar values('{YangiGuruhTxt.Text}',{yon_id},{fak_id})");
MessageBox.Show($"'{YangiGuruhTxt.Text}' qo'shildi");
YangiGuruhButton.Enabled = Ochirish1.Enabled = true;
groupBox2.Visible = false;
YangiGuruhTxt.Text = "";
q.FillListBox1("guruh", "Guruhlar", yon_id, listBoxGuruh);
}
else
{
MessageBox.Show("Maydonni to'ldiring!");
}
}
private bool selected = false;
private void Ochirish1_Click(object sender, EventArgs e)
{
if (selected)
{
if (MessageBox.Show($"'{listBoxGuruh.SelectedItem}' guruhiga tegishli barcha ma'lumotlar(Talabalar) qayta tiklash imkoniyatisiz o'chib ketadi. O'chirish?", "Diqqat!", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
q.Delete($"delete from Guruhlar where guruh = '{listBoxGuruh.SelectedItem}'");
q.Delete($"delete from Talabalar where guruh_id = {guruh_id}");
q.FillListBox1("guruh", "Guruhlar", yon_id, listBoxGuruh);
selected = false;
}
}
else
{
MessageBox.Show("Ro'yxatdan guruhni tanlang!");
}
}
private int guruh_id = -1;
private void listBoxGuruh_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
guruh_id = (int)q.Select($"select id from Guruhlar where guruh = '{listBoxGuruh.SelectedItem}'").Rows[0][0];
selected = true;
}
catch
{}
}
}
}


Download 1,57 Mb.
1   2   3   4   5   6   7   8   9   10   11




Download 1,57 Mb.