Algoritmik tillar va dasturlash


FOYDALANILGAN ADABIYOTLAR



Yüklə 377,92 Kb.
səhifə8/8
tarix27.07.2023
ölçüsü377,92 Kb.
#137678
1   2   3   4   5   6   7   8
Jonibekov

FOYDALANILGAN ADABIYOTLAR
1. O‘z. Res. Prezidentining “Raqamli iqtisodiyot va elektron hukumatni keng joriy yetish chora-tadbirlari to‘g‘risida” gi qarori. Toshkent shahri, 2020 yil 28 aprel.
2. Unity и C#. Геймдев от идеи до реализации | Гибсон Бонд Гибсон Бонд
3. Сергей Тепляков. Паттерны проектирования на платформе .NET 2..
4 . Date C.J. An Introduction to Database Systems (8 th edition). Addison-Wesley: 2003. – P. 1034.
5. Основы систем баз данных: Учебник. / Е. Ж. Айтхожаева – Алматы: КазНИТУ имени К. И. Сатпаева, 2016. – 279 с. Ил. 38. Табл. 8. Библиогр. –53 назв.
6. Андон Ф., Резниченко В. Язык запросов SQL: Учеб. курс. – СПб.: Питер, 2006. – 416 с.
7. Date C.J. An Introduction to Database Systems (8 th edition). Addison-Wesley: 2003. – P. 1034.
8. Основы систем баз данных: Учебник. / Е. Ж. Айтхожаева – Алматы: КазНИТУ имени К. И. Сатпаева, 2016. – 279 с. Ил. 38. Табл. 8. Библиогр. –53 назв.
9. Андон Ф., Резниченко В. Язык запросов SQL: Учеб. курс. – СПб.: Питер, 2006. – 416 с.
10. Бейли Л. Изучаем SQL /Пер. с англ. – СПб.: Питер, 2012. – 573 с.


Internet ma’nbalari:
1. http://www.microsoft.com/
2. http://www.ziyonet.uz/
3. http://www.ref.uz/
4. https://youtu.be/dmT8CTSP474


Ilova
Bu tizimning Kirish formasining dastur(ko’di) yozilgan.

using System;


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

namespace Tashkilot_Xodimlari_malumotini_jamlovchi_tizim


{
public partial class Splash : Form
{
public Splash()
{
InitializeComponent();
}
int startpoiny = 0;
private void timer1_Tick(object sender,EventArgs e)
{
startpoiny += 1;
guna2CircleProgressBar1.Value = startpoiny;
if (guna2CircleProgressBar1.Value == 100)
{
guna2CircleProgressBar1.Value = 0;
timer1.Stop();
this.Hide();
Login me =new Login();
me.Show();
}
}
}
}

Quyidagi dasturda Asosiy bo’limning ishlash ko’di yozilgan:

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

namespace Tashkilot_Xodimlari_malumotini_jamlovchi_tizim


{
public partial class Home : Form
{
public Home()
{
InitializeComponent();
}

private void pictureBox2_Click(object sender, EventArgs e)


{
Hodim hodim_ss = new Hodim();
hodim_ss.Show();
this.Hide();
}

private void pictureBox3_Click(object sender, EventArgs e)


{
HodimKorish h_k = new HodimKorish();
h_k.Show();
this.Hide();
}

private void pictureBox4_Click(object sender, EventArgs e)


{
Ishhaqi ish = new Ishhaqi();
ish.Show();
this.Hide();
}

private void label6_Click(object sender, EventArgs e)


{
Application.Exit();
}
}
}

