Foydalanilgan adabiyotlar ro’yxati




Download 5,51 Mb.
bet8/8
Sana05.10.2024
Hajmi5,51 Mb.
#273677
1   2   3   4   5   6   7   8
Bog'liq
namuna1

Foydalanilgan adabiyotlar ro’yxati
1.Троелсен Эндрю, Джепикс Филипп. Язык программирования C# 7 и платформы .NET и .NET Core. Вильямс. 2018
2. Албахари Бен, Албахари Джозеф. C# 7.0. Справочник. Полное описание языка. Пер. с англ.-СПб: “Альфа-книга”, 2018, -1024 с.
3. С. Магда C#. Язык программирования Си Шарп. – Изд. ДМК Пресс, 2013, 190 с.
4.Лабор В.В. C#: Создание приложение для Windows. – Мн.: Харвест, 2003, 384 с.
5.https://tdi.uz/activity/monitoring/
6. Unity и C#. Геймдев от идеи до реализации | Гибсон Бонд Гибсон Бонд
Джереми
7. Информация о PostgreSQL 14.
8. Fowler-Finn, Tomas (2013). Ta'lim sohasidagi etakchi ko'rsatmalar. 8 Story Street, Kembrij, MA 02138: Garvard Education Press. ISBN 978-1-61250-526-8.


