Mavzu: Universitetda talabalar davomati elektron jurnali



Yüklə 1,44 Mb.
səhifə8/9
tarix13.06.2023
ölçüsü1,44 Mb.
#129205
1   2   3   4   5   6   7   8   9
Universitetda talabalar davomati

    Bu səhifədəki naviqasiya:
  • ILOVA.

Foydalanilganadabiyotlar:


1.Q.Abdurahimov C++ Dasturlash asoslari 2014
2. АшаринаН.А. Основы программирования на языках Си,С++.
Учебный курс.М.: 2002 г.
3. ПодбельскийВ.В. Язык С++ М.: Финансы и статистика, 1996
INTERNET MANBALARI:
1. info@ususoft.uz
2. MasterSherkulov.uz
3. dastur.uz
4.www.cyber-form.ru
5.www.wikipedia.org
6.www.programmer.com


ILOVA.


Dasturning ko’d qismi.
Unit 1
//---------------------------------------------------------------------------

#include


#include
#include
#pragma hdrstop

#include "Unit1.h"


#include "Unit2.h"
#include "Unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
Variant VarApp, VarBooks, VarBook, VarSheets, VarSheet, VarCells, VarCell;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
Form3->Caption="Add";
DM->ADOTable1->Insert();
Form3->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn2Click(TObject *Sender)
{
DM->ADOTable1->Delete();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn3Click(TObject *Sender)
{
String a=DM->ADOTable1->FieldByName("Ism")->AsString;
DM->ADOTable1->Edit();
Form3->Caption=a;
Form3->ShowModal();

}
//---------------------------------------------------------------------------


void __fastcall TForm1::printexcel1Click(TObject *Sender)
{
VarApp=CreateOleObject("Excel.Application");
VarApp.OlePropertySet("Visible", true);
VarBooks=VarApp.OlePropertyGet("Workbooks");
VarApp.OlePropertySet("SheetsInNewWorkbook", 3);
VarBooks.OleProcedure("Add");
VarBook=VarBooks.OlePropertyGet("Item",1);
VarSheets=VarBook.OlePropertyGet("Worksheets");

VarSheet=VarSheets.OlePropertyGet("Item",1);


VarSheet.OlePropertySet("Name",WideString("Talaba"));
VarCells=VarSheet.OlePropertyGet("Cells");
VarCell=VarCells.OlePropertyGet("Item",1,1);
VarCell.OlePropertySet("Value", WideString("№"));
VarCell=VarCells.OlePropertyGet("Item",1,2);
VarCell.OlePropertySet("Value", WideString("Familiya"));
VarCell=VarCells.OlePropertyGet("Item",1,3);
VarCell.OlePropertySet("Value", WideString("Ism"));
VarCell=VarCells.OlePropertyGet("Item",1,4);
VarCell.OlePropertySet("Value", WideString("Yonalish"));
VarCell=VarCells.OlePropertyGet("Item",1,5);
VarCell.OlePropertySet("Value", WideString("Guruh"));
VarCell=VarCells.OlePropertyGet("Item",1,6);
VarCell.OlePropertySet("Value", WideString("Davomat"));

String fam, ism, yonalish, guruh, davomat;


DM->ADOTable1->First();
for (int i = 2; i <= DM->ADOTable1->RecordCount+1; i++) {
fam=DM->ADOTable1->FieldByName("Familiya")->AsString;
ism=DM->ADOTable1->FieldByName("Ism")->AsString;
yonalish=DM->ADOTable1->FieldByName("Yonalish")->AsString;
guruh=DM->ADOTable1->FieldByName("Guruh")->AsString;
davomat=DM->ADOTable1->FieldByName("Davomat")->AsString;

VarCell=VarCells.OlePropertyGet("Item",i,1);


VarCell.OlePropertySet("Value", WideString(i-1));
VarCell=VarCells.OlePropertyGet("Item",i,2);
VarCell.OlePropertySet("Value", WideString(fam));
VarCell=VarCells.OlePropertyGet("Item",i,3);
VarCell.OlePropertySet("Value", WideString(ism));
VarCell=VarCells.OlePropertyGet("Item",i,4);
VarCell.OlePropertySet("Value", WideString(yonalish));
VarCell=VarCells.OlePropertyGet("Item",i,5);
VarCell.OlePropertySet("Value", WideString(guruh));
VarCell=VarCells.OlePropertyGet("Item",i,6);
VarCell.OlePropertySet("Value", WideString(davomat));
DM->ADOTable1->Next();
}

}
//---------------------------------------------------------------------------


void __fastcall TForm1::Edit1Change(TObject *Sender)
{
TLocateOptions qidiruv;
qidiruv.Clear();
qidiruv<DM->ADOTable1->Locate("Familiya", Edit1->Text, qidiruv);
}
//---------------------------------------------------------------------------



Yüklə 1,44 Mb.

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




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