O‘zbekiston respublikasi axborot texnologiyalari va kommunikatsiyalarini



Yüklə 1,31 Mb.
səhifə6/6
tarix13.04.2023
ölçüsü1,31 Mb.
#97226
1   2   3   4   5   6
bobur

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(this->pictureBox1))->BeginInit();
this->tabControl1->SuspendLayout();
this->tabPage1->SuspendLayout();
this->tabPage2->SuspendLayout();
this->tabPage3->SuspendLayout();
(cli::safe_cast(this->dataGridView1))->BeginInit();
this->SuspendLayout();
//
// pictureBox1
//
this->pictureBox1->Image = (cli::safe_cast(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(this->dataGridView1))->EndInit();
this->ResumeLayout(false);
this->PerformLayout();

}
#pragma endregion


private: array^ 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(F1)->Show();
//this->Close();
//}
}
};
}

Yüklə 1,31 Mb.

Dostları ilə paylaş:
1   2   3   4   5   6




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin