Разработка распределенного программного обеспечения для контроля знаний студентов

Сетевая система контроля знаний студентов на основе объектно-ориентированного подхода. Выбор программно-технических средств для реализации проекта. Алгоритмическое и программное обеспечение, интерфейс пользователя. Разработка элементов базы данных.

Рубрика Программирование, компьютеры и кибернетика
Вид дипломная работа
Язык русский
Дата добавления 04.02.2013
Размер файла 1,3 M

Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже

Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.

//Нажатие клавиши мыши в поле ответа

begin

SenderRich := Sender;

end;

procedure TEdit_test.dbAReLoadClick(Sender: TObject);

begin

dm.Load_Question();

dm.Load_Answer();

LoadQuestion();

LoadAnswer();

end;

procedure TEdit_test.dbIFirstClick(Sender: TObject);

begin

dm.Query_Illustration.First;

ReLoadIllustration();

end;

procedure TEdit_test.dbIGoToNClick(Sender: TObject);

begin

dm.Query_Illustration.RecNo := StrToInt(N_illustration.Text);

ReLoadIllustration();

end;

procedure TEdit_test.dbILastClick(Sender: TObject);

begin

dm.Query_Illustration.Last;

ReLoadIllustration();

end;

procedure TEdit_test.ReLoadAllClick(Sender: TObject);

begin

dm.Load_Question();

LoadQuestion();

LoadAnswer()

end;

procedure TEdit_test.ReLoadIllustration;

begin

QuestionIllustration.Picture := nil;

QuestionIllustration.Picture.Assign(dm.Query_Illustration.FieldByName('illustration'));

QuestionIllustration.Stretch := true;

QuestionIllustration.Proportional := propstr.Checked;

end;

procedure TEdit_test.dbQNextClick(Sender: TObject);

//переход на следующий вопрос

begin

dm.Query_Question.Next;

LoadQuestion();

end;

function TEdit_test.OpenIllustrationAnswer;

//открытие иллюстрации на ответ

begin

openillustrationAnswer := '';

if not dm.OPD.Execute then

exit;

OpenIllustrationAnswer := dm.OPD.FileName;

end;

procedure TEdit_test.OpenIllustrationQuestion();

begin

if not dm.OPD.Execute then

begin

exit;

end;

try

QuestionIllustration.Picture.LoadFromFile(dm.opd.FileName);

except

;

end;

end;

procedure TEdit_test.dbQPostClick(Sender: TObject);

begin

try

dm.Query_Question.Post;

except

;

end;

SaveAnswer();

LoadQuestion();

end;

procedure TEdit_test.dbQPriorClick(Sender: TObject);

//переход на предидущий вопрос

begin

dm.Query_Question.Prior;

LoadQuestion();

end;

procedure TEdit_test.deleteClick(Sender: TObject);

var

ID: integer;

begin

try

ID := TextIndex[TsRichEdit(SenderRich).Tag];

With dm.Query_Delete do

begin

Active := false;

SQL.Clear;

SQL.Add('DELETE FROM answer ') ;

SQL.Add('WHERE id_answer =' + IntToStr(ID));

Active := true;

end;

except

LoadQuestion();

end;

end;

procedure TEdit_test.SaveAnswer;

var

index: integer;

ID: integer;

Checked: string;

bs: TBlobStream;

begin

// Сохраняем текст

index := 0;

while index < 100 do

begin

try

ID := TextIndex[TsRichEdit(TextList.Items[index]).Tag];

bs := nil;

With dm.Query_Answer do

begin

Active := false;

SQL.Clear;

SQL.Add('SELECT * FROM answer ') ;

SQL.Add('WHERE id_answer =' + IntToStr(ID));

Active := true;

First;

TsRichEdit(TextList.Items[index]).PlainText := false;

Edit;

dm.Query_Answer.FieldByName('answer').Assign(TsRichEdit(TextList.Items[index]).Lines);

Post;

end;

except

;

end;

inc(index);

end;

// Сохраняем картинки

index := 0;

while index < 100 do

begin

try

ID := IllustrationIndex[TImage(ImageList.Items[index]).Tag];

bs := nil;

With dm.Query_Answer do

begin

Active := false;

SQL.Clear;

SQL.Add('SELECT * FROM answer ') ;

SQL.Add('WHERE ' + 'id_answer = ' + IntToStr(ID));

Active := true;

First;

Edit;

FieldByName('illustration').Assign(TImage(ImageList.Items[index]).Picture);

Post;

end;

except

;

end;

inc(index);

end;

//Сохраняем радиобт

index := 0;

while index < 100 do

begin

try

ID := RadioIndex[TsRadioButton(RadioList.Items[index]).Tag];

if TRadioButton(RadioList.Items[index]).Checked then

begin

Checked := '1';

end

else

begin

Checked := '0';

end;

With dm.Query_Answer do

begin

Active := false;

SQL.Clear;

SQL.Add('UPDATE Answer ') ;

SQL.Add('SET correct = ' + Checked);

SQL.Add('WHERE id_answer =' + IntToStr(ID));

Active := true;

end;

except

;

end;

inc(index);

end;

// Сохраняем чекеты

index := 0;

while index < 100 do

begin

try

ID := CheckIndex[TsCheckBox(CheckList.Items[index]).Tag];

if TCheckBox(CheckList.Items[index]).Checked then

begin

Checked := '1';

end

else

begin

Checked := '0';

end;

With dm.Query_Answer do

begin

Active := false;

SQL.Clear;

SQL.Add('UPDATE Answer ') ;

SQL.Add('SET correct = ' + Checked);

SQL.Add('WHERE id_answer =' + IntToStr(ID));

Active := true;

end;

except

;

end;

inc(index);

end;

// Сохраняем чекеты stretch / proportional

index := 0;

while index < 100 do

begin

try

ID := CheckStretchIndex[TsCheckBox(CheckStretchList.Items[index]).Tag];

if TCheckBox(CheckStretchList.Items[index]).Checked then

begin

Checked := '1';

end

else

begin

Checked := '0';

end;

With dm.Query_Answer do

begin

Active := false;

SQL.Clear;

SQL.Add('UPDATE Answer ') ;

SQL.Add('SET propstr = ' + Checked);

SQL.Add('WHERE id_answer =' + IntToStr(ID));

Active := true;

end;

except

;

end;

inc(index);

end;

end;

procedure TEdit_test.SaveillustrationQuestion;

begin

try

dm.Query_Illustration.Post;

except;

;

end;

dm.Query_Illustration.Edit;

dm.Query_Illustration.FieldByName('illustration').Assign(Questionillustration.Picture);

dm.Query_Illustration.Post;

end;

procedure TEdit_test.SaveQIllustrationClick(Sender: TObject);

begin

SaveillustrationQuestion();

end;

end.

unit unit_main_manager;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, Tabs, StdCtrls, DBCtrls, ComCtrls, unit_dm, ExtCtrls, Grids, DBGrids,

Mask, Buttons, sPanel, sDBNavigator, sDBEdit, sLabel, sDBRichEdit, sGroupBox,

sBitBtn, sPageControl, sDBComboBox, FileCtrl, sCheckBox, sRadioButton,

acProgressBar, sTrackBar, sButton, sGauge, DB, sComboBox, sUpDown, sBevel,

sSpeedButton, sEdit, DBTables,

ImgList, Provider, DBClient, JRCheckBox, JRDBCheckBoxMySQL;

type

Tmain_manager = class(TForm)

PageAdministration: TsPageControl;

opros: TsTabSheet;

tuser: TsTabSheet;

subject: TsGroupBox;

Grid_Subject: TDBGrid;

DBInfo_Subject: TsDBRichEdit;

Create_Subject: TsBitBtn;

Navigator_Subject: TsDBNavigator;

theme: TsGroupBox;

Grid_Theme: TDBGrid;

DBInfo_Theme: TsDBRichEdit;

Navigator_Theme: TsDBNavigator;

Create_Theme: TsBitBtn;

sGroupBox1: TsGroupBox;

sLabel1: TsLabel;

sLabel2: TsLabel;

DBEsubject: TsDBEdit;

DBEtheme: TsDBEdit;

BtnQuestion: TsBitBtn;

StydentGrid: TDBGrid;

StydentNavigator: TsDBNavigator;

sGroupBox2: TsGroupBox;

sLabel3: TsLabel;

sLabel4: TsLabel;

sLabel5: TsLabel;

sLabel6: TsLabel;

sLabel7: TsLabel;

sLabel8: TsLabel;

ulogin: TsDBEdit;

upassword: TsDBEdit;

usname: TsDBEdit;

uname: TsDBEdit;

upatronymic: TsDBEdit;

uaccessbox: TsDBComboBox;

UReLoad: TsBitBtn;

panelstydent: TsTabSheet;

DBGrid2: TDBGrid;

sDBNavigator1: TsDBNavigator;

sGroupBox3: TsGroupBox;

sLabel11: TsLabel;

sLabel12: TsLabel;

sLabel13: TsLabel;

stsname: TsDBEdit;

stname: TsDBEdit;

stgroup: TsDBEdit;

stReload: TsBitBtn;

stCreate: TsBitBtn;

stDelete: TsBitBtn;

stSave: TsBitBtn;

stCancel: TsBitBtn;

uCreate: TsBitBtn;

uDelete: TsBitBtn;

uSave: TsBitBtn;

uCancel: TsBitBtn;

Skin: TsTabSheet;

Progr2: TsGauge;

BtnOpen: TsBitBtn;

LoadOutBD: TsBitBtn;

sDBNavigator2: TsDBNavigator;

DBGrid3: TDBGrid;

LoadInBD: TsBitBtn;

BtnDelete: TsButton;

sRadioGroup1: TsRadioGroup;

Progr3: TsTrackBar;

Progr1: TsProgressBar;

sPanel1: TsPanel;

sRadioButton1: TsRadioButton;

sRadioButton2: TsRadioButton;

sCheckBox1: TsCheckBox;

sDBRichEdit1: TsDBRichEdit;

ApplyOutBD: TsBitBtn;

BtnSetSkin: TsBitBtn;

sLabel9: TsLabel;

sEdit1: TsEdit;

sButton1: TsButton;

sSpeedButton1: TsSpeedButton;

sBevel1: TsBevel;

sUpDown1: TsUpDown;

sComboBox1: TsComboBox;

BtnCancel: TsBitBtn;

BtnBetta: TsBitBtn;

Mark: TsTabSheet;

Btn_Subject: TsBitBtn;

Btn_Subject_Theme: TsBitBtn;

Btn_Subject_Theme_group: TsBitBtn;

BtnAll: TsBitBtn;

BoxAccessSubject: TJRDBCheckBoxMySQL;

BoxAccessTheme: TJRDBCheckBoxMySQL;

procedure Grid_SubjectKeyPress(Sender: TObject; var Key: Char);

procedure Grid_SubjectColExit(Sender: TObject);

procedure Grid_SubjectCellClick(Column: TColumn);

procedure Grid_SubjectDrawColumnCell(Sender: TObject; const Rect: TRect;

DataCol: Integer; Column: TColumn; State: TGridDrawState);

procedure uCancelClick(Sender: TObject);

procedure uSaveClick(Sender: TObject);

procedure uDeleteClick(Sender: TObject);

procedure uCreateClick(Sender: TObject);

procedure stCancelClick(Sender: TObject);

procedure stSaveClick(Sender: TObject);

procedure stDeleteClick(Sender: TObject);

procedure stCreateClick(Sender: TObject);

procedure stReloadClick(Sender: TObject);

procedure UReLoadClick(Sender: TObject);

procedure BtnQuestionClick(Sender: TObject);

procedure Create_ThemeClick(Sender: TObject);

procedure Navigator_SubjectClick(Sender: TObject; Button: TNavigateBtn);

procedure Grid_SubjectMouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure FormClose(Sender: TObject; var Action: TCloseAction);

procedure Create_SubjectClick(Sender: TObject);

procedure Button1Click(Sender: TObject);

procedure FormShow(Sender: TObject);

procedure BtnOpenClick(Sender: TObject);

procedure LoadInBDClick(Sender: TObject);

procedure BtnDeleteClick(Sender: TObject);

procedure ApplyOutBDClick(Sender: TObject);

procedure LoadOutBDClick(Sender: TObject);

procedure BtnSetSkinClick(Sender: TObject);

procedure SkinShow(Sender: TObject);

procedure Progr3Change(Sender: TObject);

procedure BtnCancelClick(Sender: TObject);

procedure BtnBettaClick(Sender: TObject);

procedure Btn_SubjectClick(Sender: TObject);

procedure Btn_Subject_ThemeClick(Sender: TObject);