Quyidagi dasturda Hodim haqida yangi ma’lumotlar qo’shish, o’chirish, tahrirlash va Asosiy bo’limga qaytish tugmalari yozilgan. Bunda bu form ishga tushgan vaqtda DataGreatwievga HodimTb1 jadvaldagi ma’lumotlar chiqadi.



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace TashkilotHodimlari {


public partial class Hodim : Form {
public Hodim() {
InitializeComponent();
}
SqlConnection Con = new SqlConnection(@"Data Source=(LocalDB)\v11.0;"
+ @"AttachDbFilename=C:\Users\lenovo\Documents\TashHodimlariDB.mdf;"
+ @"Integrated Security=True;Connect Timeout=30");
private void button1_Click(object sender, EventArgs e) {
if (Hodim_idTb.Text == ""
|| IsmiTb.Text == ""
|| FamilyasiTb.Text == ""
|| ManziliTb.Text == ""
|| TelTb.Text == ""
) {
MessageBox.Show("Ma'lumotlarni to'ldiring");
} else {
try {
Con.Open();
string query =
"insert into HodimTb1 values('" + Hodim_idTb.Text
+ "','" + IsmiTb.Text
+ "','" + FamilyasiTb.Text
+ "','" + TugKuniTb.Value.Date
+ "','" + ManziliTb.Text
+ "','" + JinsiTb.SelectedItem.ToString()
+ "','" + LovozimTb.SelectedItem.ToString()
+ "','" + Oqish_joyiTb.SelectedItem.ToString()
+"','"+ TelTb.Text +"')";

SqlCommand cmd = new SqlCommand(query, Con);


cmd.ExecuteNonQuery();
MessageBox.Show("Hodim ma'lumotlari qo'shildi");
Con.Close();
populate();
} catch(Exception Ex)
{
MessageBox.Show(Ex.Message);
}
}
}

private void populate()


{
Con.Open();
string query = "select * from HodimTb1";
SqlDataAdapter sda= new SqlDataAdapter(query , Con);
SqlCommandBuilder builder=new SqlCommandBuilder(sda);
var ds = new DataSet();
sda.Fill(ds);
HodMb.DataSource=ds.Tables[0];
Con.Close();
}
private void Hodim_Load(object sender, EventArgs e) {
populate();
}

private void button3_Click(object sender, EventArgs e) {


if (Hodim_idTb.Text == "") {
MessageBox.Show("Hodim idni kiriting");
}
else
{
Con.Open();
string queryInsert = "insert into ArxivTb (Ismi,Fam,TugKuni,Manzili,Jinsi,Lavozim,Oqish_joyi,Tel)values('" + IsmiTb.Text + "','" + FamilyasiTb.Text + "','" + TugKuniTb.Text + "','" + ManziliTb.Text + "','" + JinsiTb.Text + "','" + LovozimTb.Text + "','" + Oqish_joyiTb.Text + "','" + TelTb.Text + "')";
SqlCommand ss = new SqlCommand(queryInsert, Con);
ss.ExecuteNonQuery();
Con.Close();
Con.Open();
string query = "delete from HodimTb1 where Hodim_id='" + Hodim_idTb.Text + "';";
SqlCommand cmd = new SqlCommand(query, Con);
cmd.ExecuteNonQuery();
MessageBox.Show(" Muvaffaqiyatli o'chirildi");
Con.Close();
populate();
}
}

private void HodMb_CellContentClick(object sender, DataGridViewCellEventArgs e) {


int index = e.RowIndex;

Hodim_idTb.Text = HodMb.Rows[index].Cells[0].Value.ToString();


IsmiTb.Text = HodMb.Rows[index].Cells[1].Value.ToString();
FamilyasiTb.Text = HodMb.Rows[index].Cells[2].Value.ToString();
TugKuniTb.Text = HodMb.Rows[index].Cells[3].Value.ToString();
ManziliTb.Text = HodMb.Rows[index].Cells[4].Value.ToString();
JinsiTb.Text = HodMb.Rows[index].Cells[5].Value.ToString();
LovozimTb.Text = HodMb.Rows[index].Cells[6].Value.ToString();
Oqish_joyiTb.Text = HodMb.Rows[index].Cells[7].Value.ToString();
TelTb.Text = HodMb.Rows[index].Cells[8].Value.ToString();
}

private void button2_Click(object sender, EventArgs e) {


if (Hodim_idTb.Text == ""
|| IsmiTb.Text == ""
|| FamilyasiTb.Text == ""
|| ManziliTb.Text == ""
|| TelTb.Text == ""
) {
MessageBox.Show("Yuqolgan malumotlar");
}
else{
try {
Con.Open();

string query =


"update HodimTb1 set Ismi='" + IsmiTb.Text
+ "', Fam='" + FamilyasiTb.Text
+ "', Manzili='" + ManziliTb.Text
+ "', Lavozim='" + LovozimTb.SelectedItem.ToString()
+ "', TugKuni='" + TugKuniTb.Value.Date
+ "', Tel='" + TelTb.Text
+ "', Oqish_joyi='" + Oqish_joyiTb.SelectedItem.ToString()
+ "', Jinsi='" + JinsiTb.SelectedItem.ToString()
+ "' where hodim_id='" + Hodim_idTb.Text + "';";

SqlCommand cmd = new SqlCommand(query, Con);


cmd.ExecuteNonQuery();

MessageBox.Show("Muvaffaqiyatli yangilandi");


Con.Close();


populate();
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
}
}
}

private void button4_Click(object sender, EventArgs e) {


Uy asosiy = new Uy();
asosiy.Show();
this.Hide();
}

private void button5_Click(object sender, EventArgs e) {


Hodim_idTb.Text = "";
IsmiTb.Text = "";
FamilyasiTb.Text = "";
ManziliTb.Text = "";
LovozimTb.Text = "";
JinsiTb.Text = "";
TugKuniTb.Text = "";
Oqish_joyiTb.Text = "";
TelTb.Text = "";
}

private void label2_Click(object sender, EventArgs e) {


}
}
}




