Kompyuter ilmlari va Dasturlashtirish” kafedrasi 5330200 – “Axborot tizimlari va texnologiyalari” yoʻnalishi



Yüklə 271,61 Kb.
səhifə8/8
tarix29.11.2023
ölçüsü271,61 Kb.
#169985
1   2   3   4   5   6   7   8
Kurs DORIlar

FOYDALANILGAN ADABIYOTLAR
1. Abbos, M., Alhasan, A., & Hamza, UM (2015).
2. Swanson, DS, Broekmeier, RL va Anderson, MW (1982). Kasalxona dorixonasi kompyuter tizimlari.
3. Goldberg, DE, Baardsgaard, G., Jonson, MT, Jolowsky, CM, Shepherd, M. va Peterson, CD (1991).
4. Martin, J. (1991). Ilovalarni tezkor ishlab chiqish. Macmillan Muallem, Y., 5. Dogether, M., Al Assaf, R., Al Ateeq, A., & Househ, M
6. Federal Ta'lim kolleji akademik xodimlari tomonidan elektron ta'lim texnologiyalaridan foydalanish va ulardan foydalanishning qulayligi, Zaria Coelho, LC, & Laporte, G. (2015). Sotuvchilarni boshqarish tizimlari.

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;
using System.Configuration;
namespace kursovoy22222
{
public partial class setup : Form
{
public setup()
{
InitializeComponent();
}

private void label1_Click(object sender, EventArgs e)


{
Application.Exit();
}
SqlConnection con;
private void bunifuButton21_Click(object sender, EventArgs e)
{
SqlDataAdapter cmd = new SqlDataAdapter("select Count(*) from [LOG] where LOGIN='" + bunifuTextBox1.Text + "' and PAROL='" + bunifuTextBox2.Text + "' and TIPI='" + comboBox1.Text + "'", con);
DataTable dt = new DataTable();
cmd.Fill(dt);

if (dt.Rows[0][0].ToString() == "1")


{
SqlDataAdapter cmd1 = new SqlDataAdapter("select TIPI from [LOG] where LOGIN='" + bunifuTextBox1.Text + "' and PAROL='" + bunifuTextBox2.Text + "'", con);
DataTable dt1 = new DataTable();
cmd1.Fill(dt1);
if (dt1.Rows[0][0].ToString() == "Admin")
{
Admin h = new Admin();
h.Show();
this.Hide();
}
if (dt1.Rows[0][0].ToString() == "User")
{
Form3 b = new Form3();
b.Show();
this.Hide();
}
}

else
{


MessageBox.Show("Xatooo");
}
}

private void setup_Load(object sender, EventArgs e)


{
con = new SqlConnection(ConfigurationManager.ConnectionStrings["Connecting"].ConnectionString);
con.Open();
}

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)


{
if (comboBox1.SelectedIndex == 1)
{
comboBox1.BackColor = Color.White;
comboBox1.ForeColor = Color.Black;

}
else


{
comboBox1.BackColor = Color.White;
comboBox1.ForeColor = Color.Black;
}
}
}

}
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.Reflection;
using System.Configuration;
using System.IO;
using System.Data.SqlClient;
namespace kursovoy22222
{
public partial class Form3 : Form
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Connecting"].ConnectionString);
public Form3()
{
InitializeComponent();
}
public void populateGrid()
{
con.Open();
string query = "select *from [Table]";
SqlDataAdapter da = new SqlDataAdapter(query, con);
SqlCommandBuilder builder = new SqlCommandBuilder(da);
var ds = new DataSet();
da.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
con.Close();
}
public void abbos()
{
con.Open();
string query = "select *from [Table] where NOMLARI = '"+ bunifuTextBox1.Text+"'";
SqlDataAdapter da = new SqlDataAdapter(query, con);
SqlCommandBuilder builder = new SqlCommandBuilder(da);
var ds = new DataSet();
da.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
con.Close();
}
private void bunifuButton25_Click(object sender, EventArgs e)
{
setup ll = new setup();
ll.Show();
this.Hide();

}


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

private void bunifuButton21_Click(object sender, EventArgs e)


{
abbos();
}

private void Form3_Load(object sender, EventArgs e)


{
populateGrid();
}

private void bunifuPictureBox4_Click(object sender, EventArgs e)


{
populateGrid();
}

private void bunifuButton22_Click(object sender, EventArgs e)


{
Form4 jj = new Form4();
jj.Show();
this.Hide();
}

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;
using System.Data.SqlClient;
using System.Configuration;
namespace kursovoy22222
{
public partial class Form4 : Form
{
public Form4()
{
InitializeComponent();
abbos();
}
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Connecting"].ConnectionString);
private void abbos()
{
con.Open();
string query = "select savdoID,NOMLARI,NARXI,SONI from [Table]";
SqlDataAdapter uu = new SqlDataAdapter(query, con);
SqlCommandBuilder builder = new SqlCommandBuilder(uu);
var ds = new DataSet();
uu.Fill(ds);
bunifuDataGridView1.DataSource = ds.Tables[0];
con.Close();
}
private void yangilash()
{
int newSon = stock - Convert.ToInt32(bunifuTextBox3.Text);
try
{
con.Open();
string query = "update [Table] set SONI =" + newSon + " where savdoID =" + key + ";";
SqlCommand cmd = new SqlCommand(query, con);
cmd.ExecuteNonQuery();
con.Close();
abbos();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
int n = 0, Grdtotal = 0;
private void bunifuButton21_Click(object sender, EventArgs e)
{
if (bunifuTextBox3.Text == "" || Convert.ToInt32(bunifuTextBox3.Text) > stock)
{
MessageBox.Show("toldiring");
}
else
{
int total = Convert.ToInt32(bunifuTextBox2.Text) * Convert.ToInt32(bunifuTextBox3.Text);
DataGridViewRow row = new DataGridViewRow();
row.CreateCells(buni2);
row.Cells[0].Value = n + 1;
row.Cells[1].Value = bunifuTextBox1.Text;
row.Cells[2].Value = bunifuTextBox2.Text;
row.Cells[3].Value = bunifuTextBox3.Text;
row.Cells[4].Value = bunifuTextBox4.Text;
row.Cells[5].Value = total;
buni2.Rows.Add(row);
Grdtotal = Grdtotal + total;
n++;

con.Open();


string query = "Insert into [Clent] values('" + bunifuTextBox4.Text + "','" + bunifuTextBox1.Text + "'" +
",'" + bunifuTextBox2.Text + "','" + bunifuTextBox3.Text + "')";
SqlCommand cmd = new SqlCommand(query, con);
cmd.ExecuteNonQuery();
con.Close();
yangilash();
}
QRCoder.QRCodeGenerator qq = new QRCoder.QRCodeGenerator();
var myqr = qq.CreateQrCode(bunifuTextBox1.Text, QRCoder.QRCodeGenerator.ECCLevel.H);
var code = new QRCoder.QRCode(myqr);
}
private void Reset()
{
bunifuTextBox1.Text = "";
bunifuTextBox2.Text = "";
bunifuTextBox3.Text = "";
bunifuTextBox4.Text = "";
}
private void bunifuButton22_Click(object sender, EventArgs e)
{
Reset();
}
private void label5_Click(object sender, EventArgs e)
{
Form3 gg = new Form3();
gg.Show();
this.Hide();
}
private void Form4_Load(object sender, EventArgs e)
{
}
private void label6_Click(object sender, EventArgs e)
{
Application.Exit();
}
int prodid, prodSon, prodNarx, totall, pos = 60;
string prodNomi,prodIsm;
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{

e.Graphics.DrawString("JIZZAX MED SERVICE MCHJ", new Font("Century Gothic", 12, FontStyle.Bold), Brushes.Black, new Point(30));


e.Graphics.DrawString("T/R NOMI NARXI SONI ", new Font("Century Gothic", 10, FontStyle.Bold), Brushes.Red, new Point(20,40));
foreach (DataGridViewRow hh in buni2.Rows)
{
prodid = Convert.ToInt32(hh.Cells["ID"].Value);
prodNomi = "" + hh.Cells["NOMLARI"].Value;
prodNarx = Convert.ToInt32(hh.Cells["NARXI"].Value);
prodSon = Convert.ToInt32(hh.Cells["SONI"].Value);
prodIsm = "" + hh.Cells["ISMI"].Value;
totall = Convert.ToInt32(hh.Cells["TOTAL"].Value);
e.Graphics.DrawString("" + prodid, new Font("Century Gothic", 8, FontStyle.Bold), Brushes.Blue, new Point(20,pos));
e.Graphics.DrawString("" + prodNomi, new Font("Century Gothic", 8, FontStyle.Bold), Brushes.Blue, new Point(35,pos));
e.Graphics.DrawString("" + prodNarx, new Font("Century Gothic", 8, FontStyle.Bold), Brushes.Blue, new Point(130,pos));
e.Graphics.DrawString("" + prodSon, new Font("Century Gothic", 8, FontStyle.Bold), Brushes.Blue, new Point(180,pos));
pos = pos +20;
}
e.Graphics.DrawString("UMUMIY SUM " + Grdtotal, new Font("Century Gothic", 12, FontStyle.Bold), Brushes.Black, new Point(55, pos ));
e.Graphics.DrawString("MIJOZ ISMI " + prodIsm, new Font("Century Gothic", 10, FontStyle.Bold), Brushes.Red, new Point(20, pos + 30));
e.Graphics.DrawString("*********XARID UCHUN RAHMAT********", new Font("Century Gothic", 10, FontStyle.Bold), Brushes.Crimson, new Point(10,pos+140));
buni2.Rows.Clear();
buni2.Refresh();
pos = 100;
Grdtotal = 0;
}
int key = 0, stock = 0;
private void bunifuDataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
bunifuTextBox1.Text = bunifuDataGridView1.SelectedRows[0].Cells[1].Value.ToString();
bunifuTextBox2.Text = bunifuDataGridView1.SelectedRows[0].Cells[2].Value.ToString();
// bunifuTextBox3.Text = bunifuDataGridView1.SelectedRows[0].Cells[2].Value.ToString();
if (bunifuTextBox1.Text == "")
{
key = 0;
stock = 0;
}
else
{
key = Convert.ToInt32(bunifuDataGridView1.SelectedRows[0].Cells[0].Value.ToString());
stock = Convert.ToInt32(bunifuDataGridView1.SelectedRows[0].Cells[3].Value.ToString());
}

}
}
}


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;
using System.Configuration;
namespace kursovoy22222
{
public partial class Admin : Form
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Connecting"].ConnectionString);
public Admin()
{
InitializeComponent();
}

private void Admin_Load(object sender, EventArgs e)


{
abbos();
}

private void bunifuButton23_Click(object sender, EventArgs e)


{
con.Open();
SqlCommand cmd = con.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select *from [Table] where NOMLARI='" + bunifuTextBox2.Text + "'";
cmd.ExecuteNonQuery();
DataTable dt = new DataTable();
SqlDataAdapter sdr = new SqlDataAdapter(cmd);
sdr.Fill(dt);
bunifuDataGridView1.DataSource = dt;

con.Close();


}

private void bunifuButton21_Click(object sender, EventArgs e)


{
con.Open();
SqlCommand cmd = con.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "delete from [Table] where NOMLARI='" + bunifuTextBox2.Text + "'";
cmd.ExecuteNonQuery();
con.Close();
abbos();
MessageBox.Show("O'chirildi");

}


private void bunifuButton22_Click(object sender, EventArgs e)
{

con.Open();


SqlCommand cmd = con.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "Insert into [Table](NOMLARI,QOLLANILISHI, NARXI, SONI, ISHLAB_CHIQARILGAN, APTEKA_JIZZAX) values('" + bunifuTextBox2.Text + "','" + bunifuTextBox3.Text + "','" + bunifuTextBox4.Text + "'," +
"'" + bunifuTextBox5.Text + "','" + bunifuTextBox6.Text + "','" + bunifuTextBox7.Text + "')";
cmd.ExecuteNonQuery();
con.Close();
bunifuTextBox1.Text = "";
bunifuTextBox2.Text = "";
bunifuTextBox3.Text = "";
bunifuTextBox4.Text = "";
bunifuTextBox5.Text = "";
bunifuTextBox6.Text = "";
bunifuTextBox7.Text = "";
abbos();
}
public void abbos()
{
con.Open();
SqlCommand cmd = con.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select *from [Table]";
cmd.ExecuteNonQuery();
DataTable dt = new DataTable();
SqlDataAdapter sdr = new SqlDataAdapter(cmd);
sdr.Fill(dt);
bunifuDataGridView1.DataSource = dt;
con.Close();

}
private void label8_Click(object sender, EventArgs e)


{
Application.Exit();
}
private void bunifuButton24_Click(object sender, EventArgs e)
{
setup kk = new setup();
kk.Show();
this.Hide();
}
private void bunifuDataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
bunifuTextBox1.Text = bunifuDataGridView1.SelectedRows[0].Cells[0].Value.ToString();
bunifuTextBox2.Text = bunifuDataGridView1.SelectedRows[0].Cells[1].Value.ToString();
bunifuTextBox3.Text = bunifuDataGridView1.SelectedRows[0].Cells[2].Value.ToString();
bunifuTextBox4.Text = bunifuDataGridView1.SelectedRows[0].Cells[3].Value.ToString();
bunifuTextBox5.Text = bunifuDataGridView1.SelectedRows[0].Cells[4].Value.ToString();
bunifuTextBox6.Text = bunifuDataGridView1.SelectedRows[0].Cells[5].Value.ToString();
bunifuTextBox7.Text = bunifuDataGridView1.SelectedRows[0].Cells[6].Value.ToString();
}

private void bunifuButton25_Click(object sender, EventArgs e)


{
bunifuTextBox1.Clear();
bunifuTextBox2.Clear();
bunifuTextBox3.Clear();
bunifuTextBox4.Clear();
bunifuTextBox5.Clear();
bunifuTextBox6.Clear();
bunifuTextBox7.Clear();
}

private void label3_Click(object sender, EventArgs e)


{


}
}
}
Yüklə 271,61 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