Har qanday taraqqiy etgan jamiyat hayotida axborotning ahamiyati uzluksiz ortib bormoqda




Download 1,81 Mb.
bet18/18
Sana12.01.2024
Hajmi1,81 Mb.
#135841
1   ...   10   11   12   13   14   15   16   17   18
Bog'liq
Har qanday taraqqiy etgan jamiyat hayotida axborotning ahamiyati

Form3.cs
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 MySql.Data.MySqlClient;
using System.Configuration;

namespace MySecureOTP


{
public partial class Form3 : Form
{
SqlConnection conn;
string connstring;
public Form3()
{
InitializeComponent();
connstring = ConfigurationManager.ConnectionStrings["MySecureOTP.Properties.Settings.MySecureOTPConnectionString"].ConnectionString;
}

public void open_mijoz()


{
using (conn = new SqlConnection(connstring))
using (SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM mijoz", conn))
{
DataTable usertable = new DataTable();
adapter.Fill(usertable);
dataGridView1.DataSource = usertable;
}
}

void otpshow() // organizatsiya nomini olish


{
SqlDataReader myreader;
string query = "SELECT * FROM mijoz";
using (conn = new SqlConnection(connstring))
using (SqlCommand command = new SqlCommand(query, conn))
{
conn.Open();
myreader = command.ExecuteReader();
while (myreader.Read())
{
string sname = myreader.GetString(1);
textBox1.Text = sname;
//textBox24.Text = sname;
}
}
}
private void Form3_Load(object sender, EventArgs e)
{
open_mijoz();
otpshow();
}
}
}
Form4.cs
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 MySecureOTP


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



Download 1,81 Mb.
1   ...   10   11   12   13   14   15   16   17   18




Download 1,81 Mb.

Bosh sahifa
Aloqalar

    Bosh sahifa



Har qanday taraqqiy etgan jamiyat hayotida axborotning ahamiyati uzluksiz ortib bormoqda

Download 1,81 Mb.