|
Jizzax politexnika instituti
|
bet | 19/102 | Sana | 30.05.2024 | Hajmi | 20,04 Mb. | | #257711 |
Bog'liq AKT fanidan LOBARATORIYA uslubiy ko\'rsatmaAsosiy qidiruv oynasi
using System;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
usingSystem.Windows.Forms;
usingSystem.Data.SqlClient;
if (comboBox1.Text == string.Empty)
{
MessageBox.Show("ComboBox Emty");
}
else { if (comboBox1.Text == "nomi")
{
SqlDataAdapter r = new SqlDataAdapter("SELECT TOP (1000) [nomi] ,[operativka] ,[qattiq_disk] ,[narxi(dollar)] FROM [magazin].[dbo].[kompyuter] WHERE nomi LIKE'%" + textBox1.Text + "%'", con);
DataTable data = new DataTable();
r.Fill(data);
dataGridView1.DataSource = data;
}
else if (comboBox1.Text == "narxi")
{ SqlDataAdapter r = new SqlDataAdapter("SELECT TOP (1000) [nomi] ,[operativka] ,[qattiq_disk] ,[narxi(dollar)] FROM [magazin].[dbo].[kompyuter] WHERE narxi(dollar) LIKE'%" + textBox1.Text + "%'", con);
DataTable data = new DataTable();
r.Fill(data);
dataGridView1.DataSource = data;
}
else if (comboBox1.Text == "operativka")
{ SqlDataAdapter r = new SqlDataAdapter("SELECT TOP (1000) [nomi] ,[operativka] ,[qattiq_disk] ,[narxi(dollar)] FROM [magazin].[dbo].[kompyuter] WHERE operativka LIKE'%" + textBox1.Text + "%'", con);
DataTable data = new DataTable();
r.Fill(data);
dataGridView1.DataSource = data;
}
else if (comboBox1.Text == "xotira hajmi")
{
SqlDataAdapter r = new SqlDataAdapter("SELECT TOP (1000) [nomi] ,[operativka] ,[qattiq_disk] ,[narxi(dollar)] FROM [magazin].[dbo].[kompyuter] WHERE qattiq_disk LIKE'%" + textBox1.Text + "%'", con);
DataTable data = new DataTable();
r.Fill(data);
dataGridView1.DataSource = data;
2.2. Dasturdan foydalanish qoidalari
Dasturni ishga tushirish *.exe fayli yuklanadi. Dastur ishga tushganda quyidagi oynalar ko‘rinadi.
So’ngra asosiy oyna ko’rinadi. Shu yerdan kerakli ma’lmotlar olinadi.
Bu oynadan yangi foydalanuvchini o’chirish imkniyati bor
7.Admin oynalari
8.Malu’motlarni o’chirish oynasi
Agarda ro’yxatdan o’tib ,foydalanuvchi bo’lsak bizda quyidagi ko’rinishdagi oynalar hosil bo’ladi:
|
| |