ILOVALAR
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Npgsql;
namespace Online_Education
{
public partial class Admin : Form
{
public Admin()
{
InitializeComponent();
}
private static string Host = "localhost";
private static string User = "postgres";
private static string DBname = "DunyoEducation";
private static string Password = "1234";
private static string Port = "5432";
string connString = String.Format(
"Server={0}; Username={1}; Database={2}; Port={3}; Password={4}; SSLMode=Prefer",
Host,
User,
DBname,
Port,
Password);
private NpgsqlConnection conn;
private NpgsqlCommand cmd;
private string sql = null;
private DataTable dt;
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = "";
textBox6.Text = "";
}
private void button1_Click(object sender, EventArgs e)
{
string login = textBox6.Text;
string parol = textBox1.Text;
string dbLogin = "";
string dbParol = "";
string[,] a = new string[1000,1000];
int i = 0;
if(login.Equals("") && parol.Equals(""))
{
MessageBox.Show("Maydonlarni to'ldiring !!!","Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
textBox1.Text = "";
textBox6.Text = "";
}
else
{
try
{
conn.Open();
sql = @"select *from admin where login='" + login + "' and parol='" + parol + "'";
cmd = new NpgsqlCommand(sql, conn);
cmd.ExecuteNonQuery();
var reader = cmd.ExecuteReader();
while (reader.Read())
{
dbLogin = reader.GetString(1);
dbParol = reader.GetString(2);
}
reader.Close();
if (dbLogin.Equals(login) && dbParol.Equals(parol))
{
this.Hide();
new Baza().Show();
textBox1.Text = "";
textBox6.Text = "";
}
else
{
MessageBox.Show("Parol yoki Login xato!!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
textBox1.Text = "";
textBox6.Text = "";
}
textBox1.Text = "";
textBox6.Text = "";
conn.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
private void button13_Click(object sender, EventArgs e)
{
this.Hide();
new Form1().Show();
}
private void button3_Click(object sender, EventArgs e)
{
this.Hide();
new Form1().Show();
}
private void Admin_Load(object sender, EventArgs e)
{
conn = new NpgsqlConnection(connString);
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Npgsql;
namespace Online_Education
{
public partial class UmumiyBaza : Form
{
public UmumiyBaza()
{
InitializeComponent();
}
private static string Host = "localhost";
private static string User = "postgres";
private static string DBname = "DunyoEducation";
private static string Password = "1234";
private static string Port = "5432";
string connString = String.Format(
"Server={0}; Username={1}; Database={2}; Port={3}; Password={4}; SSLMode=Prefer",
Host,
User,
DBname,
Port,
Password);
private NpgsqlConnection conn;
private NpgsqlCommand cmd;
private string sql = null;
private DataTable dt;
string ismi="",familyasi="",telNomeri="",yonalishi = "",darskuni="",darsvaqti="",ustoz="",kuni="",kurstolovi="",kursnarxi="",kelganvaqti="";
int t = 0;
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
private void panel2_Paint(object sender, PaintEventArgs e)
{
}
private void button6_Click(object sender, EventArgs e)
{
// tozalsh
textBox2.Text = "";
textBox7.Text = "";
textBox3.Text = "";
textBox10.Text = "";
textBox11.Text = "";
}
private void button7_Click(object sender, EventArgs e)
{
}
private void button3_Click(object sender, EventArgs e)
{
try
{
if (t == 1)
{
conn.Open();
sql = @"delete from abiturent1 where telnomeri='"+telNomeri+"'";
cmd = new NpgsqlCommand(sql, conn);
cmd.ExecuteNonQuery();
conn.Close();
textBox2.Text = "";
textBox7.Text = "";
textBox3.Text = "";
textBox4.Text = "";
textBox10.Text = "";
textBox11.Text = "";
conn.Open();
sql = @"select *from abiturent1";
cmd = new NpgsqlCommand(sql, conn);
cmd.ExecuteNonQuery();
dt = new DataTable();
dt.Load(cmd.ExecuteReader());
dataGridView1.DataSource = null;
dataGridView1.DataSource = dt;
conn.Close();
}
else
{
MessageBox.Show("Iltimos ustuni tanlang!!!\n", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch(Exception ex)
{
MessageBox.Show("baza bilan bog'lanishda hatolik!!!\n" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void button4_Click(object sender, EventArgs e)
{
// tahirlash
try
{
if (t == 1 && comboBox2.SelectedIndex>-1 && comboBox3.SelectedIndex>-1 && comboBox4.SelectedIndex>-1)
{
string ism1 = textBox2.Text, fam1 = textBox7.Text, darkuni1 = comboBox2.SelectedItem.ToString(), darsvaqti1 = comboBox3.SelectedItem.ToString(), ustoz1 = comboBox4.SelectedItem.ToString(),kurstolovi1=textBox10.Text;
conn.Open();
sql = @"update abiturent1 set ismi='" + ism1 + "',familyasi='"+ fam1 + "',darskuni='"+ darkuni1 + "', darsvaqti='"+ darsvaqti1 + "',ustoz='"+ ustoz1 + "',kurstolovi='"+ kurstolovi1 + "' where telnomeri='"+telNomeri+"'";
cmd = new NpgsqlCommand(sql, conn);
cmd.ExecuteNonQuery();
conn.Close();
textBox2.Text = "";
textBox7.Text = "";
textBox3.Text = "";
textBox4.Text = "";
textBox10.Text = "";
textBox11.Text = "";
conn.Open();
sql = @"select *from abiturent1";
cmd = new NpgsqlCommand(sql, conn);
cmd.ExecuteNonQuery();
dt = new DataTable();
dt.Load(cmd.ExecuteReader());
dataGridView1.DataSource = null;
dataGridView1.DataSource = dt;
conn.Close();
}
else
{
MessageBox.Show("Iltimos ustuni tanlang!!!\n", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}catch(Exception ex)
{
MessageBox.Show("baza bilan bog'lanishda hatolik!!!\n" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void button2_Click(object sender, EventArgs e)
{
string search = textBox1.Text;
try
{
if (!search.Equals(""))
{
conn.Open();
sql = @"select *from abiturent1 where ismi='" + search + "'";
cmd = new NpgsqlCommand(sql, conn);
cmd.ExecuteNonQuery();
dt = new DataTable();
dt.Load(cmd.ExecuteReader());
dataGridView1.DataSource = null;
dataGridView1.DataSource = dt;
conn.Close();
textBox1.Text = "";
}
else
{
MessageBox.Show("Search maydonchasini to'ldiring!!!\n", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
textBox1.Text = "";
}
}catch(Exception ex)
{
MessageBox.Show("baza bilan bog'lanishda hatolik!!!\n" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
textBox1.Text = "";
}
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
new Baza().Show();
}
private void button5_Click(object sender, EventArgs e)
{
this.Hide();
new Baza().Show();
}
private void dataGridView1_Click(object sender, EventArgs e)
{
try
{
int index = dataGridView1.CurrentRow.Index;
if (index > -1)
{
t = 1;
ismi = dataGridView1.Rows[index].Cells["ismi"].Value.ToString();
textBox2.Text = ismi;
familyasi = dataGridView1.Rows[index].Cells["familyasi"].Value.ToString();
textBox7.Text = familyasi;
telNomeri = dataGridView1.Rows[index].Cells["telnomeri"].Value.ToString();
textBox3.Text = telNomeri;
yonalishi = dataGridView1.Rows[index].Cells["yonalishi"].Value.ToString();
textBox4.Text = yonalishi;
darskuni = dataGridView1.Rows[index].Cells["darskuni"].Value.ToString();
darsvaqti = dataGridView1.Rows[index].Cells["darsvaqti"].Value.ToString();
ustoz = dataGridView1.Rows[index].Cells["ustoz"].Value.ToString();
kuni = dataGridView1.Rows[index].Cells["kuni"].Value.ToString();
textBox9.Text = kuni;
kurstolovi = dataGridView1.Rows[index].Cells["kurstolovi"].Value.ToString();
textBox10.Text = kurstolovi;
kursnarxi = dataGridView1.Rows[index].Cells["kursnarxi"].Value.ToString();
textBox11.Text = kursnarxi;
string[] ar = new string[100];
int ustun = 0,satr=0;
conn.Open();
sql = @"select *from teachers where yonalishi='" + yonalishi + "'";
cmd = new NpgsqlCommand(sql, conn);
cmd.ExecuteNonQuery();
var reader = cmd.ExecuteReader();
while (reader.Read())
{
ar[satr] = reader.GetString(1)+" "+ reader.GetString(2);
satr++;
}
conn.Close();
comboBox4.Items.Clear();
for (int i = 0; i < satr; i++)
{
comboBox4.Items.Add(ar[i]);
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
private void UmumiyBaza_Load(object sender, EventArgs e)
{
conn = new NpgsqlConnection(connString);
try
{
conn.Open();
sql = @"select *from abiturent1";
cmd = new NpgsqlCommand(sql, conn);
cmd.ExecuteNonQuery();
dt = new DataTable();
dt.Load(cmd.ExecuteReader());
dataGridView1.DataSource = null;
dataGridView1.DataSource = dt;
conn.Close();
}
catch(Exception ex)
{
MessageBox.Show("Baza bilan bog'lanishda xatolik!!!\n" + ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
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 Online_Education
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
new Yonalishlar().Show();
}
private void button2_Click(object sender, EventArgs e)
{
this.Hide();
new Admin().Show();
}
private void button3_Click(object sender, EventArgs e)
{
this.Visible = false;
this.Hide();
new Tillar().Show();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
}
}
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 Online_Education
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
new Yonalishlar().Show();
}
private void button2_Click(object sender, EventArgs e)
{
this.Hide();
new Admin().Show();
}
private void button3_Click(object sender, EventArgs e)
{
this.Visible = false;
this.Hide();
new Tillar().Show();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
}
}



Download 5,51 Mb.
1   2   3   4   5   6   7   8




Download 5,51 Mb.

Bosh sahifa
Aloqalar

    Bosh sahifa



Foydalanilgan adabiyotlar ro’yxati

Download 5,51 Mb.