Kutubxonani avtomatlashtirish tarixi 9




Download 2,44 Mb.
bet7/12
Sana14.05.2024
Hajmi2,44 Mb.
#232837
1   2   3   4   5   6   7   8   9   ...   12
Bog'liq
Abdulloyeva Sitora

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 WindowsFormsApp4
{
public partial class book : Form
{
public book()
{
InitializeComponent();
}
SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\user\Documents\Kutubxonadb.mdf;Integrated Security=True;Connect Timeout=30");
private void label7_Click(object sender, EventArgs e)
{
populate();
}
public void populate()
{
con.Open();
string query = "select* from Bookdb";
SqlDataAdapter da = new SqlDataAdapter(query, con);
SqlCommandBuilder builder = new SqlCommandBuilder(da);
var ds = new DataSet();
da.Fill(ds);
BGridView1.DataSource = ds.Tables[0];
con.Close();
}

private void label3_Click(object sender, EventArgs e)
{

}

private void label4_Click(object sender, EventArgs e)
{

}

private void label5_Click(object sender, EventArgs e)
{

}

private void label6_Click(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
if (BookName.Text == "" BAuthor.Text == "" BPublisher.Text == "" BPrice.Text == "" BQuality.Text == "")
{
MessageBox.Show("Ma'lumot qo'shildi");

Download 2,44 Mb.
1   2   3   4   5   6   7   8   9   ...   12




Download 2,44 Mb.

Bosh sahifa
Aloqalar

    Bosh sahifa



Kutubxonani avtomatlashtirish tarixi 9

Download 2,44 Mb.