Quyida hodim haqida ma’lumotnoma chiqarish va o’chirilgan ma’lumotlarni Arxifdan ko’rish mumkun.



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace TashkilotHodimlari {


public partial class Kurinishi : Form {
public Kurinishi() {
InitializeComponent();
}
SqlConnection Con = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\lenovo\Documents\TashHodimlariDB.mdf;Integrated Security=True;Connect Timeout=30");
private void fetchempdata()
{
Con.Open();
string query = "select * from HodimTb1 where hodim_id ='" + qidirish.Text + "' or Ismi = '"+qidirish.Text+"' or Fam = '"+qidirish.Text+"'";
SqlCommand cmd = new SqlCommand(query, Con);
DataTable dt = new DataTable();
SqlDataAdapter sda = new SqlDataAdapter(cmd);
sda.Fill(dt);
foreach (DataRow dr in dt.Rows) {
hod_id.Text = dr["hodim_id"].ToString();
hodism.Text = dr["ismi"].ToString();
hodfam.Text = dr["Fam"].ToString();
hodtug.Text = dr["TugKuni"].ToString();
hodmanz.Text = dr["Manzili"].ToString();
hodjinsi.Text = dr["jinsi"].ToString();
hodlavozm.Text = dr["Lavozim"].ToString();
hodoqish.Text = dr["Oqish_joyi"].ToString();

hodtel.Visible = true;


hod_id.Visible = true;
hodism.Visible = true;
hodfam.Visible = true;
hodtug.Visible = true;
hodmanz.Visible = true;
hodjinsi.Visible = true;
hodlavozm.Visible = true;
hodoqish.Visible = true;
hodtel.Visible = true;

}
Con.Close();


}
private void button5_Click(object sender, EventArgs e)
{
fetchempdata();

}


private void label10_Click(object sender, EventArgs e) {
Application.Exit();
}

private void button4_Click(object sender, EventArgs e) {


Uy asosiy = new Uy();
asosiy.Show();
this.Hide();
}

private void button1_Click(object sender, EventArgs e) {


if(printPreviewDialog1.ShowDialog() == DialogResult.OK)
{
printDocument1.Print();
}
}

private void printPreviewDialog1_Load(object sender, EventArgs e) {


}


private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) {
e.Graphics.DrawString("=======HODIM HAQIDA QISQACHA MA'LUMOT=======",
new Font("Century Gothic",20,FontStyle.Bold), Brushes.Red, new Point(80));
e.Graphics.DrawString("Hodim ID: " + hod_id.Text+"\tIsmi: "+hodism.Text,
new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10,100));
e.Graphics.DrawString("Hodim Familyasi: " + hodfam.Text,
new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10,140));
e.Graphics.DrawString("\tTug'ulgan sanasi: "+hodtug.Text,
new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10, 180));
e.Graphics.DrawString("Hodim Yashash manzili: " + hodmanz.Text+"\tJinsi: "+hodjinsi.Text,
new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10,220));
e.Graphics.DrawString("Hodim Lavozimi: " + hodlavozm.Text+"\tOqish joyi: "+hodoqish.Text,
new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10,260));
e.Graphics.DrawString("Hodim Tel nomeri: " + hodtel.Text,
new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10,300));
e.Graphics.DrawString("=======HODIM HAQIDA=======",
new Font("Century Gothic", 20, FontStyle.Bold), Brushes.Red, new Point(180,360));
}