procedure Btn_Subject_Theme_groupClick(Sender: TObject);

procedure BtnAllClick(Sender: TObject);

procedure Grid_ThemeKeyPress(Sender: TObject; var Key: Char);

procedure Grid_ThemeCellClick(Column: TColumn);

procedure Grid_ThemeColExit(Sender: TObject);

procedure Grid_ThemeDrawColumnCell(Sender: TObject; const Rect: TRect;

DataCol: Integer; Column: TColumn; State: TGridDrawState);

private

{ Private declarations }

public

{ Public declarations }

procedure LoadSkin(FileName: String);//Загрузка в БД

function SaveSkin(Path: String): String;//Сохранение скина на диск

procedure ApplySkin(FileName: String);//Применяет скин

end;

var

main_manager: Tmain_manager;

implementation

uses

unit_edit_test, unit_betta, unit_marks_subject_theme,

unit_marks_subject, unit_marks_subject_theme_group, unit_marks,

unit_mark_option;

{$R *.dfm}

procedure Tmain_manager.ApplyOutBDClick(Sender: TObject);

var

Path: String;

begin

Path := ExtractFilePath(ParamStr(0)) + 'temp\';

ApplySkin(SaveSkin(Path));

end;

procedure Tmain_manager.ApplySkin(FileName: String);

var

Fname: String;

I: Integer;

Name: String;

Path: String;

begin

if FileExists( FileName ) then

begin

Path := ExtractFilePath(FileName);

Name := ExtractFileName(FileName);

Delete( Name, LastDelimiter( '.', Name ), Length( Name ) );

end

else

Name := '';

dm.SkinManager.SkinDirectory := Path;

dm.SkinManager.SkinName := Name;

dm.SkinManager.Active := true;

end;

procedure Tmain_manager.BtnAllClick(Sender: TObject);

begin

Form_mark_option.Show;

Form_mark_option.Form_index := 0;

Hide;

end;

procedure Tmain_manager.BtnBettaClick(Sender: TObject);

begin

FrmBetta.Show;

end;

procedure Tmain_manager.BtnCancelClick(Sender: TObject);

begin

dm.SetAllSkinPriority('null');

dm.SkinManager.Active := false;

end;

procedure Tmain_manager.BtnDeleteClick(Sender: TObject);

begin

dm.Query_Skin.Delete;

end;

procedure Tmain_manager.BtnOpenClick(Sender: TObject);

begin

if not dm.OD.Execute then exit;

ApplySkin(dm.OD.FileName);

end;

procedure Tmain_manager.BtnQuestionClick(Sender: TObject);

begin

dm.Last_Selected.id_subject := dm.Query_Subject.FieldByName('id_subject').AsInteger;

dm.Last_Selected.id_theme := dm.Query_Theme.FieldByName('id_theme').AsInteger;

main_manager.Hide;

edit_test.Show;

end;

procedure Tmain_manager.BtnSetSkinClick(Sender: TObject);

var

id_skin: integer;

begin

ApplyOutBD.OnClick(Sender);

id_skin := dm.Query_Skin.FieldByName('id_skin').AsInteger;

dm.SetAllSkinPriority('0');

dm.SetSkinPriority('100', id_skin);

dm.Load_Query_Skin;

end;

procedure Tmain_manager.Button1Click(Sender: TObject);

begin

end;

//Создание нового предмета

procedure Tmain_manager.Create_SubjectClick(Sender: TObject);

var

Subject_New: String;

begin

Subject_New := InputBox('Создание нового предмета',

'Введите название создаваемого предмета',

'<<< Новый предмет >>>');

if Subject_New <> '<<< Новый предмет >>>' then

begin

try

dm.Create_Subject_New(subject_New);

except

;

end;

dm.Query_Subject_Set;

dm.Query_Theme_Set;

end;

end;

//Создание новой темы

procedure Tmain_manager.Create_ThemeClick(Sender: TObject);

var

Theme_New: String;

id_subject: integer;

begin

id_subject := dm.Query_Subject.FieldByName('id_subject').AsInteger;

dm.Last_Selected.id_subject := id_subject;

Theme_New := InputBox('Создание новой темы',

'Введите название создаваемой темы',

'<<< Новая тема >>>');

if Theme_New <> '<<< Новая тема >>>' then

begin

try

dm.Create_Theme_New(id_subject, theme_New);

except

;

end;

dm.Last_Selected.id_theme := dm.Query_Theme.FieldByName('id_theme').AsInteger;

dm.Query_Subject_Set;

dm.Query_Subject.Locate('id_subject', dm.Last_Selected.id_subject, []);

dm.Query_Theme_Set;

end;

end;

procedure Tmain_manager.FormClose(Sender: TObject;

var Action: TCloseAction);

begin

Application.Terminate;

end;

procedure Tmain_manager.FormShow(Sender: TObject);

begin

dm.Query_Subject_Set();

dm.Query_Theme_Set();

dm.Load_User;

dm.Load_Student;

end;

procedure Tmain_manager.Grid_SubjectCellClick(Column: TColumn);

begin

if Column.FieldName = 'access' then

begin

Column.Field.DataSet.Edit;

if Column.Field.DataSet.FieldByName('access').AsInteger = 1 then

Column.Field.DataSet.FieldByName('access').AsInteger := 0

else

Column.Field.DataSet.FieldByName('access').AsInteger := 1;

Column.Field.DataSet.Post;

end;

end;

procedure Tmain_manager.Grid_SubjectColExit(Sender: TObject);

begin

If Grid_Subject.SelectedField.FieldName = BoxAccessSubject.DataField then

BoxAccessSubject.Visible := false;

end;

procedure Tmain_manager.Grid_SubjectDrawColumnCell(Sender: TObject;

const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);

Var

Style: Integer;

ImageIndex: Integer;

begin

if Column.FieldName = 'access' then

begin

if Column.Field.DataSet.FieldByName('access').AsInteger = 1 then

ImageIndex := 0

else

ImageIndex := 1;

end;

dm.ImageList.Draw(TDBGrid(Sender).Canvas,Rect.Left,Rect.Top, ImageIndex, true );

if (gdFocused in State) and (Column.FieldName = BoxAccessSubject.DataField)

then

begin

BoxAccessSubject.Left:= Rect.Left + Grid_Subject.Left + 1;

BoxAccessSubject.Top:= Rect.Top + Grid_Subject.top + 1;

BoxAccessSubject.Width := Rect.Right - Rect.Left;

BoxAccessSubject.Height := Rect.Bottom - Rect.Top;

BoxAccessSubject.Visible:=true;

end;

end;

procedure Tmain_manager.Grid_SubjectKeyPress(Sender: TObject; var Key: Char);

begin

if (key <> chr(9)) then

begin

if (Grid_Subject.SelectedField.FieldName = BoxAccessSubject.DataField) then

begin

BoxAccessSubject.SetFocus;

SendMessage(BoxAccessSubject.Handle, WM_Char, word(Key), 0);

end;

end;

end;

procedure Tmain_manager.Grid_SubjectMouseUp(Sender: TObject;

Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

begin

dm.Query_Theme_Set();

end;

procedure Tmain_manager.Grid_ThemeCellClick(Column: TColumn);

begin

if Column.FieldName = 'access' then

begin

Column.Field.DataSet.Edit;

if Column.Field.DataSet.FieldByName('access').AsInteger = 1 then

Column.Field.DataSet.FieldByName('access').AsInteger := 0

else

Column.Field.DataSet.FieldByName('access').AsInteger := 1;

Column.Field.DataSet.Post;

end;

end;

procedure Tmain_manager.Grid_ThemeColExit(Sender: TObject);

begin

If Grid_Theme.SelectedField.FieldName = BoxAccessTheme.DataField then

BoxAccessTheme.Visible := false;

end;

procedure Tmain_manager.Grid_ThemeDrawColumnCell(Sender: TObject;

const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);

Var

Style: Integer;

ImageIndex: Integer;

begin

if Column.FieldName = 'access' then

begin

if Column.Field.DataSet.FieldByName('access').AsInteger = 1 then

ImageIndex := 0

else

ImageIndex := 1;

end;

dm.ImageList.Draw(TDBGrid(Sender).Canvas,Rect.Left,Rect.Top, ImageIndex, true );

if (gdFocused in State) and (Column.FieldName = BoxAccessTheme.DataField)

then

begin

BoxAccessTheme.Left:= Rect.Left + Grid_Theme.Left + 1;

BoxAccessTheme.Top:= Rect.Top + Grid_Theme.top + 1;

BoxAccessTheme.Width := Rect.Right - Rect.Left;

BoxAccessTheme.Height := Rect.Bottom - Rect.Top;

BoxAccessTheme.Visible:=true;

end;

end;

procedure Tmain_manager.Grid_ThemeKeyPress(Sender: TObject; var Key: Char);

begin

if (key <> chr(9)) then

begin

if (Grid_Subject.SelectedField.FieldName = BoxAccessTheme.DataField) then

begin

BoxAccessTheme.SetFocus;

SendMessage(BoxAccessTheme.Handle, WM_Char, word(Key), 0);

end;

end;

end;

procedure Tmain_manager.LoadInBDClick(Sender: TObject);

var

Fname: String;

I: Integer;

name: String;

PAth: String;

begin

LoadSkin(dm.OD.FileName);

end;

procedure Tmain_manager.LoadOutBDClick(Sender: TObject);

var

Path: String;

begin

if not SelectDirectory('Выберете папку','C:\, D:\', Path) then

Exit;

Path := Path + '\';

SaveSkin(Path);

end;

procedure Tmain_manager.LoadSkin(FileName: String);

var

name: String;

begin

if FileExists( FileName ) then

begin

Name := ExtractFileName(FileName);

Delete( Name, LastDelimiter( '.', Name ), Length( Name ) );

end

else

Name := 'name';

dm.Load_Query_Skin();

dm.Query_Skin.Insert;

dm.Query_Skin.Post;

dm.Query_Skin.Edit;

(dm.Query_Skin.FieldByName('skin') as TBlobField).LoadFromFile(FileName);

dm.Query_Skin.FieldByName('name').AsString := name;

dm.Query_Skin.Post;

end;

procedure Tmain_manager.Navigator_SubjectClick(Sender: TObject;

Button: TNavigateBtn);

begin

dm.Query_Theme_Set();

end;

procedure Tmain_manager.Progr3Change(Sender: TObject);

begin

Progr1.Position := Progr3.Position;

Progr2.Progress := Progr3.Position;

end;

function Tmain_manager.SaveSkin(Path: String): String;

var

FileName: String;

begin

FileName := Path + dm.Query_Skin.FieldByName('name').AsString + '.asz';

(dm.Query_Skin.FieldByName('skin') as TBlobField).SaveToFile(FileName);

SaveSkin := FileName;

end;

procedure Tmain_manager.Btn_SubjectClick(Sender: TObject);

begin

Form_mark_option.Show;

Form_mark_option.Form_index := 1;

main_manager.Hide;

end;

procedure Tmain_manager.Btn_Subject_ThemeClick(Sender: TObject);

begin

Form_mark_option.Show;

Form_mark_option.Form_index := 2;

main_manager.Hide;

end;

procedure Tmain_manager.Btn_Subject_Theme_groupClick(Sender: TObject);

begin

Form_mark_option.Show;

Form_mark_option.Form_index := 3;

main_manager.Hide;

end;

procedure Tmain_manager.SkinShow(Sender: TObject);

begin

dm.Load_Query_Skin;

end;

procedure Tmain_manager.stCancelClick(Sender: TObject);

begin

try

dm.Query_Student.Cancel;

except

;

end;

end;

procedure Tmain_manager.stCreateClick(Sender: TObject);

begin

try

dm.Query_Student.Insert;

except

;

end;

end;

procedure Tmain_manager.stDeleteClick(Sender: TObject);

begin

try

dm.Query_Student.Delete;

except

;

end;

end;

procedure Tmain_manager.stReloadClick(Sender: TObject);

begin

try

dm.Load_Student;

except

;

end;

end;

procedure Tmain_manager.stSaveClick(Sender: TObject);

begin

try

dm.Query_Student.Post;

except

;

end;

end;

procedure Tmain_manager.uCancelClick(Sender: TObject);

begin

try

dm.Query_User.Cancel;

except

;

end;

end;

procedure Tmain_manager.uCreateClick(Sender: TObject);

begin

try

dm.Query_User.Insert;

except

;

end;

end;

procedure Tmain_manager.uDeleteClick(Sender: TObject);

begin

try

dm.Query_User.Delete;

except

;

end;

end;

procedure Tmain_manager.UReLoadClick(Sender: TObject);

begin

try

dm.Load_User;

except

;

end;

end;

procedure Tmain_manager.uSaveClick(Sender: TObject);

begin

try

dm.Query_User.Post;

except

;

end;

end;

end.

unit unit_marks;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, Grids, DBGrids, Menus;

type

TForm_Marks = class(TForm)

MainMenu1: TMainMenu;

columns: TMenuItem;

select: TMenuItem;

Grid_Mark: TDBGrid;

Report: TMenuItem;

View: TMenuItem;

procedure FormShow(Sender: TObject);

procedure FormClose(Sender: TObject; var Action: TCloseAction);

procedure ViewClick(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

procedure ColumnsSet();

end;

var

Form_Marks: TForm_Marks;

implementation

uses

unit_dm, unit_mark_option, unit_main_manager;

{$R *.dfm}

procedure TForm_Marks.ColumnsSet;

begin

Grid_Mark.Columns[0].Visible := Form_mark_option.N_group.Checked;

Grid_Mark.Columns[1].Visible := Form_mark_option.SName.Checked;

Grid_Mark.Columns[2].Visible := Form_mark_option.Name.Checked;

Grid_Mark.Columns[3].Visible := Form_mark_option.Subject.Checked;

Grid_Mark.Columns[4].Visible := Form_mark_option.Theme.Checked;

Grid_Mark.Columns[5].Visible := Form_mark_option.date_begin.Checked;

Grid_Mark.Columns[6].Visible := Form_mark_option.time_begin.Checked;

Grid_Mark.Columns[7].Visible := Form_mark_option.time_end.Checked;

Grid_Mark.Columns[8].Visible := Form_mark_option.mark.Checked;

Grid_Mark.Columns[9].Visible := Form_mark_option.mark_5.Checked;

Grid_Mark.Columns[10].Visible := Form_mark_option.mark_100.Checked;

Grid_Mark.Columns[0].Width := 50;

Grid_Mark.Columns[1].Width := 104;

Grid_Mark.Columns[2].Width := 108;

Grid_Mark.Columns[3].Width := 64;

Grid_Mark.Columns[4].Width := 141;

Grid_Mark.Columns[5].Width := 90;

Grid_Mark.Columns[6].Width := 85;

Grid_Mark.Columns[7].Width := 107;

Grid_Mark.Columns[8].Width := 36;

Grid_Mark.Columns[9].Width := 71;

Grid_Mark.Columns[10].Width := 79;

end;

procedure TForm_Marks.FormClose(Sender: TObject; var Action: TCloseAction);

begin

main_manager.Show;

end;

procedure TForm_Marks.FormShow(Sender: TObject);

begin

dm.Load_Marks_Al();

ColumnsSet;

end;

procedure TForm_Marks.ViewClick(Sender: TObject);

begin

dm.RvProject.Execute;

dm.RvProject.Close;

end;

end.

unit unit_marks_subject;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, ExtCtrls, sPanel, sTabControl, Grids, DBGrids, StdCtrls, Buttons,

sBitBtn, sMemo, Menus;

type

TForm_Marks_Subject = class(TForm)

TabSubject: TsTabControl;

Grid_Mark: TDBGrid;

MainMenu1: TMainMenu;

columns: TMenuItem;

select: TMenuItem;

procedure FormShow(Sender: TObject);

procedure TabSubjectMouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure FormClose(Sender: TObject; var Action: TCloseAction);

private

{ Private declarations }

procedure CreateTabSubject();//Создаёт вкладки для каждого предмета

public

{ Public declarations }

procedure ColumnsSet();

end;

var

Form_Marks_Subject: TForm_Marks_Subject;

id_subject: array[0..500] of Integer;

implementation

uses

unit_dm, unit_main_manager, unit_mark_option;

{$R *.dfm}

procedure TForm_Marks_Subject.ColumnsSet;

begin

Grid_Mark.Columns[0].Visible := Form_mark_option.N_group.Checked;

Grid_Mark.Columns[1].Visible := Form_mark_option.SName.Checked;

Grid_Mark.Columns[2].Visible := Form_mark_option.Name.Checked;

Grid_Mark.Columns[3].Visible := Form_mark_option.Subject.Checked;

Grid_Mark.Columns[4].Visible := Form_mark_option.Theme.Checked;

Grid_Mark.Columns[5].Visible := Form_mark_option.date_begin.Checked;

Grid_Mark.Columns[6].Visible := Form_mark_option.time_begin.Checked;

Grid_Mark.Columns[7].Visible := Form_mark_option.time_end.Checked;

Grid_Mark.Columns[8].Visible := Form_mark_option.mark.Checked;

Grid_Mark.Columns[9].Visible := Form_mark_option.mark_5.Checked;

Grid_Mark.Columns[0].Width := 50;

Grid_Mark.Columns[1].Width := 104;

Grid_Mark.Columns[2].Width := 108;

Grid_Mark.Columns[3].Width := 64;

Grid_Mark.Columns[4].Width := 141;

Grid_Mark.Columns[5].Width := 90;

Grid_Mark.Columns[6].Width := 85;

Grid_Mark.Columns[7].Width := 107;

Grid_Mark.Columns[8].Width := 36;

Grid_Mark.Columns[9].Width := 71;

end;

procedure TForm_Marks_Subject.CreateTabSubject;

var

TabIndex: integer;

begin

TabSubject.Tabs.Clear;

dm.Query_Subject.First;

TabIndex := 0;

while not dm.Query_Subject.Eof do

begin

TabSubject.Tabs.Add(dm.Query_Subject.FieldByName('subject').AsString);

id_subject[TabIndex] := dm.Query_Subject.FieldByName('id_subject').AsInteger;

Inc(TabIndex);

dm.Query_Subject.Next;

end;

end;

procedure TForm_Marks_Subject.FormClose(Sender: TObject;

var Action: TCloseAction);

begin

main_manager.Show;

end;

procedure TForm_Marks_Subject.FormShow(Sender: TObject);

begin

CreateTabSubject();

dm.Load_Mark_Subject(id_subject[TabSubject.TabIndex]);

TabSubject.TabIndex := 0;

ColumnsSet;

end;

procedure TForm_Marks_Subject.TabSubjectMouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

begin

dm.Load_Mark_Subject(id_subject[TabSubject.TabIndex]);

end;

end.

unit unit_marks_subject_theme;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, ExtCtrls, sPanel, sTabControl, Grids, DBGrids, StdCtrls, Buttons,

sBitBtn, sMemo, Menus;

type

TForm_Marks_Subject_Theme = class(TForm)

TabSubject: TsTabControl;

MainMenu1: TMainMenu;

columns: TMenuItem;

select: TMenuItem;

TabTheme: TsTabControl;

Grid_Mark: TDBGrid;

procedure FormShow(Sender: TObject);

procedure TabSubjectMouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure TabThemeMouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure FormClose(Sender: TObject; var Action: TCloseAction);

private

{ Private declarations }

procedure CreateTabSubject();//Создаёт вкладки для каждого предмета

procedure CreateTabTheme(id_subject: integer);//Создаёт вкладки для тем

public

{ Public declarations }

procedure ColumnsSet();

end;

var

Form_Marks_Subject_Theme: TForm_Marks_Subject_Theme;

id_subject: array[0..500] of Integer;

id_theme: array[0..500] of Integer;

implementation

uses

unit_dm, unit_main_manager, unit_mark_option;

{$R *.dfm}

procedure TForm_Marks_Subject_Theme.ColumnsSet;

begin

Grid_Mark.Columns[0].Visible := Form_mark_option.N_group.Checked;

Grid_Mark.Columns[1].Visible := Form_mark_option.SName.Checked;

Grid_Mark.Columns[2].Visible := Form_mark_option.Name.Checked;

Grid_Mark.Columns[3].Visible := Form_mark_option.Subject.Checked;

Grid_Mark.Columns[4].Visible := Form_mark_option.Theme.Checked;

Grid_Mark.Columns[5].Visible := Form_mark_option.date_begin.Checked;

Grid_Mark.Columns[6].Visible := Form_mark_option.time_begin.Checked;

Grid_Mark.Columns[7].Visible := Form_mark_option.time_end.Checked;

Grid_Mark.Columns[8].Visible := Form_mark_option.mark.Checked;

Grid_Mark.Columns[0].Width := 50;

Grid_Mark.Columns[1].Width := 104;

Grid_Mark.Columns[2].Width := 108;

Grid_Mark.Columns[3].Width := 64;

Grid_Mark.Columns[4].Width := 141;

Grid_Mark.Columns[5].Width := 90;

Grid_Mark.Columns[6].Width := 85;

Grid_Mark.Columns[7].Width := 107;

Grid_Mark.Columns[8].Width := 36;

end;

procedure TForm_Marks_Subject_Theme.CreateTabSubject;

var

TabIndex: integer;

begin

dm.Query_Subject_Set;

TabSubject.Tabs.Clear;

dm.Query_Subject.First;

TabIndex := 0;

while not dm.Query_Subject.Eof do

begin

TabSubject.Tabs.Add(dm.Query_Subject.FieldByName('subject').AsString);

id_subject[TabIndex] := dm.Query_Subject.FieldByName('id_subject').AsInteger;

Inc(TabIndex);

dm.Query_Subject.Next;

end;

end;

procedure TForm_Marks_Subject_Theme.CreateTabTheme(id_subject: integer);

var

TabIndex: integer;

begin

id_theme[0] := -1;

dm.Query_Subject.Locate('id_subject', id_subject, []);

dm.Query_Theme_Set;

TabTheme.Tabs.Clear;

dm.Query_Theme.First;

TabIndex := 0;

while not dm.Query_Theme.Eof do

begin

TabTheme.Tabs.Add(dm.Query_Theme.FieldByName('theme').AsString);

id_theme[TabIndex] := dm.Query_Theme.FieldByName('id_theme').AsInteger;

Inc(TabIndex);

dm.Query_Theme.Next;

end;

TabTheme.TabIndex := 0;

dm.Load_Mark_Theme(id_theme[TabTheme.TabIndex]);

end;

procedure TForm_Marks_Subject_Theme.FormClose(Sender: TObject;

var Action: TCloseAction);

begin

main_manager.Show;

end;

procedure TForm_Marks_Subject_Theme.FormShow(Sender: TObject);

begin

CreateTabSubject();

CreateTabTheme(id_subject[TabSubject.TabIndex]);

TabSubject.TabIndex := 0;

dm.Load_Mark_Theme(id_theme[TabTheme.TabIndex]);

TabTheme.TabIndex := 0;

ColumnsSet;

end;

procedure TForm_Marks_Subject_Theme.TabSubjectMouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

begin

CreateTabTheme(id_subject[TabSubject.TabIndex]);

end;

procedure TForm_Marks_Subject_Theme.TabThemeMouseUp(Sender: TObject;

Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

begin

dm.Load_Mark_Theme(id_theme[TabTheme.TabIndex]);

end;

end.

unit unit_marks_subject_theme_group;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, ExtCtrls, sPanel, sTabControl, Grids, DBGrids, StdCtrls, Buttons,

sBitBtn, sMemo, Menus;

type

TForm_Marks_Subject_Theme_group = class(TForm)

TabSubject: TsTabControl;

MainMenu1: TMainMenu;

columns: TMenuItem;

select: TMenuItem;

TabTheme: TsTabControl;

TabGroup: TsTabControl;

Grid_Mark: TDBGrid;

procedure FormShow(Sender: TObject);

procedure TabSubjectMouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure TabThemeMouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure TabGroupMouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure FormClose(Sender: TObject; var Action: TCloseAction);

private

{ Private declarations }

procedure CreateTabSubject();//Создаёт вкладки для каждого предмета

procedure CreateTabTheme(id_subject: integer);//Создаёт вкладки для тем

procedure CreateTabGroup(id_theme: integer);//Создаёт вкладки груп

public

{ Public declarations }

procedure ColumnsSet();

end;

var

Form_Marks_Subject_Theme_group: TForm_Marks_Subject_Theme_group;

id_subject: array[0..500] of Integer;

id_theme: array[0..500] of Integer;

id_group: array[0..500] of Integer;

implementation

uses

unit_dm, unit_main_manager, unit_mark_option;

{$R *.dfm}

procedure TForm_Marks_Subject_Theme_group.ColumnsSet;

begin

Grid_Mark.Columns[0].Visible := Form_mark_option.N_group.Checked;

Grid_Mark.Columns[1].Visible := Form_mark_option.SName.Checked;

Grid_Mark.Columns[2].Visible := Form_mark_option.Name.Checked;

Grid_Mark.Columns[3].Visible := Form_mark_option.Subject.Checked;

Grid_Mark.Columns[4].Visible := Form_mark_option.Theme.Checked;

Grid_Mark.Columns[5].Visible := Form_mark_option.date_begin.Checked;

Grid_Mark.Columns[6].Visible := Form_mark_option.time_begin.Checked;

Grid_Mark.Columns[7].Visible := Form_mark_option.time_end.Checked;

Grid_Mark.Columns[8].Visible := Form_mark_option.mark.Checked;

Grid_Mark.Columns[0].Width := 50;

Grid_Mark.Columns[1].Width := 104;

Grid_Mark.Columns[2].Width := 108;

Grid_Mark.Columns[3].Width := 64;

Grid_Mark.Columns[4].Width := 141;

Grid_Mark.Columns[5].Width := 90;

Grid_Mark.Columns[6].Width := 85;

Grid_Mark.Columns[7].Width := 107;

Grid_Mark.Columns[8].Width := 36;

end;

procedure TForm_Marks_Subject_Theme_group.CreateTabGroup(id_theme: integer);

begin

dm.Load_Group();

TabGroup.Tabs.Clear;

dm.Query_Group.First;

while not dm.Query_Group.Eof do

begin

TabGroup.Tabs.Add(dm.Query_Group.FieldByName('n_group').AsString);

dm.Query_Group.Next;

end;

TabGroup.TabIndex := 0;

dm.Load_Mark_Group(id_theme, TabGroup.Tabs[0]);

end;

procedure TForm_Marks_Subject_Theme_group.CreateTabSubject;

var

TabIndex: integer;

begin

dm.Query_Subject_Set;

TabSubject.Tabs.Clear;

dm.Query_Subject.First;

TabIndex := 0;

while not dm.Query_Subject.Eof do

begin

TabSubject.Tabs.Add(dm.Query_Subject.FieldByName('subject').AsString);

id_subject[TabIndex] := dm.Query_Subject.FieldByName('id_subject').AsInteger;

Inc(TabIndex);

dm.Query_Subject.Next;

end;

TabSubject.TabIndex := 0;

end;

procedure TForm_Marks_Subject_Theme_group.CreateTabTheme(id_subject: integer);

var

TabIndex: integer;

begin

id_theme[0] := -1;

dm.Query_Subject.Locate('id_subject', id_subject, []);

dm.Query_Theme_Set;

TabTheme.Tabs.Clear;

dm.Query_Theme.First;

TabIndex := 0;

while not dm.Query_Theme.Eof do

begin

TabTheme.Tabs.Add(dm.Query_Theme.FieldByName('theme').AsString);

id_theme[TabIndex] := dm.Query_Theme.FieldByName('id_theme').AsInteger;

Inc(TabIndex);

dm.Query_Theme.Next;

end;

TabTheme.TabIndex := 0;

CreateTabGroup(id_theme[TabTheme.TabIndex]);

end;

procedure TForm_Marks_Subject_Theme_group.FormClose(Sender: TObject;

var Action: TCloseAction);

begin

main_manager.Show;

end;

procedure TForm_Marks_Subject_Theme_group.FormShow(Sender: TObject);

begin

CreateTabSubject();

CreateTabTheme(id_subject[TabSubject.TabIndex]);

TabSubject.TabIndex := 0;

dm.Load_Mark_Theme(id_theme[TabTheme.TabIndex]);

TabTheme.TabIndex := 0;

ColumnsSet;

end;

procedure TForm_Marks_Subject_Theme_group.TabGroupMouseUp(Sender: TObject;

Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

begin

dm.Load_Mark_Group(id_theme[TabTheme.TabIndex], TabGroup.Tabs[TabGroup.TabIndex]);

end;

procedure TForm_Marks_Subject_Theme_group.TabSubjectMouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

begin

CreateTabTheme(id_subject[TabSubject.TabIndex]);

end;

procedure TForm_Marks_Subject_Theme_group.TabThemeMouseUp(Sender: TObject;

Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

begin

CreateTabGroup(id_theme[TabTheme.TabIndex]);

end;

end.

unit unit_mark_option;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, ComCtrls, sPageControl, StdCtrls, sCheckBox, Buttons, sBitBtn,

sAlphaListBox;

type

TForm_mark_option = class(TForm)

Page_SELECT: TsPageControl;

TabField: TsTabSheet;

TabOrder: TsTabSheet;

BtnNext: TsBitBtn;

N_group: TsCheckBox;

SName: TsCheckBox;

Name: TsCheckBox;

Subject: TsCheckBox;

Theme: TsCheckBox;

date_begin: TsCheckBox;

time_begin: TsCheckBox;

time_end: TsCheckBox;

mark: TsCheckBox;

mark_5: TsCheckBox;

mark_100: TsCheckBox;

ListOut: TsListBox;

ListIn: TsListBox;

BtnSelect: TsBitBtn;

BtnSelectAll: TsBitBtn;

BtnCancelAll: TsBitBtn;

BtnCancel: TsBitBtn;

BtnCanc: TsBitBtn;

procedure BtnNextClick(Sender: TObject);

procedure BtnSelectClick(Sender: TObject);

procedure BtnCancelClick(Sender: TObject);

procedure BtnSelectAllClick(Sender: TObject);

procedure BtnCancelAllClick(Sender: TObject);

procedure BtnCancClick(Sender: TObject);

procedure FormShow(Sender: TObject);

private

{ Private declarations }

procedure SetOrderStr();//Заполнение параметров сортировки

public

{ Public declarations }

Form_index: integer; //указатель выбранной формы

end;

var

Form_mark_option: TForm_mark_option;

implementation

uses unit_marks, unit_main_manager, unit_dm, unit_marks_subject,

unit_marks_subject_theme_group, unit_marks_subject_theme;

{$R *.dfm}

procedure TForm_mark_option.BtnCancClick(Sender: TObject);

begin

Hide;

Main_Manager.Show;

end;

procedure TForm_mark_option.BtnCancelAllClick(Sender: TObject);

begin

ListOut.Items.Clear;

ListOut.Items.Add('№ группы');

ListOut.Items.Add('Фамилия');

ListOut.Items.Add('Имя');

ListOut.Items.Add('Предмет');

ListOut.Items.Add('Тема');

ListOut.Items.Add('Дата');

ListOut.Items.Add('Время начала');

ListOut.Items.Add('Время окончания');

ListOut.Items.Add('Оценка 2-5');

ListOut.Items.Add('Оценка 2-5');

ListOut.Items.Add('Оценка 0-100');

ListIn.Items.Clear;

end;

procedure TForm_mark_option.BtnCancelClick(Sender: TObject);

begin

if ListIn.ItemIndex = -1 then

exit;

ListOut.Items.Add(ListIn.Items[ListIn.ItemIndex]);

ListIn.Items.Delete(ListIn.ItemIndex);

ListIn.ItemIndex := 0;

end;

procedure TForm_mark_option.BtnSelectAllClick(Sender: TObject);

begin

ListIn.Items.Clear;

ListIn.Items.Add('№ группы');

ListIn.Items.Add('Фамилия');

ListIn.Items.Add('Имя');

ListIn.Items.Add('Предмет');

ListIn.Items.Add('Тема');

ListIn.Items.Add('Дата');

ListIn.Items.Add('Время начала');

ListIn.Items.Add('Время окончания');

ListIn.Items.Add('Оценка 2-5');

ListIn.Items.Add('Оценка 2-5');

ListIn.Items.Add('Оценка 0-100');

ListOut.Items.Clear;

end;

procedure TForm_mark_option.BtnSelectClick(Sender: TObject);

begin

if ListOut.ItemIndex = -1 then

exit;

ListIn.Items.Add(ListOut.Items[listOut.ItemIndex]);

ListOut.Items.Delete(listOut.ItemIndex);

ListOut.ItemIndex := 0;

end;

procedure TForm_mark_option.FormShow(Sender: TObject);

begin

Page_Select.TabIndex := 0;

end;

procedure TForm_mark_option.SetOrderStr;

var

ItemIndex: integer;

begin

if ListIn.Items.Count <> 0 then

begin

ListIn.ItemIndex := 0;

dm.order_str := '';

if ListIn.Items[ListIn.ItemIndex] = '№ группы' then

dm.order_str := dm.order_str + 'n_group';

if ListIn.Items[ListIn.ItemIndex] = 'Фамилия' then

dm.order_str := dm.order_str + 'sname';

if ListIn.Items[ListIn.ItemIndex] = 'Имя' then

dm.order_str := dm.order_str + 'name';

if ListIn.Items[ListIn.ItemIndex] = 'Предмет' then

dm.order_str := dm.order_str + 'subject';

if ListIn.Items[ListIn.ItemIndex] = 'Тема' then

dm.order_str := dm.order_str + 'theme';

if ListIn.Items[ListIn.ItemIndex] = 'Дата' then

dm.order_str := dm.order_str + 'date_begin';

if ListIn.Items[ListIn.ItemIndex] = 'Время начала' then

dm.order_str := dm.order_str + 'time_begin';

if ListIn.Items[ListIn.ItemIndex] = 'Время окончания' then

dm.order_str := dm.order_str + 'time_end';

if ListIn.Items[ListIn.ItemIndex] = 'Оценка 2-5' then

dm.order_str := dm.order_str + 'mark';

if ListIn.Items[ListIn.ItemIndex] = 'Оценка 0-5' then

dm.order_str := dm.order_str + 'mark_5';

if ListIn.Items[ListIn.ItemIndex] = 'Оценка 0-100' then

dm.order_str := dm.order_str + 'mark_100';

ListIn.ItemIndex := ListIn.ItemIndex + 1;

ItemIndex := ListIn.ItemIndex;

while ItemIndex <= ListIn.Items.Count - 1 do

begin

dm.order_str := dm.order_str + ' ,' ;

if ListIn.Items[ListIn.ItemIndex] = '№ группы' then

dm.order_str := dm.order_str + 'n_group';

if ListIn.Items[ListIn.ItemIndex] = 'Фамилия' then

dm.order_str := dm.order_str + 'sname';

if ListIn.Items[ListIn.ItemIndex] = 'Имя' then

dm.order_str := dm.order_str + 'name';

if ListIn.Items[ListIn.ItemIndex] = 'Предмет' then

dm.order_str := dm.order_str + 'subject';

if ListIn.Items[ListIn.ItemIndex] = 'Тема' then

dm.order_str := dm.order_str + 'theme';

if ListIn.Items[ListIn.ItemIndex] = 'Дата' then

dm.order_str := dm.order_str + 'date_begin';

if ListIn.Items[ListIn.ItemIndex] = 'Время начала' then

dm.order_str := dm.order_str + 'time_begin';

if ListIn.Items[ListIn.ItemIndex] = 'Время окончания' then

dm.order_str := dm.order_str + 'time_end';

if ListIn.Items[ListIn.ItemIndex] = 'Оценка 2-5' then

dm.order_str := dm.order_str + 'mark';

if ListIn.Items[ListIn.ItemIndex] = 'Оценка 0-5' then

dm.order_str := dm.order_str + 'mark_5';

if ListIn.Items[ListIn.ItemIndex] = 'Оценка 0-100' then

dm.order_str := dm.order_str + 'mark_100';

Inc ( ItemIndex );

ListIn.ItemIndex := ListIn.ItemIndex + 1;

end;

end;

end;

procedure TForm_mark_option.BtnNextClick(Sender: TObject);

begin

if Page_Select.TabIndex = (Page_Select.PageCount - 1) then

begin

SetOrderStr;

case Form_index of

0: Form_Marks.Show;

1: Form_Marks_Subject.Show;

2: Form_Marks_Subject_Theme.Show;

3: Form_marks_subject_theme_group.Show;

end;

Hide;

end

else

Page_Select.TabIndex := Page_Select.TabIndex + 1;

end;

end.

unit unit_mark_select;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, ComCtrls;

type

Tform_mark_select = class(TForm)

PageSelect: TPageControl;

TabMark: TTabSheet;

TabSheet2: TTabSheet;

TabSheet3: TTabSheet;

TabSheet4: TTabSheet;

RB_2_5: TRadioButton;

RB_0_5: TRadioButton;

RB_0_100: TRadioButton;

private

{ Private declarations }

public

{ Public declarations }

end;

var

form_mark_select: Tform_mark_select;

implementation

{$R *.dfm}

end.

unit unit_dm;

interface

uses

SysUtils, Classes, ZConnection, DB, ZAbstractRODataset, ZAbstractDataset,


Подобные документы

Работы в архивах красиво оформлены согласно требованиям ВУЗов и содержат рисунки, диаграммы, формулы и т.д.
PPT, PPTX и PDF-файлы представлены только в архивах.
Рекомендуем скачать работу.