Uploaded by Firdavs Azamatov

713-20 guruh.Azamatov Firdavs.

advertisement
Azamatov Firdavs
Dasturlash 2 fanidan 1-labaratoriya ishi.
Mavzu: Talabalr turar joyida yashovchi talabalarning ma’lumotlar bazasi
shakillantirish.
Visual Studio dasturining Visual C++ dasturlash tilida kichik loyihalar yaratish Loyiha bu
Visual Studio dasturining Visual C++ dasturlash tilida kichik loyihalar yaratish
Loyiha bu - insonlarning real hayotida vujudga keladigan, axborot texnologiyalari
yordamidamida bartaraf etish mumkin bo’lgan muammolarni zamonaviy dasturlash tillari
yordamida dasturlashdir.
Loyiha tuzish uchun avval mavjud muammo atroflicha o’rganiladi. Ya’niy ushbu muammoning
dolzarbligi, foydali va foydasiz tomonlariga hamda ushbu loyihaning dasturiy vositasi yaratilishi
uchun sarflangan vaqtga kata ahamiyat qaratilishi kerak.
Loyihaning nomi:
Talabalr turar joyida yashovchi talabalarning ma’lumotlar bazasi shakillantirish
Loyiha dolzarbligi:
Oliy ta’lim muassalarida talabalar haqidagi ma’lumotlarni shakillantirishda MS Office dasturlari
(MS word, MS Excell) dan foydalanilmoqda. Bu esa quyidagi muammolarga olib kelmoqda:
. talaba haqidagi ma’lumotlarni o’z vaqtida yangilanmasligiga;
. talaba haqida so’ralgan ma’lumotlarni tez va ishonchli tayyorlash va yetkazilmasligiga;
Loyiha strukturasining tavsilotlari:
Ushbu muammollarni bartaraf etish uchun TTJ nomli Ma’lumotlar bazasi yaratildi. Unda 3 ta
jadval shakillantirildi va mos ustunlari orqali bog’landi hamda ular asosida SQL Serverda 7 ta
funksiya va 5 ta proseduralar yaratildi. MB ni Visual Studio dasturining C++ dasturlash tili
yordamida vizuallashtirildi. Baza bilan bog’lanish uchun TTJ_sinf nomli class yaratildi. Unda
dinamik funksiya yaratildi. Ushbu funksiya yordamida MB dagi jadvallarga murojaatlarni
amalga oshirish mumkin.
Funksiya nomlari va parametrlari:
1.
talabalar_soni();
2.
talabalar_soni_o();
3.
talabalar_soni_q();
4.
talabalar_soni(@ jinsi (nvarchar(5));
5.
viloyat(@viloyat_nomi (nvarchar(30)));
6.
viloyat_tuman(@viloyat_nomi (nvarchar(30), @tuman_nomi (nvarchar(30)));
7.
kam_taminlanganlar_soni();
Prosedura nomlari va parametrlari:
Loyihaning Visual C++ yordamida vizuallashtirilgan ko’rinishi:
O’zgartirish bo’limi oynasi
Qidirish bo’limi oynasi
Yangilash bo’limi oynasi
MB bilan bog’lanish va ma’lumotlaridan foydalanish uchun class yaratish
Class da global funksiya yaratish (MS ACCESS uchun)
Class da global funksiya yaratish (SQL Server uchun)
Dasturda class dan foydalanish
Bazaga bog’lanish va undan ma’lumotlar qidirish funksiyasi
SQL so’rovlari amalga oshirish
Ma’lumotlarni komponentalarga chiqarish
Ma’lumotlarni yangilash
Bazaga yangi ma’lumotlar kiritish
Bazada yangi jadval yaratish
Ma’lumotlar bazasi (TTJ.rar) faylida;
Dasturiy vosita (TTJ_dastur.rar) faylida taqdim etildi.
Login: Oybek;
Password: 564;
Dasturiy vositaning listing kodi:
TTJ_sinf.h
#pragma once
using namespace System;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Data::OleDb;
ref class TTJ_sinf
{
public:
TTJ_sinf(void){};
void ShowRecord(DataGridView^ DBGrid, String^ komanda);
};
TTJ_sinf.cpp
#include "stdafx.h"
#include "TTJ_sinf.h"
void TTJ_sinf::ShowRecord(DataGridView^ DBGrid, String^ komanda){ //"Select * From
Talabalar"
System::Data::OleDb::OleDbConnection^ DBConnection = gcnew
System::Data::OleDb::OleDbConnection(
"Data Source=\"TTJ.mdb\";User " + "ID=Admin;Provider=\"Microsoft.Jet.OLEDB.4.0\";");
DBConnection->Open();
System::Data::DataSet^ SetData = gcnew System::Data::DataSet();
//"Select * From Talabalar", DBConnection
OleDb::OleDbDataAdapter^ DBQuyery = gcnew
System::Data::OleDb::OleDbDataAdapter(komanda, DBConnection);
DBQuyery->Fill(SetData);
DBGrid->DataSource = SetData->Tables[0]->DefaultView;
DBConnection->Close();
delete DBConnection, DBQuyery, SetData;
}
Autentifikatsiya.h
#pragma once
#include
#include
#include
#include"Asosiy_oyna.h";
//#include"Form1.h";
#include"TTJ_sinf.h";
namespace TTJ_New {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
///
/// Summary for Audentifikatsiya
///
public ref class Audentifikatsiya : public System::Windows::Forms::Form
{
public: TTJ_sinf^ TTJ;
public:
Audentifikatsiya(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
///
/// Clean up any resources being used.
///
~Audentifikatsiya()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Button^ button1;
protected:
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::TextBox^ textBox2;
private: System::Windows::Forms::Label^ password;
private: System::Windows::Forms::DataGridView^ dataGridView1;
private: System::Windows::Forms::Label^ Login;
private:
///
/// Required designer variable.
///
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
void InitializeComponent(void)
{
this->button1 = (gcnew System::Windows::Forms::Button());
this->label1 = (gcnew System::Windows::Forms::Label());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->label2 = (gcnew System::Windows::Forms::Label());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->password = (gcnew System::Windows::Forms::Label());
this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());
this->Login = (gcnew System::Windows::Forms::Label());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))>BeginInit();
this->SuspendLayout();
//
// button1
//
this->button1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->button1->Location = System::Drawing::Point(23, 116);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(250, 47);
this->button1->TabIndex = 2;
this->button1->Text = L"Ok";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &Audentifikatsiya::button1_Click);
//
// label1
//
this->label1->AutoSize = true;
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label1->Location = System::Drawing::Point(19, 65);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(63, 24);
this->label1->TabIndex = 4;
this->label1->Text = L"Parol :";
//
// textBox1
//
this->textBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox1->Location = System::Drawing::Point(88, 62);
this->textBox1->Multiline = true;
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Drawing::Size(185, 35);
this->textBox1->TabIndex = 1;
//
// label2
//
this->label2->AutoSize = true;
this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label2->Location = System::Drawing::Point(19, 24);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(62, 24);
this->label2->TabIndex = 7;
this->label2->Text = L"Login:";
//
// textBox2
//
this->textBox2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox2->Location = System::Drawing::Point(88, 21);
this->textBox2->Multiline = true;
this->textBox2->Name = L"textBox2";
this->textBox2->Size = System::Drawing::Size(185, 35);
this->textBox2->TabIndex = 0;
//
// password
//
this->password->AutoSize = true;
this->password->Location = System::Drawing::Point(303, 183);
this->password->Name = L"password";
this->password->Size = System::Drawing::Size(0, 13);
this->password->TabIndex = 8;
this->password->Visible = false;
//
// dataGridView1
//
this->dataGridView1->ColumnHeadersHeightSizeMode =
System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
this->dataGridView1->Location = System::Drawing::Point(178, 95);
this->dataGridView1->Name = L"dataGridView1";
this->dataGridView1->Size = System::Drawing::Size(65, 20);
this->dataGridView1->TabIndex = 9;
this->dataGridView1->Visible = false;
//
// Login
//
this->Login->AutoSize = true;
this->Login->Location = System::Drawing::Point(319, 32);
this->Login->Name = L"Login";
this->Login->Size = System::Drawing::Size(0, 13);
this->Login->TabIndex = 10;
this->Login->Visible = false;
//
// Audentifikatsiya
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(294, 169);
this->Controls->Add(this->Login);
this->Controls->Add(this->dataGridView1);
this->Controls->Add(this->password);
this->Controls->Add(this->label2);
this->Controls->Add(this->textBox2);
this->Controls->Add(this->button1);
this->Controls->Add(this->label1);
this->Controls->Add(this->textBox1);
this->Name = L"Audentifikatsiya";
this->Text = L"Audentifikatsiya";
this->Load += gcnew System::EventHandler(this, &Audentifikatsiya::Audentifikatsiya_Load);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))>EndInit();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
int k;
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
Asosiy_oyna^ ob = gcnew Asosiy_oyna(this);
TTJ = gcnew TTJ_sinf(); bool s;
TTJ->ShowRecord(dataGridView1,"Select * From Login Where(login ='"+textBox2->Text+"'
AND password ='"+textBox1->Text+"')");
delete TTJ;
password->Text = Convert::ToString(dataGridView1->Rows[0]->Cells["password"]->Value);
Login->Text = Convert::ToString(dataGridView1->Rows[0]->Cells["login"]->Value);
if(textBox1->Text==password->Text && textBox2->Text==Login->Text){
ob->Show();
this->Hide();
}
else {MessageBox::Show("Parol xato kiritildi");k++;}
if(k>3){this->Close();}
}
private: System::Void Audentifikatsiya_Load(System::Object^ sender, System::EventArgs^ e) {
TTJ = gcnew TTJ_sinf(); bool s;
TTJ->ShowRecord(dataGridView1,"Select * From Login");
delete TTJ;
password->Text = Convert::ToString(dataGridView1->Rows[0]->Cells["password"]->Value);
Login->Text = Convert::ToString(dataGridView1->Rows[0]->Cells["login"]->Value);
if(password->Text=="" && Login->Text==""){
label1->Visible=false;
label2->Visible=false;
textBox1->Visible=false;
textBox2->Visible=false;
button1->Text="Parol yoq. Marhamat";
}
else {
//password->Text= gcnew String(parol);
//label1->Text="Eski parolni yozing";
label1->Visible=true;
label2->Visible=true;
textBox1->Visible=true;
textBox2->Visible=true;
button1->Text="Parolni kiritig";
}
}
};
}
Asosiy_oyna.h
#pragma once
#include"Form1.h";
#include"Studentlarni_yangilash.h";
#include"Qidirish.h";
#include"TTJ_sinf.h";
namespace TTJ_New {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
///
/// Summary for Asosiy_oyna
///
public ref class Asosiy_oyna : public System::Windows::Forms::Form
{
private: Object^ g_Autentifikatsiya;
public:
Asosiy_oyna(Object^ o)
{
g_Autentifikatsiya = o;
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
///
/// Clean up any resources being used.
///
~Asosiy_oyna()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Button^ button2;
private: System::Windows::Forms::Button^ button3;
protected:
private:
///
/// Required designer variable.
///
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
void InitializeComponent(void)
{
this->button1 = (gcnew System::Windows::Forms::Button());
this->button2 = (gcnew System::Windows::Forms::Button());
this->button3 = (gcnew System::Windows::Forms::Button());
this->SuspendLayout();
//
// button1
//
this->button1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->button1->Location = System::Drawing::Point(12, 32);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(130, 60);
this->button1->TabIndex = 0;
this->button1->Text = L"O\'zgartirish";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &Asosiy_oyna::button1_Click);
//
// button2
//
this->button2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->button2->Location = System::Drawing::Point(160, 32);
this->button2->Name = L"button2";
this->button2->Size = System::Drawing::Size(130, 60);
this->button2->TabIndex = 1;
this->button2->Text = L"Qidirish";
this->button2->UseVisualStyleBackColor = true;
this->button2->Click += gcnew System::EventHandler(this, &Asosiy_oyna::button2_Click);
//
// button3
//
this->button3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->button3->Location = System::Drawing::Point(307, 32);
this->button3->Name = L"button3";
this->button3->Size = System::Drawing::Size(130, 60);
this->button3->TabIndex = 2;
this->button3->Text = L"Yangilash";
this->button3->UseVisualStyleBackColor = true;
this->button3->Click += gcnew System::EventHandler(this, &Asosiy_oyna::button3_Click);
//
// Asosiy_oyna
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(449, 129);
this->Controls->Add(this->button3);
this->Controls->Add(this->button2);
this->Controls->Add(this->button1);
this->Name = L"Asosiy_oyna";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
this->Text = L"Asosiy_oyna";
this->FormClosed += gcnew System::Windows::Forms::FormClosedEventHandler(this,
&Asosiy_oyna::Asosiy_oyna_FormClosed);
this->ResumeLayout(false);
}
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
Form1^ ob= gcnew Form1(this);
ob->Show();
this->Hide();
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
Qidirish^ ob= gcnew Qidirish(this);
ob->Show();
this->Hide();
}
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
Studentlarni_yangilash^ ob= gcnew Studentlarni_yangilash(this);
ob->Show();
ob->button1->Visible=false;
this->Hide();
}
private: System::Void Asosiy_oyna_FormClosed(System::Object^ sender,
System::Windows::Forms::FormClosedEventArgs^ e) {
Application::Exit();
}
};
}
Form1.h
#pragma once
#include"TTJ_sinf.h"
#include"Studentlarni_yangilash.h"
namespace TTJ_New {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::IO;
using namespace System::Data::OleDb;
///
/// Summary for Form1
///
public ref class Form1 : public System::Windows::Forms::Form
{
private: Object^ St;
public:
Form1(Object^ o)
{
St=o;
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
private: System::Windows::Forms::TabControl^ tabControl1;
public:
private: System::Windows::Forms::TabPage^ tabPage1;
private: System::Windows::Forms::TabPage^ tabPage2;
private: System::Windows::Forms::TabPage^ tabPage3;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::Label^ label5;
private: System::Windows::Forms::Label^ label6;
private: System::Windows::Forms::PictureBox^ pictureBox2;
private: System::Windows::Forms::DataGridView^ dataGridView2;
private: System::Windows::Forms::PictureBox^ pictureBox3;
private: System::Windows::Forms::Label^ label7;
private: System::Windows::Forms::Label^ label8;
private: System::Windows::Forms::Label^ label9;
private: System::Windows::Forms::Label^ label10;
private: System::Windows::Forms::Label^ label11;
private: System::Windows::Forms::DataGridView^ dataGridView3;
private: System::Windows::Forms::PictureBox^ pictureBox4;
private: System::Windows::Forms::Label^ label12;
private: System::Windows::Forms::Label^ label13;
private: System::Windows::Forms::Label^ label14;
private: System::Windows::Forms::Label^ label15;
private: System::Windows::Forms::Label^ label16;
private: System::Windows::Forms::Label^ label17;
private: System::Windows::Forms::Label^ label18;
private: System::Windows::Forms::Label^ label19;
private: System::Windows::Forms::Label^ label20;
private: System::Windows::Forms::Label^ label21;
private: System::Windows::Forms::PictureBox^ pictureBox5;
public: TTJ_sinf^ TTJ;
protected:
///
/// Clean up any resources being used.
///
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::DataGridView^ dataGridView1;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::PictureBox^ pictureBox1;
private: System::Windows::Forms::Button^ button2;
private: System::Windows::Forms::Label^ label1;
protected:
private:
///
/// Required designer variable.
///
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
void InitializeComponent(void)
{
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle13 = (gcnew
System::Windows::Forms::DataGridViewCellStyle());
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle14 = (gcnew
System::Windows::Forms::DataGridViewCellStyle());
System::ComponentModel::ComponentResourceManager^ resources = (gcnew
System::ComponentModel::ComponentResourceManager(Form1::typeid));
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle15 = (gcnew
System::Windows::Forms::DataGridViewCellStyle());
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle16 = (gcnew
System::Windows::Forms::DataGridViewCellStyle());
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle17 = (gcnew
System::Windows::Forms::DataGridViewCellStyle());
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle18 = (gcnew
System::Windows::Forms::DataGridViewCellStyle());
this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());
this->button1 = (gcnew System::Windows::Forms::Button());
this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
this->button2 = (gcnew System::Windows::Forms::Button());
this->label1 = (gcnew System::Windows::Forms::Label());
this->tabControl1 = (gcnew System::Windows::Forms::TabControl());
this->tabPage1 = (gcnew System::Windows::Forms::TabPage());
this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox());
this->tabPage2 = (gcnew System::Windows::Forms::TabPage());
this->dataGridView2 = (gcnew System::Windows::Forms::DataGridView());
this->tabPage3 = (gcnew System::Windows::Forms::TabPage());
this->label2 = (gcnew System::Windows::Forms::Label());
this->label3 = (gcnew System::Windows::Forms::Label());
this->label4 = (gcnew System::Windows::Forms::Label());
this->label5 = (gcnew System::Windows::Forms::Label());
this->label6 = (gcnew System::Windows::Forms::Label());
this->pictureBox3 = (gcnew System::Windows::Forms::PictureBox());
this->label7 = (gcnew System::Windows::Forms::Label());
this->label8 = (gcnew System::Windows::Forms::Label());
this->label9 = (gcnew System::Windows::Forms::Label());
this->label10 = (gcnew System::Windows::Forms::Label());
this->label11 = (gcnew System::Windows::Forms::Label());
this->dataGridView3 = (gcnew System::Windows::Forms::DataGridView());
this->pictureBox4 = (gcnew System::Windows::Forms::PictureBox());
this->label12 = (gcnew System::Windows::Forms::Label());
this->label13 = (gcnew System::Windows::Forms::Label());
this->label14 = (gcnew System::Windows::Forms::Label());
this->label15 = (gcnew System::Windows::Forms::Label());
this->label16 = (gcnew System::Windows::Forms::Label());
this->label17 = (gcnew System::Windows::Forms::Label());
this->label18 = (gcnew System::Windows::Forms::Label());
this->label19 = (gcnew System::Windows::Forms::Label());
this->label20 = (gcnew System::Windows::Forms::Label());
this->label21 = (gcnew System::Windows::Forms::Label());
this->pictureBox5 = (gcnew System::Windows::Forms::PictureBox());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))>BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))>BeginInit();
this->tabControl1->SuspendLayout();
this->tabPage1->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))>BeginInit();
this->tabPage2->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView2))>BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox3))>BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView3))>BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox4))>BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox5))>BeginInit();
this->SuspendLayout();
//
// dataGridView1
//
this->dataGridView1->AllowDrop = true;
this->dataGridView1->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
this->dataGridView1->ColumnHeadersBorderStyle =
System::Windows::Forms::DataGridViewHeaderBorderStyle::Sunken;
dataGridViewCellStyle13->Alignment =
System::Windows::Forms::DataGridViewContentAlignment::MiddleLeft;
dataGridViewCellStyle13->BackColor = System::Drawing::Color::Blue;
dataGridViewCellStyle13->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif",
12.25F));
dataGridViewCellStyle13->ForeColor = System::Drawing::SystemColors::WindowText;
dataGridViewCellStyle13->SelectionBackColor = System::Drawing::SystemColors::Highlight;
dataGridViewCellStyle13->SelectionForeColor = System::Drawing::Color::Blue;
dataGridViewCellStyle13->WrapMode =
System::Windows::Forms::DataGridViewTriState::True;
this->dataGridView1->ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13;
this->dataGridView1->ColumnHeadersHeightSizeMode =
System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
this->dataGridView1->GridColor = System::Drawing::SystemColors::ActiveCaption;
this->dataGridView1->ImeMode = System::Windows::Forms::ImeMode::AlphaFull;
this->dataGridView1->Location = System::Drawing::Point(7, 8);
this->dataGridView1->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->dataGridView1->Name = L"dataGridView1";
dataGridViewCellStyle14->BackColor = System::Drawing::SystemColors::ButtonHighlight;
this->dataGridView1->RowsDefaultCellStyle = dataGridViewCellStyle14;
this->dataGridView1->SelectionMode =
System::Windows::Forms::DataGridViewSelectionMode::FullRowSelect;
this->dataGridView1->Size = System::Drawing::Size(1029, 250);
this->dataGridView1->TabIndex = 0;
this->dataGridView1->SelectionChanged += gcnew System::EventHandler(this,
&Form1::dataGridView1_SelectionChanged);
this->dataGridView1->Click += gcnew System::EventHandler(this,
&Form1::dataGridView1_Click);
this->dataGridView1->DoubleClick += gcnew System::EventHandler(this,
&Form1::dataGridView1_DoubleClick);
this->dataGridView1->MouseMove += gcnew
System::Windows::Forms::MouseEventHandler(this, &Form1::dataGridView1_MouseMove);
//
// button1
//
this->button1->Location = System::Drawing::Point(292, 435);
this->button1->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(112, 35);
this->button1->TabIndex = 1;
this->button1->Text = L"Yuklash";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
//
// pictureBox1
//
this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources>GetObject(L"pictureBox1.Image")));
this->pictureBox1->Location = System::Drawing::Point(13, 3);
this->pictureBox1->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->pictureBox1->Name = L"pictureBox1";
this->pictureBox1->Size = System::Drawing::Size(133, 121);
this->pictureBox1->SizeMode =
System::Windows::Forms::PictureBoxSizeMode::StretchImage;
this->pictureBox1->TabIndex = 2;
this->pictureBox1->TabStop = false;
this->pictureBox1->WaitOnLoad = true;
this->pictureBox1->Click += gcnew System::EventHandler(this, &Form1::pictureBox1_Click);
//
// button2
//
this->button2->Location = System::Drawing::Point(456, 435);
this->button2->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->button2->Name = L"button2";
this->button2->Size = System::Drawing::Size(112, 35);
this->button2->TabIndex = 3;
this->button2->Text = L"Insert";
this->button2->UseVisualStyleBackColor = true;
this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(93, 454);
this->label1->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(53, 20);
this->label1->TabIndex = 5;
this->label1->Text = L"label1";
this->label1->Visible = false;
//
// tabControl1
//
this->tabControl1->Controls->Add(this->tabPage1);
this->tabControl1->Controls->Add(this->tabPage2);
this->tabControl1->Controls->Add(this->tabPage3);
this->tabControl1->Location = System::Drawing::Point(12, 132);
this->tabControl1->Name = L"tabControl1";
this->tabControl1->SelectedIndex = 0;
this->tabControl1->Size = System::Drawing::Size(1048, 299);
this->tabControl1->TabIndex = 2;
//
// tabPage1
//
this->tabPage1->Controls->Add(this->pictureBox2);
this->tabPage1->Controls->Add(this->dataGridView1);
this->tabPage1->Location = System::Drawing::Point(4, 29);
this->tabPage1->Name = L"tabPage1";
this->tabPage1->Padding = System::Windows::Forms::Padding(3);
this->tabPage1->Size = System::Drawing::Size(1040, 266);
this->tabPage1->TabIndex = 0;
this->tabPage1->Text = L"Talabalar jadvali";
this->tabPage1->UseVisualStyleBackColor = true;
//
// pictureBox2
//
this->pictureBox2->Image = (cli::safe_cast<System::Drawing::Image^ >(resources>GetObject(L"pictureBox2.Image")));
this->pictureBox2->Location = System::Drawing::Point(607, 73);
this->pictureBox2->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->pictureBox2->Name = L"pictureBox2";
this->pictureBox2->Size = System::Drawing::Size(133, 121);
this->pictureBox2->SizeMode =
System::Windows::Forms::PictureBoxSizeMode::StretchImage;
this->pictureBox2->TabIndex = 8;
this->pictureBox2->TabStop = false;
this->pictureBox2->Visible = false;
this->pictureBox2->WaitOnLoad = true;
//
// tabPage2
//
this->tabPage2->Controls->Add(this->dataGridView2);
this->tabPage2->Location = System::Drawing::Point(4, 29);
this->tabPage2->Name = L"tabPage2";
this->tabPage2->Padding = System::Windows::Forms::Padding(3);
this->tabPage2->Size = System::Drawing::Size(1040, 266);
this->tabPage2->TabIndex = 1;
this->tabPage2->Text = L"Qarindoshlar jadvali";
this->tabPage2->UseVisualStyleBackColor = true;
//
// dataGridView2
//
this->dataGridView2->AllowDrop = true;
this->dataGridView2->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
this->dataGridView2->ColumnHeadersBorderStyle =
System::Windows::Forms::DataGridViewHeaderBorderStyle::Sunken;
dataGridViewCellStyle15->Alignment =
System::Windows::Forms::DataGridViewContentAlignment::MiddleLeft;
dataGridViewCellStyle15->BackColor = System::Drawing::Color::Blue;
dataGridViewCellStyle15->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif",
12.25F));
dataGridViewCellStyle15->ForeColor = System::Drawing::SystemColors::WindowText;
dataGridViewCellStyle15->SelectionBackColor = System::Drawing::SystemColors::Highlight;
dataGridViewCellStyle15->SelectionForeColor = System::Drawing::Color::Blue;
dataGridViewCellStyle15->WrapMode =
System::Windows::Forms::DataGridViewTriState::True;
this->dataGridView2->ColumnHeadersDefaultCellStyle = dataGridViewCellStyle15;
this->dataGridView2->ColumnHeadersHeightSizeMode =
System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
this->dataGridView2->GridColor = System::Drawing::SystemColors::ActiveCaption;
this->dataGridView2->ImeMode = System::Windows::Forms::ImeMode::AlphaFull;
this->dataGridView2->Location = System::Drawing::Point(8, 8);
this->dataGridView2->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->dataGridView2->Name = L"dataGridView2";
dataGridViewCellStyle16->BackColor = System::Drawing::SystemColors::ButtonHighlight;
this->dataGridView2->RowsDefaultCellStyle = dataGridViewCellStyle16;
this->dataGridView2->SelectionMode =
System::Windows::Forms::DataGridViewSelectionMode::FullRowSelect;
this->dataGridView2->Size = System::Drawing::Size(1025, 250);
this->dataGridView2->TabIndex = 1;
this->dataGridView2->SelectionChanged += gcnew System::EventHandler(this,
&Form1::dataGridView2_SelectionChanged);
this->dataGridView2->Click += gcnew System::EventHandler(this,
&Form1::dataGridView2_Click);
this->dataGridView2->DoubleClick += gcnew System::EventHandler(this,
&Form1::dataGridView2_DoubleClick);
//
// tabPage3
//
this->tabPage3->Location = System::Drawing::Point(4, 29);
this->tabPage3->Name = L"tabPage3";
this->tabPage3->Padding = System::Windows::Forms::Padding(3);
this->tabPage3->Size = System::Drawing::Size(1040, 266);
this->tabPage3->TabIndex = 2;
this->tabPage3->Text = L"Bino xonalari jadvali";
this->tabPage3->UseVisualStyleBackColor = true;
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(154, 9);
this->label2->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(53, 20);
this->label2->TabIndex = 7;
this->label2->Text = L"label2";
//
// label3
//
this->label3->AutoSize = true;
this->label3->Location = System::Drawing::Point(154, 30);
this->label3->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(53, 20);
this->label3->TabIndex = 7;
this->label3->Text = L"label2";
//
// label4
//
this->label4->AutoSize = true;
this->label4->Location = System::Drawing::Point(154, 51);
this->label4->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(53, 20);
this->label4->TabIndex = 7;
this->label4->Text = L"label2";
//
// label5
//
this->label5->AutoSize = true;
this->label5->Location = System::Drawing::Point(154, 73);
this->label5->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label5->Name = L"label5";
this->label5->Size = System::Drawing::Size(53, 20);
this->label5->TabIndex = 7;
this->label5->Text = L"label2";
//
// label6
//
this->label6->AutoSize = true;
this->label6->Location = System::Drawing::Point(154, 96);
this->label6->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label6->Name = L"label6";
this->label6->Size = System::Drawing::Size(53, 20);
this->label6->TabIndex = 7;
this->label6->Text = L"label2";
//
// pictureBox3
//
this->pictureBox3->Image = (cli::safe_cast<System::Drawing::Image^ >(resources>GetObject(L"pictureBox3.Image")));
this->pictureBox3->Location = System::Drawing::Point(265, 3);
this->pictureBox3->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->pictureBox3->Name = L"pictureBox3";
this->pictureBox3->Size = System::Drawing::Size(133, 121);
this->pictureBox3->SizeMode =
System::Windows::Forms::PictureBoxSizeMode::StretchImage;
this->pictureBox3->TabIndex = 2;
this->pictureBox3->TabStop = false;
this->pictureBox3->WaitOnLoad = true;
this->pictureBox3->Click += gcnew System::EventHandler(this, &Form1::pictureBox1_Click);
//
// label7
//
this->label7->AutoSize = true;
this->label7->Location = System::Drawing::Point(406, 9);
this->label7->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label7->Name = L"label7";
this->label7->Size = System::Drawing::Size(53, 20);
this->label7->TabIndex = 7;
this->label7->Text = L"label2";
//
// label8
//
this->label8->AutoSize = true;
this->label8->Location = System::Drawing::Point(406, 30);
this->label8->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label8->Name = L"label8";
this->label8->Size = System::Drawing::Size(53, 20);
this->label8->TabIndex = 7;
this->label8->Text = L"label2";
//
// label9
//
this->label9->AutoSize = true;
this->label9->Location = System::Drawing::Point(406, 51);
this->label9->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label9->Name = L"label9";
this->label9->Size = System::Drawing::Size(53, 20);
this->label9->TabIndex = 7;
this->label9->Text = L"label2";
//
// label10
//
this->label10->AutoSize = true;
this->label10->Location = System::Drawing::Point(406, 73);
this->label10->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label10->Name = L"label10";
this->label10->Size = System::Drawing::Size(53, 20);
this->label10->TabIndex = 7;
this->label10->Text = L"label2";
//
// label11
//
this->label11->AutoSize = true;
this->label11->Location = System::Drawing::Point(406, 96);
this->label11->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label11->Name = L"label11";
this->label11->Size = System::Drawing::Size(53, 20);
this->label11->TabIndex = 7;
this->label11->Text = L"label2";
//
// dataGridView3
//
this->dataGridView3->AllowDrop = true;
this->dataGridView3->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
this->dataGridView3->ColumnHeadersBorderStyle =
System::Windows::Forms::DataGridViewHeaderBorderStyle::Sunken;
dataGridViewCellStyle17->Alignment =
System::Windows::Forms::DataGridViewContentAlignment::MiddleLeft;
dataGridViewCellStyle17->BackColor = System::Drawing::Color::Blue;
dataGridViewCellStyle17->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif",
12.25F));
dataGridViewCellStyle17->ForeColor = System::Drawing::SystemColors::WindowText;
dataGridViewCellStyle17->SelectionBackColor = System::Drawing::SystemColors::Highlight;
dataGridViewCellStyle17->SelectionForeColor = System::Drawing::Color::Blue;
dataGridViewCellStyle17->WrapMode =
System::Windows::Forms::DataGridViewTriState::True;
this->dataGridView3->ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17;
this->dataGridView3->ColumnHeadersHeightSizeMode =
System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
this->dataGridView3->GridColor = System::Drawing::SystemColors::ActiveCaption;
this->dataGridView3->ImeMode = System::Windows::Forms::ImeMode::AlphaFull;
this->dataGridView3->Location = System::Drawing::Point(772, 435);
this->dataGridView3->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->dataGridView3->Name = L"dataGridView3";
dataGridViewCellStyle18->BackColor = System::Drawing::SystemColors::ButtonHighlight;
this->dataGridView3->RowsDefaultCellStyle = dataGridViewCellStyle18;
this->dataGridView3->SelectionMode =
System::Windows::Forms::DataGridViewSelectionMode::FullRowSelect;
this->dataGridView3->Size = System::Drawing::Size(168, 59);
this->dataGridView3->TabIndex = 8;
this->dataGridView3->Visible = false;
//
// pictureBox4
//
this->pictureBox4->Image = (cli::safe_cast<System::Drawing::Image^ >(resources>GetObject(L"pictureBox4.Image")));
this->pictureBox4->Location = System::Drawing::Point(525, 3);
this->pictureBox4->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->pictureBox4->Name = L"pictureBox4";
this->pictureBox4->Size = System::Drawing::Size(133, 121);
this->pictureBox4->SizeMode =
System::Windows::Forms::PictureBoxSizeMode::StretchImage;
this->pictureBox4->TabIndex = 2;
this->pictureBox4->TabStop = false;
this->pictureBox4->WaitOnLoad = true;
this->pictureBox4->Click += gcnew System::EventHandler(this, &Form1::pictureBox1_Click);
//
// label12
//
this->label12->AutoSize = true;
this->label12->Location = System::Drawing::Point(666, 9);
this->label12->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label12->Name = L"label12";
this->label12->Size = System::Drawing::Size(53, 20);
this->label12->TabIndex = 7;
this->label12->Text = L"label2";
//
// label13
//
this->label13->AutoSize = true;
this->label13->Location = System::Drawing::Point(666, 30);
this->label13->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label13->Name = L"label13";
this->label13->Size = System::Drawing::Size(53, 20);
this->label13->TabIndex = 7;
this->label13->Text = L"label2";
//
// label14
//
this->label14->AutoSize = true;
this->label14->Location = System::Drawing::Point(666, 51);
this->label14->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label14->Name = L"label14";
this->label14->Size = System::Drawing::Size(53, 20);
this->label14->TabIndex = 7;
this->label14->Text = L"label2";
//
// label15
//
this->label15->AutoSize = true;
this->label15->Location = System::Drawing::Point(666, 73);
this->label15->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label15->Name = L"label15";
this->label15->Size = System::Drawing::Size(53, 20);
this->label15->TabIndex = 7;
this->label15->Text = L"label2";
//
// label16
//
this->label16->AutoSize = true;
this->label16->Location = System::Drawing::Point(666, 96);
this->label16->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label16->Name = L"label16";
this->label16->Size = System::Drawing::Size(53, 20);
this->label16->TabIndex = 7;
this->label16->Text = L"label2";
//
// label17
//
this->label17->AutoSize = true;
this->label17->Location = System::Drawing::Point(926, 9);
this->label17->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label17->Name = L"label17";
this->label17->Size = System::Drawing::Size(53, 20);
this->label17->TabIndex = 10;
this->label17->Text = L"label2";
//
// label18
//
this->label18->AutoSize = true;
this->label18->Location = System::Drawing::Point(926, 30);
this->label18->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label18->Name = L"label18";
this->label18->Size = System::Drawing::Size(53, 20);
this->label18->TabIndex = 11;
this->label18->Text = L"label2";
//
// label19
//
this->label19->AutoSize = true;
this->label19->Location = System::Drawing::Point(926, 51);
this->label19->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label19->Name = L"label19";
this->label19->Size = System::Drawing::Size(53, 20);
this->label19->TabIndex = 12;
this->label19->Text = L"label2";
//
// label20
//
this->label20->AutoSize = true;
this->label20->Location = System::Drawing::Point(926, 73);
this->label20->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label20->Name = L"label20";
this->label20->Size = System::Drawing::Size(53, 20);
this->label20->TabIndex = 13;
this->label20->Text = L"label2";
//
// label21
//
this->label21->AutoSize = true;
this->label21->Location = System::Drawing::Point(926, 96);
this->label21->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
this->label21->Name = L"label21";
this->label21->Size = System::Drawing::Size(53, 20);
this->label21->TabIndex = 14;
this->label21->Text = L"label2";
//
// pictureBox5
//
this->pictureBox5->Image = (cli::safe_cast<System::Drawing::Image^ >(resources>GetObject(L"pictureBox5.Image")));
this->pictureBox5->Location = System::Drawing::Point(785, 3);
this->pictureBox5->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->pictureBox5->Name = L"pictureBox5";
this->pictureBox5->Size = System::Drawing::Size(133, 121);
this->pictureBox5->SizeMode =
System::Windows::Forms::PictureBoxSizeMode::StretchImage;
this->pictureBox5->TabIndex = 9;
this->pictureBox5->TabStop = false;
this->pictureBox5->WaitOnLoad = true;
//
// Form1
//
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::None;
this->AutoSize = true;
this->AutoValidate = System::Windows::Forms::AutoValidate::Disable;
this->BackgroundImageLayout = System::Windows::Forms::ImageLayout::None;
this->ClientSize = System::Drawing::Size(1062, 475);
this->Controls->Add(this->label17);
this->Controls->Add(this->label18);
this->Controls->Add(this->label19);
this->Controls->Add(this->label20);
this->Controls->Add(this->label21);
this->Controls->Add(this->pictureBox5);
this->Controls->Add(this->dataGridView3);
this->Controls->Add(this->label16);
this->Controls->Add(this->label11);
this->Controls->Add(this->label6);
this->Controls->Add(this->label15);
this->Controls->Add(this->label10);
this->Controls->Add(this->label5);
this->Controls->Add(this->label14);
this->Controls->Add(this->label9);
this->Controls->Add(this->label4);
this->Controls->Add(this->label13);
this->Controls->Add(this->label8);
this->Controls->Add(this->label3);
this->Controls->Add(this->label12);
this->Controls->Add(this->label7);
this->Controls->Add(this->label2);
this->Controls->Add(this->tabControl1);
this->Controls->Add(this->label1);
this->Controls->Add(this->button2);
this->Controls->Add(this->pictureBox4);
this->Controls->Add(this->pictureBox3);
this->Controls->Add(this->pictureBox1);
this->Controls->Add(this->button1);
this->DoubleBuffered = true;
this->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12.25F));
this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::Fixed3D;
this->HelpButton = true;
this->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->MaximizeBox = false;
this->MinimizeBox = false;
this->Name = L"Form1";
this->StartPosition = System::Windows::Forms::FormStartPosition::Manual;
this->Text = L"TTJ ma\'lumotlar bazasi";
this->FormClosed += gcnew System::Windows::Forms::FormClosedEventHandler(this,
&Form1::Form1_FormClosed);
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))>EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();
this->tabControl1->ResumeLayout(false);
this->tabPage1->ResumeLayout(false);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))->EndInit();
this->tabPage2->ResumeLayout(false);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView2))>EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox3))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView3))>EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox4))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox5))->EndInit();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
String^ Select_Komand;
public: Image^ loadFoto(array<unsigned char>^ Rasm){
MemoryStream^ ms=gcnew MemoryStream(Rasm);
return Image::FromStream(ms);
}
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
// String ^satr="SELECT * FROM [Talabalar]"; // WHERE (Fam LIKE '%M%')";
//DBSet(satr);
Select_Komand="Select id, Fam, Ism, Sharf, Guruh, Bosqich,Tugilgan_viloyati,
Pasport_seriasi,"+
"Tugilgan_Sana, Pasport_nomeri, Xona_nomeri, Blok_nomi, Qavat_nomeri, Lavozim, Telefoni,
Tugilgan_yili,"+
"Tugilgan_oyi, Tugilgan_kuni, Jinsi, Fakulteti, Yonalishi, Tugilgan_tumani, Yashash_manzili
From Talabalar";
TTJ = gcnew TTJ_sinf();
TTJ->ShowRecord(dataGridView1,"Select * From Talabalar");
TTJ->ShowRecord(dataGridView2,"Select * From Qarindoshlar");
delete TTJ;
}
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
//button1->Text="Qidirish";
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
// ornatish();
}
private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) {
}
void yangilash(int id, int h){
this->Hide();
Studentlarni_yangilash^ ob= gcnew Studentlarni_yangilash(this);
if(h==1){
try{
ob->pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView1->Rows[id]>Cells["Rasm"]->Value);
}
catch(Exception^ vaziyat){
}
ob->textBox1->Text= dataGridView1->Rows[id]->Cells[1]->Value->ToString();
ob->textBox2->Text= dataGridView1->Rows[id]->Cells[2]->Value->ToString();
ob->textBox3->Text= dataGridView1->Rows[id]->Cells[3]->Value->ToString();
ob->textBox4->Text= dataGridView1->Rows[id]->Cells[4]->Value->ToString();
ob->textBox5->Text= dataGridView1->Rows[id]->Cells[10]->Value->ToString();
ob->textBox6->Text= dataGridView1->Rows[id]->Cells[11]->Value->ToString();
ob->textBox7->Text= dataGridView1->Rows[id]->Cells[12]->Value->ToString();
ob->textBox8->Text= dataGridView1->Rows[id]->Cells[14]->Value->ToString();
ob->textBox9->Text= dataGridView1->Rows[id]->Cells[6]->Value->ToString();
ob->textBox10->Text= dataGridView1->Rows[id]->Cells[7]->Value->ToString();
ob->textBox11->Text= dataGridView1->Rows[id]->Cells[8]->Value->ToString();
ob->textBox13->Text= dataGridView1->Rows[id]->Cells[9]->Value->ToString();
ob->textBox14->Text= dataGridView1->Rows[id]->Cells[15]->Value->ToString();
ob->textBox15->Text= dataGridView1->Rows[id]->Cells[16]->Value->ToString();
ob->textBox16->Text= dataGridView1->Rows[id]->Cells[17]->Value->ToString();
ob->textBox20->Text= dataGridView1->Rows[id]->Cells[19]->Value->ToString();
ob->textBox21->Text= dataGridView1->Rows[id]->Cells[20]->Value->ToString();
ob->textBox22->Text= dataGridView1->Rows[id]->Cells[21]->Value->ToString();
ob->textBox23->Text= dataGridView1->Rows[id]->Cells[18]->Value->ToString();
ob->textBox24->Text= dataGridView1->Rows[id]->Cells[13]->Value->ToString();
ob->textBox12->Text= dataGridView1->Rows[id]->Cells[22]->Value->ToString();
ob->textBox17->Text= dataGridView1->Rows[id]->Cells[5]->Value->ToString();
ob->Kornat=1;
ob->Id=Id;
ob->label18->Text=ob->Id.ToString();}
else if(h==2){
try{
ob->pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[-0]>Cells[""]->Value);
}
catch(Exception^ vaziyat){
}
ob->textBox1->Text= dataGridView2->Rows[id]->Cells[1]->Value->ToString();
ob->textBox2->Text= dataGridView2->Rows[id]->Cells[2]->Value->ToString();
ob->textBox3->Text= dataGridView2->Rows[id]->Cells[3]->Value->ToString();
ob->label4->Text = "Yashash manzili:";
ob->textBox4->Text= dataGridView2->Rows[id]->Cells[4]->Value->ToString();
ob->label5->Text = "Tugilgan san:";
ob->textBox5->Text= dataGridView2->Rows[id]->Cells[5]->Value->ToString();
ob->label6->Text = "Qarindosh_turi:";
ob->textBox6->Text= dataGridView2->Rows[id]->Cells[6]->Value->ToString();
ob->label7->Text = "Id nomeri:";
ob->textBox7->Text= dataGridView2->Rows[id]->Cells[7]->Value->ToString();
ob->label8->Text = "Ish joyi:";
ob->textBox8->Text= dataGridView2->Rows[id]->Cells[8]->Value->ToString();
ob->label16->Text = "Telefoni:";
ob->textBox9->Text= dataGridView2->Rows[id]->Cells[9]->Value->ToString();
ob->label9->Text = "";
ob->label10->Text = "";
ob->label11->Text = "";
ob->label12->Text = "";
ob->label13->Text = "";
ob->label14->Text = "";
ob->label15->Text = "";
ob->label17->Text = "";
ob->label18->Text = "";
ob->label20->Text = "";
ob->label21->Text = "";
ob->label22->Text = "";
ob->label23->Text = "";
ob->label24->Text = "";
ob->Kornat=2;
ob->Id=Id;
ob->label18->Text=ob->Id.ToString();
}
//MessageBox::Show("Xato maydon bosh");}
ob->ShowDialog();
}
int Id;
private: System::Void dataGridView1_DoubleClick(System::Object^ sender,
System::EventArgs^ e) {
int rowToUpdate = dataGridView1->Rows>GetFirstRow(DataGridViewElementStates::Selected);
try{ int id = Convert::ToInt32(dataGridView1->Rows[rowToUpdate]->Cells["id"]->Value);
label1->Text = id.ToString();
Id=id;
yangilash(id-1,1);
}
catch(Exception ^v){MessageBox::Show("jjjj");}
}
private: System::Void dataGridView1_Click(System::Object^ sender, System::EventArgs^ e) {
//try{
pictureBox3->Visible = true; pictureBox4->Visible = true;
bool d, b,q;
int rowToUpdate = dataGridView1->Rows>GetFirstRow(DataGridViewElementStates::Selected);
//MessageBox::Show(rowToUpdate.ToString());
int id = Convert::ToInt32(dataGridView1->Rows[rowToUpdate]->Cells["id"]->Value);
Id=id;
String ^ xona_nomeri = dataGridView1->Rows[id-1]->Cells["Xona_nomeri"]->Value>ToString();
String ^satr="SELECT * FROM [Talabalar] Where (Xona_nomeri="+xona_nomeri+")";
// WHERE (Fam LIKE '%M%')";
qidirish(satr);
try{ pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[0]>Cells["Rasm"]->Value);
pictureBox1->Visible = true;
label2->Text = dataGridView3->Rows[-0]->Cells["Fam"]->Value->ToString();
label3->Text = dataGridView3->Rows[-0]->Cells["Ism"]->Value->ToString();
label4->Text = dataGridView3->Rows[-0]->Cells["Tugilgan_yili"]->Value->ToString()+" yil";
label5->Text = dataGridView3->Rows[-0]->Cells["Tugilgan_viloyati"]->Value->ToString();
label6->Text = dataGridView3->Rows[-0]->Cells["Xona_nomeri"]->Value->ToString()+"
xona";
}
catch(Exception^ vaziyat){pictureBox1->Image = pictureBox2->Image;
label2->Text = " ";
label3->Text = " ";
label4->Text = " ";
label5->Text = " ";
label6->Text = " "; d=1; pictureBox1->Visible = false;
//MessageBox::Show("xato");
}
try{pictureBox3->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[1]>Cells["Rasm"]->Value);
pictureBox3->Visible = true;
label7->Text = dataGridView3->Rows[1]->Cells["Fam"]->Value->ToString();
label8->Text = dataGridView3->Rows[1]->Cells["Ism"]->Value->ToString();
label9->Text = dataGridView3->Rows[1]->Cells["Tugilgan_yili"]->Value->ToString()+" yil";
label10->Text = dataGridView3->Rows[1]->Cells["Tugilgan_viloyati"]->Value->ToString();
label11->Text = dataGridView3->Rows[1]->Cells["Xona_nomeri"]->Value->ToString()+"
xona";
}
catch(Exception^ vaziyat){ pictureBox3->Image = pictureBox2->Image;
//MessageBox::Show("xato");
label7->Text = " ";
label8->Text = " ";
label9->Text = " ";
label10->Text = " ";
label11->Text = " "; b=1; pictureBox3->Visible = false;
}
try{pictureBox4->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[2]>Cells["Rasm"]->Value);
pictureBox4->Visible = true;
label12->Text = dataGridView3->Rows[2]->Cells["Fam"]->Value->ToString();
label13->Text = dataGridView3->Rows[2]->Cells["Ism"]->Value->ToString();
label14->Text = dataGridView3->Rows[2]->Cells["Tugilgan_yili"]->Value->ToString()+" yil";
label15->Text = dataGridView3->Rows[2]->Cells["Tugilgan_viloyati"]->Value->ToString();
label16->Text = dataGridView3->Rows[2]->Cells["Xona_nomeri"]->Value->ToString()+"
xona";
}
catch(Exception^ vaziyat){ pictureBox4->Image = pictureBox2->Image;
//MessageBox::Show("xato");
label12->Text = " ";
label13->Text = " ";
label14->Text = " ";
label15->Text = " ";
label16->Text = " "; q=1; pictureBox4->Visible = false;
}
try{pictureBox5->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[2]>Cells["Rasm"]->Value);
pictureBox5->Visible = true;
label17->Text = dataGridView3->Rows[3]->Cells["Fam"]->Value->ToString();
label18->Text = dataGridView3->Rows[3]->Cells["Ism"]->Value->ToString();
label19->Text = dataGridView3->Rows[3]->Cells["Tugilgan_yili"]->Value->ToString()+" yil";
label20->Text = dataGridView3->Rows[3]->Cells["Tugilgan_viloyati"]->Value->ToString();
label21->Text = dataGridView3->Rows[3]->Cells["Xona_nomeri"]->Value->ToString()+"
xona";
}
catch(Exception^ vaziyat){ pictureBox5->Image = pictureBox2->Image;
//MessageBox::Show("xato");
label17->Text = " ";
label18->Text = " ";
label19->Text = " ";
label20->Text = " ";
label21->Text = " "; q=1; pictureBox5->Visible = false;
}
if(d==1 && b==1 && q==1){
try{
int rowToUpdate_2 = dataGridView1->Rows>GetFirstRow(DataGridViewElementStates::Selected);
int id_2 = Convert::ToInt32(dataGridView1->Rows[rowToUpdate_2]->Cells["id"]->Value);
Id=id_2;
try{ pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView1->Rows[id-1]>Cells["Rasm"]->Value);}
catch(Exception^ vaziyat){pictureBox1->Image = pictureBox2->Image;
//MessageBox::Show("xato");
}
label2->Text = dataGridView1->Rows[id-1]->Cells[1]->Value->ToString();
label3->Text = dataGridView1->Rows[id-1]->Cells[2]->Value->ToString();
label4->Text = dataGridView1->Rows[id-1]->Cells[15]->Value->ToString()+" yil";
label5->Text = dataGridView1->Rows[id-1]->Cells[6]->Value->ToString();
label6->Text = dataGridView1->Rows[id-1]->Cells[10]->Value->ToString()+" xona";}
catch(Exception^ vaziyat){}
}
//}
//catch(Exception^ vaziyat){}//pictureBox1->Image->FromFile("user-192.png");}
}
private: System::Void dataGridView1_MouseMove(System::Object^ sender,
System::Windows::Forms::MouseEventArgs^ e) {
}
public: System::Void qidirish(String ^s){
auto Ulanish = gcnew OleDb::OleDbConnection( "Data Source=\"TTJ.mdb\";User " +
"ID=Admin;Provider=\"Microsoft.Jet.OLEDB.4.0\";");
Ulanish->Open();
auto Команда = gcnew OleDb::OleDbCommand(s, Ulanish);
// Adapter синфи объектини яратамиз ва SQL-сўровини //амалга оширамиз
auto Адаптер = gcnew OleDb::OleDbDataAdapter(Команда);
// DataSet синфи объектини яратамиз
auto НаборДанных = gcnew DataSet();
// DataSet ни SQL-сўровини натижалари билан //тўлдирамиз
Адаптер->Fill(НаборДанных, "talaba");
// DataSet да сатрлар кўриниши учун XML кўринишига //ўтади:
//auto СтрокаXML = НаборДанных->GetXml();
// Компонентага маълумот манбасини кўрсатамиз:
dataGridView3->DataSource = НаборДанных;
// Қидириладиган малумотларнинг жадвалини номини //кўрсатамиз:
dataGridView3->DataMember = "talaba";
Ulanish->Close();
}
private: System::Void dataGridView1_SelectionChanged(System::Object^ sender,
System::EventArgs^ e) {
pictureBox3->Visible = true; pictureBox4->Visible = true;
try{
bool d, b,q;
int rowToUpdate = dataGridView1->Rows>GetFirstRow(DataGridViewElementStates::Selected);
int id = Convert::ToInt32(dataGridView1->Rows[rowToUpdate]->Cells["id"]->Value);
Id=id;
String ^ xona_nomeri = dataGridView1->Rows[id-1]->Cells["Xona_nomeri"]->Value>ToString();
String ^satr="SELECT * FROM [Talabalar] Where (Xona_nomeri="+xona_nomeri+")";
// WHERE (Fam LIKE '%M%')";
qidirish(satr);
try{ pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[0]>Cells["Rasm"]->Value);
pictureBox1->Visible = true;
label2->Text = dataGridView3->Rows[-0]->Cells["Fam"]->Value->ToString();
label3->Text = dataGridView3->Rows[-0]->Cells["Ism"]->Value->ToString();
label4->Text = dataGridView3->Rows[-0]->Cells["Tugilgan_yili"]->Value->ToString()+" yil";
label5->Text = dataGridView3->Rows[-0]->Cells["Tugilgan_viloyati"]->Value->ToString();
label6->Text = dataGridView3->Rows[-0]->Cells["Xona_nomeri"]->Value->ToString()+"
xona";
}
catch(Exception^ vaziyat){pictureBox1->Image = pictureBox2->Image;
label2->Text = " ";
label3->Text = " ";
label4->Text = " ";
label5->Text = " ";
label6->Text = " "; d=1; pictureBox1->Visible = false;
//MessageBox::Show("xato");
}
try{pictureBox3->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[1]>Cells["Rasm"]->Value);
pictureBox3->Visible = true;
label7->Text = dataGridView3->Rows[1]->Cells["Fam"]->Value->ToString();
label8->Text = dataGridView3->Rows[1]->Cells["Ism"]->Value->ToString();
label9->Text = dataGridView3->Rows[1]->Cells["Tugilgan_yili"]->Value->ToString()+" yil";
label10->Text = dataGridView3->Rows[1]->Cells["Tugilgan_viloyati"]->Value->ToString();
label11->Text = dataGridView3->Rows[1]->Cells["Xona_nomeri"]->Value->ToString()+"
xona";
}
catch(Exception^ vaziyat){ pictureBox3->Image = pictureBox2->Image;
//MessageBox::Show("xato");
label7->Text = " ";
label8->Text = " ";
label9->Text = " ";
label10->Text = " ";
label11->Text = " "; b=1; pictureBox3->Visible = false;
}
try{pictureBox4->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[2]>Cells["Rasm"]->Value);
pictureBox4->Visible = true;
label12->Text = dataGridView3->Rows[2]->Cells["Fam"]->Value->ToString();
label13->Text = dataGridView3->Rows[2]->Cells["Ism"]->Value->ToString();
label14->Text = dataGridView3->Rows[2]->Cells["Tugilgan_yili"]->Value->ToString()+" yil";
label15->Text = dataGridView3->Rows[2]->Cells["Tugilgan_viloyati"]->Value->ToString();
label16->Text = dataGridView3->Rows[2]->Cells["Xona_nomeri"]->Value->ToString()+"
xona";
}
catch(Exception^ vaziyat){ pictureBox4->Image = pictureBox2->Image;
//MessageBox::Show("xato");
label12->Text = " ";
label13->Text = " ";
label14->Text = " ";
label15->Text = " ";
label16->Text = " "; q=1; pictureBox4->Visible = false;
}
try{pictureBox5->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[2]-
>Cells["Rasm"]->Value);
pictureBox5->Visible = true;
label17->Text = dataGridView3->Rows[3]->Cells["Fam"]->Value->ToString();
label18->Text = dataGridView3->Rows[3]->Cells["Ism"]->Value->ToString();
label19->Text = dataGridView3->Rows[3]->Cells["Tugilgan_yili"]->Value->ToString()+" yil";
label20->Text = dataGridView3->Rows[3]->Cells["Tugilgan_viloyati"]->Value->ToString();
label21->Text = dataGridView3->Rows[3]->Cells["Xona_nomeri"]->Value->ToString()+"
xona";
}
catch(Exception^ vaziyat){ pictureBox5->Image = pictureBox2->Image;
//MessageBox::Show("xato");
label17->Text = " ";
label18->Text = " ";
label19->Text = " ";
label20->Text = " ";
label21->Text = " "; q=1; pictureBox5->Visible = false;
}
if(d==1 && b==1 && q==1){
try{
int rowToUpdate_2 = dataGridView1->Rows>GetFirstRow(DataGridViewElementStates::Selected);
int id_2 = Convert::ToInt32(dataGridView1->Rows[rowToUpdate_2]->Cells["id"]->Value);
Id=id_2;
try{ pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView1->Rows[id-1]>Cells["Rasm"]->Value);}
catch(Exception^ vaziyat){pictureBox1->Image = pictureBox2->Image;
//MessageBox::Show("xato");
}
label2->Text = dataGridView1->Rows[id-1]->Cells[1]->Value->ToString();
label3->Text = dataGridView1->Rows[id-1]->Cells[2]->Value->ToString();
label4->Text = dataGridView1->Rows[id-1]->Cells[15]->Value->ToString()+" yil";
label5->Text = dataGridView1->Rows[id-1]->Cells[6]->Value->ToString();
label6->Text = dataGridView1->Rows[id-1]->Cells[10]->Value->ToString()+" xona";}
catch(Exception^ vaziyat){}
}
}
catch(Exception^ vaziyat){}
}
private: System::Void dataGridView2_Click(System::Object^ sender, System::EventArgs^ e) {
pictureBox3->Visible = false; pictureBox4->Visible = false; pictureBox5->Visible = false;
label7->Text = " ";
label8->Text = " ";
label9->Text = " ";
label10->Text = " ";
label11->Text = " ";
label12->Text = " ";
label13->Text = " ";
label14->Text = " ";
label15->Text = " ";
label16->Text = " ";
label17->Text = " ";
label18->Text = " ";
label19->Text = " ";
label20->Text = " ";
label21->Text = " ";
int rowToUpdate_3 = dataGridView2->Rows->GetFirstRow
(DataGridViewElementStates::Selected);
int id_3 = Convert::ToInt32(dataGridView2->Rows[rowToUpdate_3]->Cells["id"]->Value);
String ^ Id_nomeri = dataGridView2->Rows[id_3-1]->Cells[7]->Value->ToString();
label1->Text = Id_nomeri;
String ^satr="SELECT * FROM [Talabalar] Where (id = "+Id_nomeri+")";
qidirish(satr);
try{ pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[-0]>Cells[23]->Value);
label2->Text = dataGridView3->Rows[-0]->Cells[1]->Value->ToString();
label3->Text = dataGridView3->Rows[-0]->Cells[2]->Value->ToString();
label4->Text = dataGridView3->Rows[-0]->Cells[15]->Value->ToString()+" yil";
label5->Text = dataGridView3->Rows[-0]->Cells[6]->Value->ToString();
label6->Text = dataGridView3->Rows[-0]->Cells[10]->Value->ToString()+" xona";
int rowToUpdate_2 = dataGridView2->Rows>GetFirstRow(DataGridViewElementStates::Selected);
int id_2 = Convert::ToInt32(dataGridView2->Rows[rowToUpdate_2]->Cells["id"]->Value);
label7->Text = dataGridView2->Rows[id_2-1]->Cells[1]->Value->ToString();
label8->Text = dataGridView2->Rows[id_2-1]->Cells[2]->Value->ToString();
label9->Text = dataGridView2->Rows[id_2-1]->Cells[6]->Value->ToString();
label10->Text = dataGridView2->Rows[id_2-1]->Cells[8]->Value->ToString();
}
catch(Exception^ vaziyat){pictureBox1->Image = pictureBox2->Image;
label2->Text = " ";
label3->Text = " ";
label4->Text = " ";
label5->Text = " ";
label6->Text = " ";
label7->Text = " ";
label8->Text = " ";
label9->Text = " ";
label10->Text = " ";
//MessageBox::Show("Tanlandi");
}
}
private: System::Void dataGridView2_SelectionChanged(System::Object^ sender,
System::EventArgs^ e) {
try{
pictureBox3->Visible = false; pictureBox4->Visible = false;
label7->Text = " ";
label8->Text = " ";
label9->Text = " ";
label10->Text = " ";
label11->Text = " ";
label12->Text = " ";
label13->Text = " ";
label14->Text = " ";
label15->Text = " ";
label16->Text = " ";
int rowToUpdate = dataGridView2->Rows>GetFirstRow(DataGridViewElementStates::Selected);
int id = Convert::ToInt32(dataGridView2->Rows[rowToUpdate]->Cells["id"]->Value);
String ^ Id_nomeri = dataGridView2->Rows[id-1]->Cells[7]->Value->ToString();
String ^satr="SELECT * FROM [Talabalar] Where (id="+Id_nomeri+")";
qidirish(satr);
try{ pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[-0]>Cells["Rasm"]->Value);
label2->Text = dataGridView3->Rows[-0]->Cells[1]->Value->ToString();
label3->Text = dataGridView3->Rows[-0]->Cells[2]->Value->ToString();
label4->Text = dataGridView3->Rows[-0]->Cells[15]->Value->ToString()+" yil";
label5->Text = dataGridView3->Rows[-0]->Cells[6]->Value->ToString();
label6->Text = dataGridView3->Rows[-0]->Cells[10]->Value->ToString()+" xona";
int rowToUpdate_2 = dataGridView2->Rows>GetFirstRow(DataGridViewElementStates::Selected);
int id_2 = Convert::ToInt32(dataGridView2->Rows[rowToUpdate_2]->Cells["id"]->Value);
label7->Text = dataGridView2->Rows[id_2-1]->Cells[1]->Value->ToString();
label8->Text = dataGridView2->Rows[id_2-1]->Cells[2]->Value->ToString();
label9->Text = dataGridView2->Rows[id_2-1]->Cells[6]->Value->ToString();
label10->Text = dataGridView2->Rows[id_2-1]->Cells[8]->Value->ToString();
}
catch(Exception^ vaziyat){pictureBox1->Image = pictureBox2->Image;
label2->Text = " ";
label3->Text = " ";
label4->Text = " ";
label5->Text = " ";
label6->Text = " ";
label7->Text = " ";
label8->Text = " ";
label9->Text = " ";
label10->Text = " ";
//MessageBox::Show("Tanlandi");
}
}
catch(Exception^ v){}
}
private: System::Void dataGridView2_DoubleClick(System::Object^ sender,
System::EventArgs^ e) {
try{
int rowToUpdate = dataGridView2->Rows>GetFirstRow(DataGridViewElementStates::Selected);
int id = Convert::ToInt32(dataGridView2->Rows[rowToUpdate]->Cells["id"]->Value);
label1->Text = id.ToString();
String ^ Id_nomeri = dataGridView2->Rows[id-1]->Cells[7]->Value->ToString();
String ^satr="SELECT * FROM [Talabalar] Where (id="+Id_nomeri+")";
qidirish(satr);
String ^ id_2 = dataGridView2->Rows[-0]->Cells[0]->Value->ToString();
Id=id;
yangilash(id-1,2);
}
catch(Exception ^v){MessageBox::Show(Convert::ToString(v));}
}
private: System::Void Form1_FormClosed(System::Object^ sender,
System::Windows::Forms::FormClosedEventArgs^ e) {
safe_cast<Form^>(St)->Show();
//this->Close();
//}
}
};
}
Qidirish.h
#pragma once
#include"TTJ_sinf.h"
//#include"Asosiy_oyna.h";
namespace TTJ_New {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::IO;
///
/// Summary for Qidirish
///
public ref class Qidirish : public System::Windows::Forms::Form
{
private: Object^ As;
public:
Qidirish(Object^ o)
{
As = o;
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
private: System::Windows::Forms::ComboBox^ comboBox1;
private: System::Windows::Forms::DataGridView^ dataGridView2;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::PictureBox^ pictureBox2;
private: System::Windows::Forms::DataGridView^ dataGridView3;
private: System::Windows::Forms::CheckedListBox^ checkedListBox1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::CheckBox^ checkBox1;
public:
public: TTJ_sinf^ TTJ_3;
protected:
///
/// Clean up any resources being used.
///
~Qidirish()
{
if (components)
{
delete components;
}
}
public: System::Windows::Forms::PictureBox^ pictureBox1;
public:
private:
public:
private:
public: System::Windows::Forms::TabControl^ tabControl2;
public: System::Windows::Forms::TabPage^ tabPage4;
private: System::Windows::Forms::DataGridView^ dataGridView1;
public:
private: System::Windows::Forms::TabPage^ tabPage5;
private: System::Windows::Forms::TextBox^ textBox18;
protected:
private:
///
/// Required designer variable.
///
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
void InitializeComponent(void)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew
System::ComponentModel::ComponentResourceManager(Qidirish::typeid));
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle1 = (gcnew
System::Windows::Forms::DataGridViewCellStyle());
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle2 = (gcnew
System::Windows::Forms::DataGridViewCellStyle());
this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
this->tabControl2 = (gcnew System::Windows::Forms::TabControl());
this->tabPage4 = (gcnew System::Windows::Forms::TabPage());
this->dataGridView3 = (gcnew System::Windows::Forms::DataGridView());
this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox());
this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());
this->tabPage5 = (gcnew System::Windows::Forms::TabPage());
this->dataGridView2 = (gcnew System::Windows::Forms::DataGridView());
this->textBox18 = (gcnew System::Windows::Forms::TextBox());
this->comboBox1 = (gcnew System::Windows::Forms::ComboBox());
this->label1 = (gcnew System::Windows::Forms::Label());
this->checkedListBox1 = (gcnew System::Windows::Forms::CheckedListBox());
this->label2 = (gcnew System::Windows::Forms::Label());
this->checkBox1 = (gcnew System::Windows::Forms::CheckBox());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))>BeginInit();
this->tabControl2->SuspendLayout();
this->tabPage4->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView3))>BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))>BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))>BeginInit();
this->tabPage5->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView2))>BeginInit();
this->SuspendLayout();
//
// pictureBox1
//
this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources>GetObject(L"pictureBox1.Image")));
this->pictureBox1->Location = System::Drawing::Point(185, 5);
this->pictureBox1->Name = L"pictureBox1";
this->pictureBox1->Size = System::Drawing::Size(161, 163);
this->pictureBox1->SizeMode =
System::Windows::Forms::PictureBoxSizeMode::StretchImage;
this->pictureBox1->TabIndex = 4;
this->pictureBox1->TabStop = false;
this->pictureBox1->WaitOnLoad = true;
//
// tabControl2
//
this->tabControl2->Controls->Add(this->tabPage4);
this->tabControl2->Controls->Add(this->tabPage5);
this->tabControl2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->tabControl2->Location = System::Drawing::Point(181, 174);
this->tabControl2->Name = L"tabControl2";
this->tabControl2->SelectedIndex = 0;
this->tabControl2->Size = System::Drawing::Size(774, 258);
this->tabControl2->TabIndex = 2;
//
// tabPage4
//
this->tabPage4->BackColor = System::Drawing::Color::WhiteSmoke;
this->tabPage4->Controls->Add(this->dataGridView3);
this->tabPage4->Controls->Add(this->pictureBox2);
this->tabPage4->Controls->Add(this->dataGridView1);
this->tabPage4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->tabPage4->Location = System::Drawing::Point(4, 26);
this->tabPage4->Name = L"tabPage4";
this->tabPage4->Padding = System::Windows::Forms::Padding(3);
this->tabPage4->Size = System::Drawing::Size(766, 228);
this->tabPage4->TabIndex = 0;
this->tabPage4->Text = L"Talabalar jadvali";
//
// dataGridView3
//
this->dataGridView3->AllowDrop = true;
this->dataGridView3->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
this->dataGridView3->ColumnHeadersBorderStyle =
System::Windows::Forms::DataGridViewHeaderBorderStyle::Sunken;
dataGridViewCellStyle1->Alignment =
System::Windows::Forms::DataGridViewContentAlignment::MiddleLeft;
dataGridViewCellStyle1->BackColor = System::Drawing::Color::Blue;
dataGridViewCellStyle1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif",
14.25F, System::Drawing::FontStyle::Regular,
System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(204)));
dataGridViewCellStyle1->ForeColor = System::Drawing::SystemColors::WindowText;
dataGridViewCellStyle1->SelectionBackColor = System::Drawing::SystemColors::Highlight;
dataGridViewCellStyle1->SelectionForeColor = System::Drawing::Color::Blue;
dataGridViewCellStyle1->WrapMode =
System::Windows::Forms::DataGridViewTriState::True;
this->dataGridView3->ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this->dataGridView3->ColumnHeadersHeightSizeMode =
System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
this->dataGridView3->GridColor = System::Drawing::SystemColors::ActiveCaption;
this->dataGridView3->ImeMode = System::Windows::Forms::ImeMode::AlphaFull;
this->dataGridView3->Location = System::Drawing::Point(460, 138);
this->dataGridView3->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->dataGridView3->Name = L"dataGridView3";
dataGridViewCellStyle2->BackColor = System::Drawing::SystemColors::ButtonHighlight;
this->dataGridView3->RowsDefaultCellStyle = dataGridViewCellStyle2;
this->dataGridView3->SelectionMode =
System::Windows::Forms::DataGridViewSelectionMode::FullRowSelect;
this->dataGridView3->Size = System::Drawing::Size(168, 59);
this->dataGridView3->TabIndex = 9;
this->dataGridView3->Visible = false;
//
// pictureBox2
//
this->pictureBox2->Image = (cli::safe_cast<System::Drawing::Image^ >(resources>GetObject(L"pictureBox2.Image")));
this->pictureBox2->Location = System::Drawing::Point(601, 92);
this->pictureBox2->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
this->pictureBox2->Name = L"pictureBox2";
this->pictureBox2->Size = System::Drawing::Size(133, 121);
this->pictureBox2->SizeMode =
System::Windows::Forms::PictureBoxSizeMode::StretchImage;
this->pictureBox2->TabIndex = 9;
this->pictureBox2->TabStop = false;
this->pictureBox2->Visible = false;
this->pictureBox2->WaitOnLoad = true;
//
// dataGridView1
//
this->dataGridView1->ColumnHeadersHeightSizeMode =
System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
this->dataGridView1->Location = System::Drawing::Point(5, 10);
this->dataGridView1->Name = L"dataGridView1";
this->dataGridView1->Size = System::Drawing::Size(755, 215);
this->dataGridView1->TabIndex = 0;
this->dataGridView1->SelectionChanged += gcnew System::EventHandler(this,
&Qidirish::dataGridView1_SelectionChanged);
this->dataGridView1->Click += gcnew System::EventHandler(this,
&Qidirish::dataGridView1_Click);
//
// tabPage5
//
this->tabPage5->BackColor = System::Drawing::Color::WhiteSmoke;
this->tabPage5->Controls->Add(this->dataGridView2);
this->tabPage5->Location = System::Drawing::Point(4, 26);
this->tabPage5->Name = L"tabPage5";
this->tabPage5->Padding = System::Windows::Forms::Padding(3);
this->tabPage5->Size = System::Drawing::Size(766, 228);
this->tabPage5->TabIndex = 1;
this->tabPage5->Text = L"Qarindoshlar jadvali";
//
// dataGridView2
//
this->dataGridView2->ColumnHeadersHeightSizeMode =
System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
this->dataGridView2->Location = System::Drawing::Point(6, 12);
this->dataGridView2->Name = L"dataGridView2";
this->dataGridView2->Size = System::Drawing::Size(755, 129);
this->dataGridView2->TabIndex = 1;
this->dataGridView2->SelectionChanged += gcnew System::EventHandler(this,
&Qidirish::dataGridView2_SelectionChanged);
this->dataGridView2->Click += gcnew System::EventHandler(this,
&Qidirish::dataGridView2_Click);
//
// textBox18
//
this->textBox18->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 16.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox18->Location = System::Drawing::Point(352, 5);
this->textBox18->Multiline = true;
this->textBox18->Name = L"textBox18";
this->textBox18->Size = System::Drawing::Size(229, 41);
this->textBox18->TabIndex = 1;
this->textBox18->TextChanged += gcnew System::EventHandler(this,
&Qidirish::textBox18_TextChanged);
//
// comboBox1
//
this->comboBox1->AutoCompleteMode =
System::Windows::Forms::AutoCompleteMode::Suggest;
this->comboBox1->AutoCompleteSource =
System::Windows::Forms::AutoCompleteSource::ListItems;
this->comboBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->comboBox1->ForeColor = System::Drawing::SystemColors::InactiveCaptionText;
this->comboBox1->FormattingEnabled = true;
this->comboBox1->Items->AddRange(gcnew cli::array< System::Object^ >(22) {L"Fam",
L"Ism", L"Sharf", L"Guruh", L"Bosqich",
L"Tugilgan_viloyati", L"Pasport_seriasi", L"Tugilgan_Sana", L"Pasport_nomeri",
L"Xona_nomeri", L"Blok_nomi", L"Qavat_nomeri",
L"Lavozim", L"Telefoni", L"Tugilgan_yili", L"Tugilgan_oyi", L"Tugilgan_kuni", L"Jinsi",
L"Fakulteti", L"Yonalishi", L"Tugilgan_tumani",
L"Yashash_manzili"});
this->comboBox1->Location = System::Drawing::Point(352, 52);
this->comboBox1->Name = L"comboBox1";
this->comboBox1->Size = System::Drawing::Size(229, 28);
this->comboBox1->TabIndex = 0;
this->comboBox1->Text = L"Qidirish turi";
this->comboBox1->Click += gcnew System::EventHandler(this, &Qidirish::comboBox1_Click);
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(187, 459);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(35, 13);
this->label1->TabIndex = 7;
this->label1->Text = L"label1";
this->label1->Visible = false;
//
// checkedListBox1
//
this->checkedListBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif",
10.25F, System::Drawing::FontStyle::Regular,
System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(204)));
this->checkedListBox1->FormattingEnabled = true;
this->checkedListBox1->Items->AddRange(gcnew cli::array< System::Object^ >(23) {L"Fam",
L"Ism", L"Sharf", L"Guruh", L"Bosqich",
L"Tugilgan_viloyati", L"Pasport_seriasi", L"Tugilgan_Sana", L"Pasport_nomeri",
L"Xona_nomeri", L"Blok_nomi", L"Qavat_nomeri",
L"Lavozim", L"Telefoni", L"Tugilgan_yili", L"Tugilgan_oyi", L"Tugilgan_kuni", L"Jinsi",
L"Fakulteti", L"Yonalishi", L"Tugilgan_tumani",
L"Yashash_manzili", L"Rasm"});
this->checkedListBox1->Location = System::Drawing::Point(1, 28);
this->checkedListBox1->Name = L"checkedListBox1";
this->checkedListBox1->Size = System::Drawing::Size(178, 418);
this->checkedListBox1->TabIndex = 8;
//
// label2
//
this->label2->AutoSize = true;
this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label2->Location = System::Drawing::Point(12, 5);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(142, 20);
this->label2->TabIndex = 9;
this->label2->Text = L"Zaruriy maydonlar";
//
// checkBox1
//
this->checkBox1->AutoSize = true;
this->checkBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->checkBox1->Location = System::Drawing::Point(1, 453);
this->checkBox1->Name = L"checkBox1";
this->checkBox1->Size = System::Drawing::Size(180, 24);
this->checkBox1->TabIndex = 10;
this->checkBox1->Text = L"Hammasni belgilash";
this->checkBox1->UseVisualStyleBackColor = true;
this->checkBox1->CheckedChanged += gcnew System::EventHandler(this,
&Qidirish::checkBox1_CheckedChanged);
//
// Qidirish
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(956, 487);
this->Controls->Add(this->checkBox1);
this->Controls->Add(this->label2);
this->Controls->Add(this->checkedListBox1);
this->Controls->Add(this->label1);
this->Controls->Add(this->comboBox1);
this->Controls->Add(this->textBox18);
this->Controls->Add(this->tabControl2);
this->Controls->Add(this->pictureBox1);
this->Name = L"Qidirish";
this->Text = L"Qidirish";
this->FormClosed += gcnew System::Windows::Forms::FormClosedEventHandler(this,
&Qidirish::Qidirish_FormClosed);
this->FontChanged += gcnew System::EventHandler(this, &Qidirish::Qidirish_FontChanged);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();
this->tabControl2->ResumeLayout(false);
this->tabPage4->ResumeLayout(false);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView3))>EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))>EndInit();
this->tabPage5->ResumeLayout(false);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView2))>EndInit();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
int po;String^ maydon; bool st;
void index(int indexChecked[]){ int i=0;
IEnumerator^ myEnum1 = checkedListBox1->CheckedIndices->GetEnumerator();
while( myEnum1->MoveNext()){
indexChecked[i] = *safe_cast<Int32^>(myEnum1->Current); i++; }
if(i>=0){st=1;}
po=i; }
private: System::Void textBox18_TextChanged(System::Object^ sender, System::EventArgs^ e)
{
TTJ_3 = gcnew TTJ_sinf();
maydon="";
String ^ q_2, ^qidirish = "Select * From [Talabalar]", ^qidirish_2 = "Select * From [Talabalar]";
int indexChecked[100];
index(indexChecked); //int tt=indexChecked[0];
if(po>=0){
for(int i=0; i
if (i==po-1){
//if(indexChecked[i+1] == indexChecked[i+1]){
maydon+=checkedListBox1->Items[indexChecked[i]]->ToString()+" ";
}
else{maydon+=checkedListBox1->Items[indexChecked[i]]->ToString()+", ";}
//}
}
//label1->Text = maydon; //po.ToString();
if(po<=0){po=23; qidirish_2 = "Select * From [Talabalar] Where ("+comboBox1->Text+" LIKE
'"+textBox18->Text+"%')";}
else { qidirish_2 = "Select id,"+maydon+" From [Talabalar] Where ("+comboBox1->Text+"
LIKE '"+textBox18->Text+"%')";}
try{ TTJ_3->ShowRecord(dataGridView1, qidirish_2); delete TTJ_3;}
catch(Exception^ v){MessageBox::Show("Data 4 xatolik");}
}
else{po=23; label1->Text = po.ToString();}
int row_soni = dataGridView1->Rows->Count;// (DataGridViewElementStates::Selected);
int id_nomeri[100];
int i=0;
// id_nomeri[0] =Convert::ToInt32( dataGridView1->Rows[i]->Cells[0]->Value );
// label1->Text=id_nomeri[0].ToString();
String ^ Satr="SELECT * FROM [Qarindoshlar] Where Id_nomeri IN(";
String^ satr="";
for(int i=0; i
id_nomeri[i] =Convert::ToInt32( dataGridView1->Rows[i]->Cells[0]->Value );
if(iConvert::ToString(id_nomeri[i])+"," ;
else if(i==row_soni-2) satr +=Convert::ToString(id_nomeri[i])+" ";
} Satr+=satr; Satr+=")";
//Satr="SELECT * FROM [Qarindoshlar] Where Id_nomeri IN(1, 2, 3)";
//label1->Text=Satr;
try{ TTJ_3->ShowRecord(dataGridView2,Satr); delete TTJ_3;}
catch(Exception^ v){}// MessageBox::Show("Topilmadi(xatoli)"); textBox18->Text="";}
}
private: System::Void comboBox1_Click(System::Object^ sender, System::EventArgs^ e) {
comboBox1->Text = "";
}
public: Image^ loadFoto(array<unsigned char>^ Rasm){
MemoryStream^ ms=gcnew MemoryStream(Rasm);
return Image::FromStream(ms);
}
private: System::Void dataGridView1_Click(System::Object^ sender, System::EventArgs^ e) {
int id_2 = dataGridView1->Rows->GetFirstRow(DataGridViewElementStates::Selected);
try{ pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView1->Rows[id_2]>Cells[po]->Value);}
catch(Exception^ vaziyat){pictureBox1->Image = pictureBox2->Image;
//MessageBox::Show("xato");
}
}
private: System::Void dataGridView1_SelectionChanged(System::Object^ sender,
System::EventArgs^ e) {
int id_2 = dataGridView1->Rows->GetFirstRow(DataGridViewElementStates::Selected);
try{ pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView1->Rows[id_2]>Cells[po]->Value);}
catch(Exception^ vaziyat){pictureBox1->Image = pictureBox2->Image;
//MessageBox::Show("xato");
}
}
private: System::Void dataGridView2_Click(System::Object^ sender, System::EventArgs^ e) {
try{ int rowToUpdate_3 = dataGridView2->Rows->GetFirstRow
(DataGridViewElementStates::Selected);
int id_3 = Convert::ToInt32(dataGridView2->Rows[rowToUpdate_3]->Cells["id"]->Value);
String ^ Id_nomeri = dataGridView2->Rows[id_3-1]->Cells[7]->Value->ToString();
//label1->Text = Id_nomeri;
String ^satr="SELECT * FROM [Talabalar] Where (id = "+Id_nomeri+")";
//qidirish(satr);
TTJ_3 = gcnew TTJ_sinf();
try{ TTJ_3->ShowRecord(dataGridView3,satr); delete TTJ_3;}
catch(Exception^ v){MessageBox::Show("Xatolik bor");}
try{ pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[-0]>Cells["Rasm"]->Value);
int rowToUpdate_2 = dataGridView2->Rows>GetFirstRow(DataGridViewElementStates::Selected);
int id_2 = Convert::ToInt32(dataGridView2->Rows[rowToUpdate_2]->Cells["id"]->Value); }
catch(Exception^ vaziyat){pictureBox1->Image = pictureBox2->Image; }
}
catch(Exception^ vaziyat){}
}
private: System::Void dataGridView2_SelectionChanged(System::Object^ sender,
System::EventArgs^ e) {
try{ int rowToUpdate_3 = dataGridView2->Rows->GetFirstRow
(DataGridViewElementStates::Selected);
int id_3 = Convert::ToInt32(dataGridView2->Rows[rowToUpdate_3]->Cells["id"]->Value);
String ^ Id_nomeri = dataGridView2->Rows[id_3-1]->Cells[7]->Value->ToString();
//label1->Text = Id_nomeri;
String ^satr="SELECT * FROM [Talabalar] Where (id = "+Id_nomeri+")";
//qidirish(satr);
TTJ_3 = gcnew TTJ_sinf();
try{ TTJ_3->ShowRecord(dataGridView3,satr); delete TTJ_3;}
catch(Exception^ v){MessageBox::Show("Xatolik bor");}
try{ pictureBox1->Image =loadFoto((array<unsigned char>^) dataGridView3->Rows[-0]>Cells["Rasm"]->Value);
int rowToUpdate_2 = dataGridView2->Rows>GetFirstRow(DataGridViewElementStates::Selected);
int id_2 = Convert::ToInt32(dataGridView2->Rows[rowToUpdate_2]->Cells["id"]->Value); }
catch(Exception^ vaziyat){pictureBox1->Image = pictureBox2->Image; }
}
catch(Exception^ vaziyat){}
}
private: System::Void checkBox1_CheckedChanged(System::Object^ sender,
System::EventArgs^ e) {
if(checkBox1->Checked){
//MessageBox::Show(checkedListBox1->Items[0]->ToString());
for(int i=0;i<23;i++)
checkedListBox1->SetItemChecked(i,true); // GetEnumerator();
}
else { for(int i=0;i<23;i++)
checkedListBox1->SetItemChecked(i,false); }
}
private: System::Void dataGridView4_CellContentClick(System::Object^ sender,
System::Windows::Forms::DataGridViewCellEventArgs^ e) {
}
private: System::Void Qidirish_FontChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void Qidirish_FormClosed(System::Object^ sender,
System::Windows::Forms::FormClosedEventArgs^ e) {
safe_cast<Form^>(As)->Show();
//this->Close();
}
};
}
Studentlarni_yangilash.h
#pragma once
#include"TTJ_sinf.h";
//#include"Form1.h";
//#include"Form1.h"
namespace TTJ_New {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::IO;
using namespace System::Data::OleDb;
///
/// Summary for Studentlarni_yangilash
///
public ref class Studentlarni_yangilash : public System::Windows::Forms::Form
{
private: Object^ F1;
public:
Studentlarni_yangilash(Object^ o)
{
F1 = o;
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
public: System::Windows::Forms::Button^ button2;
public: System::Windows::Forms::Label^ label18;
private: System::Windows::Forms::DataGridView^ dataGridView1;
public: System::Windows::Forms::TextBox^ textBox6;
private:
private:
public:
public: TTJ_sinf^ TTJ_3;
protected:
///
/// Clean up any resources being used.
///
~Studentlarni_yangilash()
{
if (components)
{
delete components;
}
}
public: System::Windows::Forms::PictureBox^ pictureBox1;
public: System::Windows::Forms::TabControl^ tabControl1;
public: System::Windows::Forms::TabPage^ tabPage1;
private:
public: System::Windows::Forms::TextBox^ textBox1;
public:
private: System::Windows::Forms::TabPage^ tabPage2;
private: System::Windows::Forms::TabPage^ tabPage3;
public: System::Windows::Forms::Label^ label2;
private:
public: System::Windows::Forms::TextBox^ textBox2;
public: System::Windows::Forms::Label^ label1;
public: System::Windows::Forms::Label^ label8;
public: System::Windows::Forms::Label^ label7;
private:
public: System::Windows::Forms::TextBox^ textBox8;
public: System::Windows::Forms::Label^ label6;
private:
public:
public: System::Windows::Forms::TextBox^ textBox7;
private:
public: System::Windows::Forms::Label^ label5;
public:
public: System::Windows::Forms::TextBox^ textBox5;
public: System::Windows::Forms::Label^ label4;
private:
public:
public: System::Windows::Forms::TextBox^ textBox4;
public: System::Windows::Forms::Label^ label3;
private:
public:
public: System::Windows::Forms::TextBox^ textBox3;
public: System::Windows::Forms::Label^ label9;
public: System::Windows::Forms::Label^ label10;
private:
public:
public: System::Windows::Forms::TextBox^ textBox9;
public: System::Windows::Forms::Label^ label11;
private:
public:
public: System::Windows::Forms::TextBox^ textBox10;
private:
public: System::Windows::Forms::TextBox^ textBox11;
public: System::Windows::Forms::Label^ label13;
public:
private:
public:
public: System::Windows::Forms::TextBox^ textBox13;
public: System::Windows::Forms::Label^ label14;
private:
public:
public: System::Windows::Forms::TextBox^ textBox14;
public: System::Windows::Forms::Label^ label15;
private:
public:
public: System::Windows::Forms::TextBox^ textBox15;
public: System::Windows::Forms::Label^ label16;
private:
public:
public: System::Windows::Forms::TextBox^ textBox16;
public: System::Windows::Forms::Label^ label20;
private:
public:
public: System::Windows::Forms::TextBox^ textBox20;
public: System::Windows::Forms::Label^ label21;
private:
public:
public: System::Windows::Forms::TextBox^ textBox21;
public: System::Windows::Forms::Label^ label22;
private:
public:
public: System::Windows::Forms::TextBox^ textBox22;
public: System::Windows::Forms::Label^ label23;
private:
public:
public: System::Windows::Forms::TextBox^ textBox23;
public: System::Windows::Forms::Label^ label24;
private:
public:
public: System::Windows::Forms::TextBox^ textBox24;
public: System::Windows::Forms::Label^ label12;
public:
public: System::Windows::Forms::TextBox^ textBox12;
public: System::Windows::Forms::Label^ label17;
public:
public: System::Windows::Forms::TextBox^ textBox17;
public: System::Windows::Forms::Button^ button1;
public:
private:
private:
private:
public:
private:
public:
protected:
protected:
private:
///
/// Required designer variable.
///
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
void InitializeComponent(void)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew
System::ComponentModel::ComponentResourceManager(Studentlarni_yangilash::typeid));
this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
this->tabControl1 = (gcnew System::Windows::Forms::TabControl());
this->tabPage1 = (gcnew System::Windows::Forms::TabPage());
this->textBox6 = (gcnew System::Windows::Forms::TextBox());
this->label8 = (gcnew System::Windows::Forms::Label());
this->label7 = (gcnew System::Windows::Forms::Label());
this->textBox8 = (gcnew System::Windows::Forms::TextBox());
this->label6 = (gcnew System::Windows::Forms::Label());
this->textBox7 = (gcnew System::Windows::Forms::TextBox());
this->label5 = (gcnew System::Windows::Forms::Label());
this->textBox5 = (gcnew System::Windows::Forms::TextBox());
this->label4 = (gcnew System::Windows::Forms::Label());
this->textBox4 = (gcnew System::Windows::Forms::TextBox());
this->label3 = (gcnew System::Windows::Forms::Label());
this->textBox3 = (gcnew System::Windows::Forms::TextBox());
this->label2 = (gcnew System::Windows::Forms::Label());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->label1 = (gcnew System::Windows::Forms::Label());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->tabPage2 = (gcnew System::Windows::Forms::TabPage());
this->label9 = (gcnew System::Windows::Forms::Label());
this->label10 = (gcnew System::Windows::Forms::Label());
this->textBox9 = (gcnew System::Windows::Forms::TextBox());
this->label11 = (gcnew System::Windows::Forms::Label());
this->textBox10 = (gcnew System::Windows::Forms::TextBox());
this->textBox11 = (gcnew System::Windows::Forms::TextBox());
this->label13 = (gcnew System::Windows::Forms::Label());
this->textBox13 = (gcnew System::Windows::Forms::TextBox());
this->label14 = (gcnew System::Windows::Forms::Label());
this->textBox14 = (gcnew System::Windows::Forms::TextBox());
this->label15 = (gcnew System::Windows::Forms::Label());
this->textBox15 = (gcnew System::Windows::Forms::TextBox());
this->label16 = (gcnew System::Windows::Forms::Label());
this->textBox16 = (gcnew System::Windows::Forms::TextBox());
this->tabPage3 = (gcnew System::Windows::Forms::TabPage());
this->label17 = (gcnew System::Windows::Forms::Label());
this->label12 = (gcnew System::Windows::Forms::Label());
this->label20 = (gcnew System::Windows::Forms::Label());
this->textBox20 = (gcnew System::Windows::Forms::TextBox());
this->label21 = (gcnew System::Windows::Forms::Label());
this->textBox21 = (gcnew System::Windows::Forms::TextBox());
this->label22 = (gcnew System::Windows::Forms::Label());
this->textBox22 = (gcnew System::Windows::Forms::TextBox());
this->label23 = (gcnew System::Windows::Forms::Label());
this->textBox17 = (gcnew System::Windows::Forms::TextBox());
this->textBox23 = (gcnew System::Windows::Forms::TextBox());
this->textBox12 = (gcnew System::Windows::Forms::TextBox());
this->label24 = (gcnew System::Windows::Forms::Label());
this->textBox24 = (gcnew System::Windows::Forms::TextBox());
this->button1 = (gcnew System::Windows::Forms::Button());
this->label18 = (gcnew System::Windows::Forms::Label());
this->button2 = (gcnew System::Windows::Forms::Button());
this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))>BeginInit();
this->tabControl1->SuspendLayout();
this->tabPage1->SuspendLayout();
this->tabPage2->SuspendLayout();
this->tabPage3->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))>BeginInit();
this->SuspendLayout();
//
// pictureBox1
//
this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources>GetObject(L"pictureBox1.Image")));
this->pictureBox1->Location = System::Drawing::Point(12, 66);
this->pictureBox1->Name = L"pictureBox1";
this->pictureBox1->Size = System::Drawing::Size(161, 163);
this->pictureBox1->SizeMode =
System::Windows::Forms::PictureBoxSizeMode::StretchImage;
this->pictureBox1->TabIndex = 3;
this->pictureBox1->TabStop = false;
this->pictureBox1->WaitOnLoad = true;
this->pictureBox1->Click += gcnew System::EventHandler(this,
&Studentlarni_yangilash::pictureBox1_Click);
//
// tabControl1
//
this->tabControl1->Controls->Add(this->tabPage1);
this->tabControl1->Controls->Add(this->tabPage2);
this->tabControl1->Controls->Add(this->tabPage3);
this->tabControl1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->tabControl1->Location = System::Drawing::Point(179, 12);
this->tabControl1->Name = L"tabControl1";
this->tabControl1->SelectedIndex = 0;
this->tabControl1->Size = System::Drawing::Size(535, 375);
this->tabControl1->TabIndex = 0;
//
// tabPage1
//
this->tabPage1->BackColor = System::Drawing::Color::WhiteSmoke;
this->tabPage1->Controls->Add(this->textBox6);
this->tabPage1->Controls->Add(this->label8);
this->tabPage1->Controls->Add(this->label7);
this->tabPage1->Controls->Add(this->textBox8);
this->tabPage1->Controls->Add(this->label6);
this->tabPage1->Controls->Add(this->textBox7);
this->tabPage1->Controls->Add(this->label5);
this->tabPage1->Controls->Add(this->textBox5);
this->tabPage1->Controls->Add(this->label4);
this->tabPage1->Controls->Add(this->textBox4);
this->tabPage1->Controls->Add(this->label3);
this->tabPage1->Controls->Add(this->textBox3);
this->tabPage1->Controls->Add(this->label2);
this->tabPage1->Controls->Add(this->textBox2);
this->tabPage1->Controls->Add(this->label1);
this->tabPage1->Controls->Add(this->textBox1);
this->tabPage1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->tabPage1->Location = System::Drawing::Point(4, 26);
this->tabPage1->Name = L"tabPage1";
this->tabPage1->Padding = System::Windows::Forms::Padding(3);
this->tabPage1->Size = System::Drawing::Size(527, 345);
this->tabPage1->TabIndex = 0;
this->tabPage1->Text = L"Asosiy ma`lumotlar";
//
// textBox6
//
this->textBox6->Location = System::Drawing::Point(168, 225);
this->textBox6->Multiline = true;
this->textBox6->Name = L"textBox6";
this->textBox6->Size = System::Drawing::Size(353, 33);
this->textBox6->TabIndex = 5;
this->textBox6->Text = L"A,B,V";
this->textBox6->TextChanged += gcnew System::EventHandler(this,
&Studentlarni_yangilash::textBox6_TextChanged);
//
// label8
//
this->label8->AutoSize = true;
this->label8->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label8->Location = System::Drawing::Point(12, 308);
this->label8->Name = L"label8";
this->label8->Size = System::Drawing::Size(83, 24);
this->label8->TabIndex = 3;
this->label8->Text = L"Telefoni:";
//
// label7
//
this->label7->AutoSize = true;
this->label7->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label7->Location = System::Drawing::Point(12, 267);
this->label7->Name = L"label7";
this->label7->Size = System::Drawing::Size(132, 24);
this->label7->TabIndex = 3;
this->label7->Text = L"Qavat_nomeri:";
//
// textBox8
//
this->textBox8->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox8->Location = System::Drawing::Point(169, 305);
this->textBox8->Multiline = true;
this->textBox8->Name = L"textBox8";
this->textBox8->Size = System::Drawing::Size(354, 34);
this->textBox8->TabIndex = 7;
//
// label6
//
this->label6->AutoSize = true;
this->label6->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label6->Location = System::Drawing::Point(12, 227);
this->label6->Name = L"label6";
this->label6->Size = System::Drawing::Size(100, 24);
this->label6->TabIndex = 3;
this->label6->Text = L"Bino nomi:";
//
// textBox7
//
this->textBox7->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox7->Location = System::Drawing::Point(169, 264);
this->textBox7->Multiline = true;
this->textBox7->Name = L"textBox7";
this->textBox7->Size = System::Drawing::Size(354, 34);
this->textBox7->TabIndex = 6;
//
// label5
//
this->label5->AutoSize = true;
this->label5->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label5->Location = System::Drawing::Point(12, 188);
this->label5->Name = L"label5";
this->label5->Size = System::Drawing::Size(125, 24);
this->label5->TabIndex = 3;
this->label5->Text = L"Xona nomeri:";
//
// textBox5
//
this->textBox5->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox5->Location = System::Drawing::Point(169, 185);
this->textBox5->Multiline = true;
this->textBox5->Name = L"textBox5";
this->textBox5->Size = System::Drawing::Size(354, 34);
this->textBox5->TabIndex = 4;
this->textBox5->TextChanged += gcnew System::EventHandler(this,
&Studentlarni_yangilash::textBox5_TextChanged);
//
// label4
//
this->label4->AutoSize = true;
this->label4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label4->Location = System::Drawing::Point(12, 149);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(72, 24);
this->label4->TabIndex = 1;
this->label4->Text = L"Guruhi:";
//
// textBox4
//
this->textBox4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox4->Location = System::Drawing::Point(169, 146);
this->textBox4->Multiline = true;
this->textBox4->Name = L"textBox4";
this->textBox4->Size = System::Drawing::Size(354, 34);
this->textBox4->TabIndex = 3;
this->textBox4->TextChanged += gcnew System::EventHandler(this,
&Studentlarni_yangilash::textBox4_TextChanged);
//
// label3
//
this->label3->AutoSize = true;
this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label3->Location = System::Drawing::Point(12, 109);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(62, 24);
this->label3->TabIndex = 1;
this->label3->Text = L"Sharfi:";
//
// textBox3
//
this->textBox3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox3->Location = System::Drawing::Point(169, 106);
this->textBox3->Multiline = true;
this->textBox3->Name = L"textBox3";
this->textBox3->Size = System::Drawing::Size(354, 34);
this->textBox3->TabIndex = 2;
//
// label2
//
this->label2->AutoSize = true;
this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label2->Location = System::Drawing::Point(12, 69);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(48, 24);
this->label2->TabIndex = 1;
this->label2->Text = L"Ismi:";
//
// textBox2
//
this->textBox2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox2->Location = System::Drawing::Point(169, 66);
this->textBox2->Multiline = true;
this->textBox2->Name = L"textBox2";
this->textBox2->Size = System::Drawing::Size(354, 34);
this->textBox2->TabIndex = 1;
//
// label1
//
this->label1->AutoSize = true;
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label1->Location = System::Drawing::Point(12, 28);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(53, 24);
this->label1->TabIndex = 1;
this->label1->Text = L"Fam:";
//
// textBox1
//
this->textBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox1->Location = System::Drawing::Point(169, 25);
this->textBox1->Multiline = true;
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Drawing::Size(354, 34);
this->textBox1->TabIndex = 0;
//
// tabPage2
//
this->tabPage2->BackColor = System::Drawing::Color::WhiteSmoke;
this->tabPage2->Controls->Add(this->label9);
this->tabPage2->Controls->Add(this->label10);
this->tabPage2->Controls->Add(this->textBox9);
this->tabPage2->Controls->Add(this->label11);
this->tabPage2->Controls->Add(this->textBox10);
this->tabPage2->Controls->Add(this->textBox11);
this->tabPage2->Controls->Add(this->label13);
this->tabPage2->Controls->Add(this->textBox13);
this->tabPage2->Controls->Add(this->label14);
this->tabPage2->Controls->Add(this->textBox14);
this->tabPage2->Controls->Add(this->label15);
this->tabPage2->Controls->Add(this->textBox15);
this->tabPage2->Controls->Add(this->label16);
this->tabPage2->Controls->Add(this->textBox16);
this->tabPage2->Location = System::Drawing::Point(4, 26);
this->tabPage2->Name = L"tabPage2";
this->tabPage2->Padding = System::Windows::Forms::Padding(3);
this->tabPage2->Size = System::Drawing::Size(527, 345);
this->tabPage2->TabIndex = 1;
this->tabPage2->Text = L"Qo`shimcha ma`lumotlar_1";
//
// label9
//
this->label9->AutoSize = true;
this->label9->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label9->Location = System::Drawing::Point(15, 265);
this->label9->Name = L"label9";
this->label9->Size = System::Drawing::Size(129, 24);
this->label9->TabIndex = 16;
this->label9->Text = L"Tugilgan kuni:";
//
// label10
//
this->label10->AutoSize = true;
this->label10->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label10->Location = System::Drawing::Point(15, 224);
this->label10->Name = L"label10";
this->label10->Size = System::Drawing::Size(118, 24);
this->label10->TabIndex = 17;
this->label10->Text = L"Tugilgan oyi:";
//
// textBox9
//
this->textBox9->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox9->Location = System::Drawing::Point(167, 19);
this->textBox9->Multiline = true;
this->textBox9->Name = L"textBox9";
this->textBox9->Size = System::Drawing::Size(333, 34);
this->textBox9->TabIndex = 0;
//
// label11
//
this->label11->AutoSize = true;
this->label11->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label11->Location = System::Drawing::Point(15, 184);
this->label11->Name = L"label11";
this->label11->Size = System::Drawing::Size(115, 24);
this->label11->TabIndex = 18;
this->label11->Text = L"Tugilgan yili:";
//
// textBox10
//
this->textBox10->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox10->Location = System::Drawing::Point(167, 59);
this->textBox10->Multiline = true;
this->textBox10->Name = L"textBox10";
this->textBox10->Size = System::Drawing::Size(333, 34);
this->textBox10->TabIndex = 1;
//
// textBox11
//
this->textBox11->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox11->Location = System::Drawing::Point(167, 100);
this->textBox11->Multiline = true;
this->textBox11->Name = L"textBox11";
this->textBox11->Size = System::Drawing::Size(333, 34);
this->textBox11->TabIndex = 2;
this->textBox11->Text = L"12.12.1998";
this->textBox11->TextChanged += gcnew System::EventHandler(this,
&Studentlarni_yangilash::textBox11_TextChanged);
//
// label13
//
this->label13->AutoSize = true;
this->label13->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label13->Location = System::Drawing::Point(15, 143);
this->label13->Name = L"label13";
this->label13->Size = System::Drawing::Size(142, 24);
this->label13->TabIndex = 8;
this->label13->Text = L"Pasport nomeri:";
//
// textBox13
//
this->textBox13->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox13->Location = System::Drawing::Point(167, 140);
this->textBox13->Multiline = true;
this->textBox13->Name = L"textBox13";
this->textBox13->Size = System::Drawing::Size(333, 34);
this->textBox13->TabIndex = 3;
//
// label14
//
this->label14->AutoSize = true;
this->label14->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label14->Location = System::Drawing::Point(15, 103);
this->label14->Name = L"label14";
this->label14->Size = System::Drawing::Size(134, 24);
this->label14->TabIndex = 9;
this->label14->Text = L"Tugilgan sana:";
//
// textBox14
//
this->textBox14->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox14->Location = System::Drawing::Point(167, 180);
this->textBox14->Multiline = true;
this->textBox14->Name = L"textBox14";
this->textBox14->Size = System::Drawing::Size(333, 34);
this->textBox14->TabIndex = 4;
//
// label15
//
this->label15->AutoSize = true;
this->label15->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label15->Location = System::Drawing::Point(15, 63);
this->label15->Name = L"label15";
this->label15->Size = System::Drawing::Size(136, 24);
this->label15->TabIndex = 10;
this->label15->Text = L"Pasport seriasi:";
//
// textBox15
//
this->textBox15->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox15->Location = System::Drawing::Point(167, 220);
this->textBox15->Multiline = true;
this->textBox15->Name = L"textBox15";
this->textBox15->Size = System::Drawing::Size(333, 34);
this->textBox15->TabIndex = 5;
//
// label16
//
this->label16->AutoSize = true;
this->label16->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label16->Location = System::Drawing::Point(12, 22);
this->label16->Name = L"label16";
this->label16->Size = System::Drawing::Size(149, 24);
this->label16->TabIndex = 11;
this->label16->Text = L"Tugilgan viloyati:";
//
// textBox16
//
this->textBox16->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox16->Location = System::Drawing::Point(167, 260);
this->textBox16->Multiline = true;
this->textBox16->Name = L"textBox16";
this->textBox16->Size = System::Drawing::Size(333, 34);
this->textBox16->TabIndex = 6;
//
// tabPage3
//
this->tabPage3->BackColor = System::Drawing::Color::WhiteSmoke;
this->tabPage3->Controls->Add(this->label17);
this->tabPage3->Controls->Add(this->label12);
this->tabPage3->Controls->Add(this->label20);
this->tabPage3->Controls->Add(this->textBox20);
this->tabPage3->Controls->Add(this->label21);
this->tabPage3->Controls->Add(this->textBox21);
this->tabPage3->Controls->Add(this->label22);
this->tabPage3->Controls->Add(this->textBox22);
this->tabPage3->Controls->Add(this->label23);
this->tabPage3->Controls->Add(this->textBox17);
this->tabPage3->Controls->Add(this->textBox23);
this->tabPage3->Controls->Add(this->textBox12);
this->tabPage3->Controls->Add(this->label24);
this->tabPage3->Controls->Add(this->textBox24);
this->tabPage3->Location = System::Drawing::Point(4, 26);
this->tabPage3->Name = L"tabPage3";
this->tabPage3->Padding = System::Windows::Forms::Padding(3);
this->tabPage3->Size = System::Drawing::Size(527, 345);
this->tabPage3->TabIndex = 2;
this->tabPage3->Text = L"Qo`shimcha ma`lumotlar_2";
//
// label17
//
this->label17->AutoSize = true;
this->label17->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label17->Location = System::Drawing::Point(10, 275);
this->label17->Name = L"label17";
this->label17->Size = System::Drawing::Size(87, 24);
this->label17->TabIndex = 35;
this->label17->Text = L"Bosqichi:";
//
// label12
//
this->label12->AutoSize = true;
this->label12->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label12->Location = System::Drawing::Point(10, 233);
this->label12->Name = L"label12";
this->label12->Size = System::Drawing::Size(150, 24);
this->label12->TabIndex = 35;
this->label12->Text = L"Yashash manzili:";
//
// label20
//
this->label20->AutoSize = true;
this->label20->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label20->Location = System::Drawing::Point(10, 192);
this->label20->Name = L"label20";
this->label20->Size = System::Drawing::Size(84, 24);
this->label20->TabIndex = 35;
this->label20->Text = L"Lavozim:";
//
// textBox20
//
this->textBox20->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox20->Location = System::Drawing::Point(175, 23);
this->textBox20->Multiline = true;
this->textBox20->Name = L"textBox20";
this->textBox20->Size = System::Drawing::Size(333, 34);
this->textBox20->TabIndex = 0;
//
// label21
//
this->label21->AutoSize = true;
this->label21->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label21->Location = System::Drawing::Point(10, 153);
this->label21->Name = L"label21";
this->label21->Size = System::Drawing::Size(52, 24);
this->label21->TabIndex = 24;
this->label21->Text = L"Jinsi:";
//
// textBox21
//
this->textBox21->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox21->Location = System::Drawing::Point(175, 63);
this->textBox21->Multiline = true;
this->textBox21->Name = L"textBox21";
this->textBox21->Size = System::Drawing::Size(333, 34);
this->textBox21->TabIndex = 1;
//
// label22
//
this->label22->AutoSize = true;
this->label22->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label22->Location = System::Drawing::Point(10, 113);
this->label22->Name = L"label22";
this->label22->Size = System::Drawing::Size(154, 24);
this->label22->TabIndex = 25;
this->label22->Text = L"Tug\'ilgan tumani:";
//
// textBox22
//
this->textBox22->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox22->Location = System::Drawing::Point(175, 103);
this->textBox22->Multiline = true;
this->textBox22->Name = L"textBox22";
this->textBox22->Size = System::Drawing::Size(333, 34);
this->textBox22->TabIndex = 2;
//
// label23
//
this->label23->AutoSize = true;
this->label23->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label23->Location = System::Drawing::Point(10, 73);
this->label23->Name = L"label23";
this->label23->Size = System::Drawing::Size(91, 24);
this->label23->TabIndex = 26;
this->label23->Text = L"Yonalishi:";
//
// textBox17
//
this->textBox17->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox17->Location = System::Drawing::Point(175, 265);
this->textBox17->Multiline = true;
this->textBox17->Name = L"textBox17";
this->textBox17->Size = System::Drawing::Size(333, 34);
this->textBox17->TabIndex = 6;
//
// textBox23
//
this->textBox23->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox23->Location = System::Drawing::Point(175, 143);
this->textBox23->Multiline = true;
this->textBox23->Name = L"textBox23";
this->textBox23->Size = System::Drawing::Size(333, 34);
this->textBox23->TabIndex = 3;
//
// textBox12
//
this->textBox12->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox12->Location = System::Drawing::Point(175, 223);
this->textBox12->Multiline = true;
this->textBox12->Name = L"textBox12";
this->textBox12->Size = System::Drawing::Size(333, 34);
this->textBox12->TabIndex = 5;
//
// label24
//
this->label24->AutoSize = true;
this->label24->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label24->Location = System::Drawing::Point(7, 32);
this->label24->Name = L"label24";
this->label24->Size = System::Drawing::Size(84, 24);
this->label24->TabIndex = 27;
this->label24->Text = L"Fakulteti:";
//
// textBox24
//
this->textBox24->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->textBox24->Location = System::Drawing::Point(175, 182);
this->textBox24->Multiline = true;
this->textBox24->Name = L"textBox24";
this->textBox24->Size = System::Drawing::Size(333, 34);
this->textBox24->TabIndex = 4;
//
// button1
//
this->button1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->button1->Location = System::Drawing::Point(351, 387);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(131, 38);
this->button1->TabIndex = 1;
this->button1->Text = L"Yangilash";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this,
&Studentlarni_yangilash::button1_Click);
//
// label18
//
this->label18->AutoSize = true;
this->label18->Location = System::Drawing::Point(180, 402);
this->label18->Name = L"label18";
this->label18->Size = System::Drawing::Size(41, 13);
this->label18->TabIndex = 8;
this->label18->Text = L"label18";
this->label18->Visible = false;
//
// button2
//
this->button2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F,
System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->button2->Location = System::Drawing::Point(576, 385);
this->button2->Name = L"button2";
this->button2->Size = System::Drawing::Size(132, 38);
this->button2->TabIndex = 9;
this->button2->Text = L"Saqlash";
this->button2->UseVisualStyleBackColor = true;
this->button2->Click += gcnew System::EventHandler(this,
&Studentlarni_yangilash::button2_Click);
//
// dataGridView1
//
this->dataGridView1->ColumnHeadersHeightSizeMode =
System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
this->dataGridView1->Location = System::Drawing::Point(28, 235);
this->dataGridView1->Name = L"dataGridView1";
this->dataGridView1->Size = System::Drawing::Size(132, 76);
this->dataGridView1->TabIndex = 10;
this->dataGridView1->Visible = false;
//
// Studentlarni_yangilash
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(721, 430);
this->Controls->Add(this->dataGridView1);
this->Controls->Add(this->button2);
this->Controls->Add(this->label18);
this->Controls->Add(this->button1);
this->Controls->Add(this->tabControl1);
this->Controls->Add(this->pictureBox1);
this->MaximizeBox = false;
this->Name = L"Studentlarni_yangilash";
this->StartPosition = System::Windows::Forms::FormStartPosition::Manual;
this->Text = L"Studentlarning ma\'lumotlarini yangilash oynasi";
this->FormClosed += gcnew System::Windows::Forms::FormClosedEventHandler(this,
&Studentlarni_yangilash::Studentlarni_yangilash_FormClosed);
this->Load += gcnew System::EventHandler(this,
&Studentlarni_yangilash::Studentlarni_yangilash_Load);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();
this->tabControl1->ResumeLayout(false);
this->tabPage1->ResumeLayout(false);
this->tabPage1->PerformLayout();
this->tabPage2->ResumeLayout(false);
this->tabPage2->PerformLayout();
this->tabPage3->ResumeLayout(false);
this->tabPage3->PerformLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))>EndInit();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: array<unsigned char>^ SaveRasm(){
MemoryStream^ ms=gcnew MemoryStream();
pictureBox1->Image->Save(ms,pictureBox1->Image->RawFormat);
return ms->GetBuffer();
}
DataSet ^ НаборДанных;
OleDb::OleDbDataAdapter ^ Адаптер;
OleDb::OleDbConnection ^ Ulanish;
OleDb::OleDbCommand ^ Команда;
public: static int Id, Kornat;
private: void ornatish(int h){
//ulanish_new();
OleDbConnection^ con = gcnew OleDbConnection("Data Source=\"TTJ.mdb\";User " +
"ID=Admin;Provider=\"Microsoft.Jet.OLEDB.4.0\";");
con->Open();
if(h==1){
try{
//if(DialogResult.Equals( MessageBox::Show("Ma'lumotlarni yangilash", "Haqiqatdan ham
ushbu talabani yangilamoqchimisiz?",
//MessageBoxButtons::OKCancel, MessageBoxIcon::Information))!=0)
Команда = gcnew OleDb::OleDbCommand("Select * From [Talabalar]", con);
Команда->CommandText = "UPDATE Talabalar SET Fam = @Fam, Ism = @Ism, Sharf =
@Sharf, Guruh = @Guruh, Xona_nomeri = @Xona_nomeri, Blok_nomi = @Blok_nomi,"+
"Qavat_nomeri = @Qavat_nomeri, Telefoni = @Telefoni, Tugilgan_viloyati =
@Tugilgan_viloyati, Pasport_seriasi = @Pasport_seriasi, "+
" Tugilgan_Sana = @Tugilgan_Sana, Pasport_nomeri = @Pasport_nomeri, Tugilgan_yili =
@Tugilgan_yili, Tugilgan_oyi = @Tugilgan_oyi,"+
" Tugilgan_kuni = @Tugilgan_kuni, Fakulteti = @Fakulteti, Yonalishi = @Yonalishi,
Tugilgan_tumani = @Tugilgan_tumani,"+
" Jinsi = @Jinsi, Lavozim = @Lavozim, Yashash_manzili = @Yashash_manzili, Bosqich =
@Bosqich, Rasm = @Rasm WHERE id = @Id";
Команда->Parameters->AddWithValue("@Fam",textBox1->Text);
Команда->Parameters->AddWithValue("@Ism",textBox2->Text);
Команда->Parameters->AddWithValue("@Sharf",textBox3->Text);
Команда->Parameters->AddWithValue("@Guruh",textBox4->Text);
Команда->Parameters->AddWithValue("@Xona_nomeri",textBox5->Text);
Команда->Parameters->AddWithValue("@Blok_nomi",textBox6->Text);
Команда->Parameters->AddWithValue("@Qavat_nomeri",textBox7->Text);
Команда->Parameters->AddWithValue("@Telefoni",textBox8->Text);
Команда->Parameters->AddWithValue("@Tugilgan_viloyati",textBox9->Text);
Команда->Parameters->AddWithValue("@Pasport_seriasi",textBox10->Text);
Команда->Parameters->AddWithValue("@Tugilgan_Sana",textBox11->Text);
Команда->Parameters->AddWithValue("@Pasport_nomeri",textBox13->Text);
Команда->Parameters->AddWithValue("@Tugilgan_yili",textBox14->Text);
Команда->Parameters->AddWithValue("@Tugilgan_oyi",textBox15->Text);
Команда->Parameters->AddWithValue("@Tugilgan_kuni",textBox16->Text);
Команда->Parameters->AddWithValue("@Fakulteti",textBox20->Text);
Команда->Parameters->AddWithValue("@Yonalishi",textBox21->Text);
Команда->Parameters->AddWithValue("@Tugilgan_tumani",textBox22->Text);
Команда->Parameters->AddWithValue("@Jinsi",textBox23->Text);
Команда->Parameters->AddWithValue("@Lavozim",textBox24->Text);
Команда->Parameters->AddWithValue("@Yashash_manzili",textBox12->Text);
Команда->Parameters->AddWithValue("@Bosqich",textBox17->Text);
Команда->Parameters->AddWithValue("@Rasm",SaveRasm());
Команда->Parameters->AddWithValue("@Id",Id);
Команда->ExecuteNonQuery();
MessageBox::Show("Talabalar jadvalining ma'lumotlari muaafaqiyatli yangilandi");}
//else{MessageBox::Show("Ma'lumotlar o'zgartirilmadi");}
catch(Exception^ vaziyat) {MessageBox::Show("Talabalar jadvalini yangilashda xatolik yuz
berdi");}
}
else if(h==2) {
try{
Команда = gcnew OleDb::OleDbCommand("Select * From [Qarindoshlar]", con);
Команда->CommandText =
"UPDATE Qarindoshlar SET Fam = @Fam, Ismi = @Ism, Sharfi = @Sharf, Yashash_manzili =
@Yashash_manzili, Tugilgan_sana = @Tugilgan_sana, Qarindoshlik_turi =
@Qarindoshlik_turi,"+
"Id_nomeri = @Id_nomeri, Ish_joyi = @Ish_joyi, Telefoni = @Telefoni WHERE id = @Id";
Команда->Parameters->AddWithValue("@Fam",textBox1->Text);
Команда->Parameters->AddWithValue("@Ism",textBox2->Text);
Команда->Parameters->AddWithValue("@Sharf",textBox3->Text);
Команда->Parameters->AddWithValue("@Yashash_manzili",textBox4->Text);
Команда->Parameters->AddWithValue("@Tugilgan_sana",textBox5->Text);
Команда->Parameters->AddWithValue("@Qarindoshlik_turi",textBox6->Text);
Команда->Parameters->AddWithValue("@Id_nomeri",textBox7->Text);
Команда->Parameters->AddWithValue("@Ish_joyi",textBox8->Text);
Команда->Parameters->AddWithValue("@Telefoni",textBox9->Text);
Команда->Parameters->AddWithValue("@Id",Id);
Команда->ExecuteNonQuery();
MessageBox::Show("Qarindoshlar jadvalining ma'lumotlari muaafaqiyatli yangilandi");}
//else{MessageBox::Show("Ma'lumotlar o'zgartirilmadi");}
catch(Exception^ vaziyat) {MessageBox::Show("Qarindoshlar jadvalini yangilashda xatolik yuz
berdi");}
}
TTJ_3 = gcnew TTJ_sinf(); bool s;
TTJ_3->ShowRecord(dataGridView1,"Select * From Talabalar"); delete TTJ_3;
}
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
ornatish(Kornat);
}
private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) {
OpenFileDialog^ och=gcnew OpenFileDialog();
och->Title="Rasmni tanlash oynasi";
och->Filter="Image File(*.png; *.jpg; *.bmp; *.gif)|*.png; *.jpg; *.bmp; *.gif";
och->ShowDialog();
//if( DialogResult.Equals(och->ShowDialog) )
try{ pictureBox1->Image = gcnew Bitmap(och->FileName);}
catch(Exception^ vaziyat){
MessageBox::Show("Rasm tanlamadingiz");
}
}
public: System::Void Saqlash(){
OleDbConnection^ con = gcnew OleDbConnection("Data Source=\"TTJ.mdb\";User " +
"ID=Admin;Provider=\"Microsoft.Jet.OLEDB.4.0\";");
con->Open();
try{
//if(DialogResult.Equals( MessageBox::Show("Ma'lumotlarni yangilash", "Haqiqatdan ham
ushbu talabani yangilamoqchimisiz?",
//MessageBoxButtons::OKCancel, MessageBoxIcon::Information))!=0)
Команда = gcnew OleDb::OleDbCommand("Select * From [Talabalar]", con);
Команда->CommandText = "INSERT INTO Talabalar (Fam, Ism, Sharf, Guruh, Xona_nomeri,
Blok_nomi, Qavat_nomeri, Telefoni, Tugilgan_viloyati, Pasport_seriasi, "+
" Tugilgan_Sana, Pasport_nomeri, Tugilgan_yili, Tugilgan_oyi, Tugilgan_kuni, Fakulteti,
Yonalishi, Tugilgan_tumani,"+
" Jinsi, Lavozim, Yashash_manzili, Bosqich, Rasm) VALUES(@Fam, @Ism, @Sharf, @Guruh,
@Xona_nomeri, @Blok_nomi, @Qavat_nomeri, @Telefoni, @Tugilgan_viloyati,
@Pasport_seriasi, "+
" @Tugilgan_Sana, @Pasport_nomeri, @Tugilgan_yili, @Tugilgan_oyi, @Tugilgan_kuni,
@Fakulteti, @Yonalishi, @Tugilgan_tumani,"+
" @Jinsi, @Lavozim, @Yashash_manzili, @Bosqich, @Rasm)";
Команда->Parameters->AddWithValue("@Fam",textBox1->Text);
Команда->Parameters->AddWithValue("@Ism",textBox2->Text);
Команда->Parameters->AddWithValue("@Sharf",textBox3->Text);
Команда->Parameters->AddWithValue("@Guruh",textBox4->Text);
Команда->Parameters->AddWithValue("@Xona_nomeri",textBox5->Text);
Команда->Parameters->AddWithValue("@Blok_nomi",textBox6->Text);
Команда->Parameters->AddWithValue("@Qavat_nomeri",textBox7->Text);
Команда->Parameters->AddWithValue("@Telefoni",textBox8->Text);
Команда->Parameters->AddWithValue("@Tugilgan_viloyati",textBox9->Text);
Команда->Parameters->AddWithValue("@Pasport_seriasi",textBox10->Text);
Команда->Parameters->AddWithValue("@Tugilgan_Sana",textBox11->Text);
Команда->Parameters->AddWithValue("@Pasport_nomeri",textBox13->Text);
Команда->Parameters->AddWithValue("@Tugilgan_yili",textBox14->Text);
Команда->Parameters->AddWithValue("@Tugilgan_oyi",textBox15->Text);
Команда->Parameters->AddWithValue("@Tugilgan_kuni",textBox16->Text);
Команда->Parameters->AddWithValue("@Fakulteti",textBox20->Text);
Команда->Parameters->AddWithValue("@Yonalishi",textBox21->Text);
Команда->Parameters->AddWithValue("@Tugilgan_tumani",textBox22->Text);
Команда->Parameters->AddWithValue("@Jinsi",textBox23->Text);
Команда->Parameters->AddWithValue("@Lavozim",textBox24->Text);
Команда->Parameters->AddWithValue("@Yashash_manzili",textBox12->Text);
Команда->Parameters->AddWithValue("@Bosqich",textBox17->Text);
Команда->Parameters->AddWithValue("@Rasm",SaveRasm());
Команда->ExecuteNonQuery();
MessageBox::Show("Talabalar jadvaliga yangi ma'lumotlar kiritildi");}
//else{MessageBox::Show("Ma'lumotlar o'zgartirilmadi");}
catch(Exception^ vaziyat) {MessageBox::Show(Convert::ToString(vaziyat));}
//
//auto Подключение = gcnew OleDbConnection(
//"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=TTJ.mdb");
//// Открытие подключения:
//Подключение->Open();
//OleDb::OleDbDataAdapter ^ Adapter;
//
//// Создание экземпляра объекта Command с заданием SQL-запроса:
//auto Команда = gcnew OleDbCommand(
//"INSERT INTO [Talabalar] (Fam, Ism, Sharf, Guruh, Bosqich,Tugilgan_viloyati,
Pasport_seriasi,"+
//"Tugilgan_Sana, Pasport_nomeri, Xona_nomeri, Blok_nomi, Qavat_nomeri, Lavozim,
Telefoni, Tugilgan_yili,"+
//"Tugilgan_oyi, Tugilgan_kuni, Jinsi, Fakulteti, Yonalishi, Tugilgan_tumani, Yashash_manzili,
Rasm) VALUES ('"
// +textBox1->Text+"', '"+textBox2->Text+"', '"+textBox3->Text+"', '"+textBox4->Text+"',
'"+textBox17->Text+
//"', '"+textBox9->Text+"', '"+textBox10->Text+"', '"+textBox11->Text+"', '"+textBox13->Text+
//"', '"+textBox5->Text+"', '"+textBox6->Text+"', '"+textBox7->Text+"', '"+textBox24->Text+
//"', '"+textBox8->Text+"', '"+textBox14->Text+"', '"+textBox15->Text+"', '"+textBox16->Text+
//"', '"+textBox23->Text+"', '"+textBox20->Text+"', '"+textBox21->Text+"', '"+textBox22>Text+
//"', '"+textBox12->Text+"', '"+SaveRasm()+"')");
//
//// Для добавления записи в таблицу БД эта команда обязательна:
////Adapter->InsertCommand = Команда;
//Команда->Connection = Подключение;
//// Выполнение команды SQL:
//Команда->ExecuteNonQuery();
//MessageBox::Show("Talabalr jadvaliga yangi ma'lumotlar yozildi");
//Команда->CommandText = "UPDATE Talabalar SET Rasm = @Rasm WHERE id = @Id";
// Команда->Parameters->AddWithValue("@Rasm",SaveRasm());
// Команда->Parameters->AddWithValue("@Id",Id);
//
//Команда->ExecuteNonQuery();
//Подключение->Close();
TTJ_3 = gcnew TTJ_sinf(); bool s;
TTJ_3->ShowRecord(dataGridView1,"Select * From Talabalar"); delete TTJ_3;
/*
int rowToUpdate = Convert::ToInt32(dataGridView1->RowCount); MessageBox::Show(
(rowToUpdate-1).ToString());
int id = Convert::ToInt32(dataGridView1->Rows[rowToUpdate-1]->Cells["id"]->Value);
OleDbConnection^ con2 = gcnew OleDbConnection("Data Source=\"TTJ.mdb\";User " +
"ID=Admin;Provider=\"Microsoft.Jet.OLEDB.4.0\";");
con2->Open();
Команда = gcnew OleDb::OleDbCommand("Select * From [Talabalar]", con2);
Команда->CommandText = "UPDATE Talabalar SET Rasm = @Rasm WHERE id = @id";
Команда->Parameters->AddWithValue("@Rasm",SaveRasm());
Команда->Parameters->AddWithValue("@id",id);
Команда->ExecuteNonQuery();
MessageBox::Show("Talabalar jadvalining ma'lumotlari muaafaqiyatli yangilandi!!!!!!!!!!!!!!!");
*/
//Application::Restart();
}
void nol(){
textBox1->Text = " ";
textBox2->Text = " ";
textBox3->Text = " ";
//textBox4->Text = "218-17";
//textBox5->Text = "207";
//textBox6->Text = "A,B,C";
//textBox7->Text = "2";
textBox8->Text = " ";
textBox9->Text = " ";
textBox10->Text = " ";
//textBox11->Text = " ";
textBox12->Text = " ";
textBox13->Text = " ";
textBox14->Text = " ";
textBox15->Text = " ";
//textBox16->Text = " ";
textBox17->Text = " ";
textBox20->Text = " ";
textBox21->Text = " ";
textBox22->Text = " ";
textBox23->Text = " ";
textBox24->Text = " ";
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
//Saqlash();
TTJ_3 = gcnew TTJ_sinf(); bool s;
TTJ_3->ShowRecord(dataGridView1,"Select count (*) as soni From Talabalar Where
Blok_nomi ='"+
textBox6->Text+"' AND Xona_nomeri ="+textBox5->Text); delete TTJ_3;
int id = Convert::ToInt32(dataGridView1->Rows[0]->Cells["soni"]->Value);
if(id<=2){ auto MBox = MessageBox::Show("3 - talabani qo'shasizmi? ", "3 talik xonami",
MessageBoxButtons::YesNoCancel, MessageBoxIcon::Exclamation);
// YES — диалог; NO — выход; CANCEL - редактировать
if (MBox == Windows::Forms::DialogResult::No) return;
//if (MBox == Windows::Forms::DialogResult::Cancel){ this->Close();}
if (MBox == Windows::Forms::DialogResult::Yes){ Saqlash();}
}
else {MessageBox::Show("3 tadan ortiq talaba qo'shish mumkin emas");}
//int row_count =dataGridView1->Rows->GetR
// label18->Text ="soni= "+ (id).ToString();
}
private: System::Void Studentlarni_yangilash_Load(System::Object^ sender,
System::EventArgs^ e) {
nol(); //textBox11->Text = " ";
}
private: System::Void textBox11_TextChanged(System::Object^ sender, System::EventArgs^ e)
{
try{textBox16->Text = textBox11->Text->Substring(0,2);
textBox15->Text = textBox11->Text->Substring(3,2);
textBox14->Text = textBox11->Text->Substring(6,4);
} catch(Exception^ vaz){}
}
private: System::Void textBox5_TextChanged(System::Object^ sender, System::EventArgs^ e) {
try{ textBox7->Text = textBox5->Text->Substring(0,1);//Convert::ToString(textBox5>Text[0]);
} catch(Exception^ vaz){}
}
private: System::Void textBox6_TextChanged(System::Object^ sender, System::EventArgs^ e) {
int id;
if(textBox6->Text=="A"){
textBox6->Text="A"; goto bir;
}
if(textBox6->Text=="B"){
textBox6->Text="B"; goto bir;
}
if(textBox6->Text=="V"){
textBox6->Text="V";
}
else textBox6->Text="";
bir: id=2;
}
private: System::Void textBox4_TextChanged(System::Object^ sender, System::EventArgs^ e) {
DateTime^ dd= DateTime::Now;
String^ yil= Convert::ToString(dd);
//label18->Text = yil->Substring(8,2);
try{ //MessageBox::Show(textBox4->Text->Substring(4,2));
int a=Convert::ToInt32(textBox4->Text->Substring(4,2));
int b=Convert::ToInt32(yil->Substring(8,2));
if(a==b){textBox17->Text="1";}
if(a+1==b){textBox17->Text="2";}
if(a+2==b){textBox17->Text="3";}
if(a+3==b){textBox17->Text="4";}
} catch(Exception^ v){}
}
private: System::Void Studentlarni_yangilash_FormClosed(System::Object^ sender,
System::Windows::Forms::FormClosedEventArgs^ e) {
safe_cast<Form^>(F1)->Show();
//this->Close();
//}
}
};
}
http://fayllar.org
Download