private void button2_Click(object sender, EventArgs e) {


Arxiv asosiy = new Arxiv();
asosiy.Show();
this.Hide();
}
}
}


Quyidagi dastur ko’dida hodimning ishlagan kunini kiritish orqali uning kunlik va oylik ish haqini chiqarishimiz mumkun.



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace TashkilotHodimlari {


public partial class Ish_haqi : Form {
public Ish_haqi() {
InitializeComponent();
}
SqlConnection Con = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\lenovo\Documents\TashHodimlariDB.mdf;Integrated Security=True;Connect Timeout=30");
private void fetchempdata()
{
if (hod_id.Text == "")
{
MessageBox.Show("Hodim id sini kiriting");
} else
{
Con.Open();
string query = "select * from HodimTb1 where hodim_id ='" + hod_id.Text + "' or Ismi = '" + hod_id.Text + "' or Fam = '" + hod_id.Text + "'";
SqlCommand cmd = new SqlCommand(query, Con);
DataTable dt = new DataTable();
SqlDataAdapter sda = new SqlDataAdapter(cmd);
sda.Fill(dt);
foreach (DataRow dr in dt.Rows) {
// hod_id.Text = dr["hodim_id"].ToString();
hodism.Text = dr["ismi"].ToString();
hodfam.Text = dr["Fam"].ToString();
hodlavozm.Text = dr["Lavozim"].ToString();

}
Con.Close();


}
}
private void button4_Click(object sender, EventArgs e)
{
Uy asosiy = new Uy();
asosiy.Show();
this.Hide();
}

private void button3_Click(object sender, EventArgs e)


{
fetchempdata();
}
int Dailbase;
int total;
private void button2_Click(object sender, EventArgs e)
{
if(hodlavozm.Text=="")
{
MessageBox.Show("Select An Hodim");
} else if (ish_kun.Text == "" || Convert.ToInt32(ish_kun.Text) > 28)
{
MessageBox.Show("Kunlarning haqiqiy sonini kiriting");
} else

{
if (hodlavozm.Text == "Menejr")


{
Dailbase = 920;
}
else if (hodlavozm.Text == "Boshqaruvchi")
{
Dailbase = 1000;
}
else if (hodlavozm.Text == " Katta Boshqaruvchi")
{
Dailbase = 900;
}
else if (hodlavozm.Text == "Hisobchi")
{
Dailbase = 800;
}
else {
Dailbase = 700;
}
total = Dailbase * Convert.ToInt32(ish_kun.Text);
oylik.Text = "Hodim id: " + hod_id.Text + "\n" + "Ismi: " + hodism.Text + "\n" + "Familyasi: " + hodfam.Text + "\n" + "Lavozimi: " + hodlavozm.Text + "\n" + "Ishlagan kuni: " + ish_kun.Text + "\n" + "Kunlik ish haqi: " + Dailbase + "$" + "\n" + "Oylik ish haqi: " + total + "$";
}
}

private void label10_Click(object sender, EventArgs e) {


Application.Exit();
}

private void button1_Click(object sender, EventArgs e) {


if (printPreviewDialog1.ShowDialog() == DialogResult.OK) {
printDocument1.Print();
}
}

private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) {


e.Graphics.DrawString("=======SALARY DOCUMENT=======", new Font("Century Gothic", 20, FontStyle.Bold), Brushes.Red, new Point(180));
e.Graphics.DrawString("Hodim ID: " + hod_id.Text , new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10, 100));
e.Graphics.DrawString("Hodim Ismi: " + hodism.Text, new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10, 140));
e.Graphics.DrawString("Hodim Familyasi: " + hodfam.Text , new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10, 180));
e.Graphics.DrawString("Hodim Lavozimi: " + hodlavozm.Text, new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10, 220));
e.Graphics.DrawString("Ishlagan ish kuni: " + ish_kun.Text , new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10, 260));
e.Graphics.DrawString("Kunlik ish haqi: " + Dailbase, new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10, 300));
e.Graphics.DrawString("Oylik ish haqi: " + total, new Font("Century Gothic", 18, FontStyle.Regular), Brushes.Red, new Point(10, 340));

e.Graphics.DrawString("=======HODIM OYLIGI=======", new Font("Century Gothic", 20, FontStyle.Bold), Brushes.Red, new Point(180, 380));


}

private void hod_id_TextChanged(object sender, EventArgs e) {


}
}
}







Yüklə 377,92 Kb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin