Разработка и создание автоматизированной информационной системы отдела по делам молодежи и спорта

Ознакомление с методами решения по созданию автоматизированной информационной системы. Рассмотрение описания программы. Изучение текста программы. Исследование руководства программиста и пользователя. Обоснование выбранного метода программирования.

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

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

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

this.lblWelcome.Location = new System.Drawing.Point(-5, 43);

this.lblWelcome.Name = "lblWelcome";

this.lblWelcome.Size = new System.Drawing.Size(1029, 37);

this.lblWelcome.TabIndex = 5;

this.lblWelcome.Text = "Здравствуйте, ";

this.lblWelcome.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

//

// pictureBox3

//

this.pictureBox3.BackColor = System.Drawing.Color.Transparent;

this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));

this.pictureBox3.Location = new System.Drawing.Point(553, 83);

this.pictureBox3.Name = "pictureBox3";

this.pictureBox3.Size = new System.Drawing.Size(471, 531);

this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;

this.pictureBox3.TabIndex = 12;

this.pictureBox3.TabStop = false;

//

// bunifuThinButton21

//

this.bunifuThinButton21.ActiveBorderThickness = 1;

this.bunifuThinButton21.ActiveCornerRadius = 20;

this.bunifuThinButton21.ActiveFillColor = System.Drawing.Color.DarkGreen;

this.bunifuThinButton21.ActiveForecolor = System.Drawing.Color.White;

this.bunifuThinButton21.ActiveLineColor = System.Drawing.Color.DarkGreen;

this.bunifuThinButton21.BackColor = System.Drawing.Color.Transparent;

this.bunifuThinButton21.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("bunifuThinButton21.BackgroundImage")));

this.bunifuThinButton21.ButtonText = "Закрыть программу";

this.bunifuThinButton21.Cursor = System.Windows.Forms.Cursors.Hand;

this.bunifuThinButton21.Font = new System.Drawing.Font("Arial Narrow", 11.26957F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.bunifuThinButton21.ForeColor = System.Drawing.Color.Black;

this.bunifuThinButton21.IdleBorderThickness = 1;

this.bunifuThinButton21.IdleCornerRadius = 20;

this.bunifuThinButton21.IdleFillColor = System.Drawing.Color.Green;

this.bunifuThinButton21.IdleForecolor = System.Drawing.Color.White;

this.bunifuThinButton21.IdleLineColor = System.Drawing.Color.Green;

this.bunifuThinButton21.Location = new System.Drawing.Point(160, 509);

this.bunifuThinButton21.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);

this.bunifuThinButton21.Name = "bunifuThinButton21";

this.bunifuThinButton21.Size = new System.Drawing.Size(361, 47);

this.bunifuThinButton21.TabIndex = 11;

this.bunifuThinButton21.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

this.bunifuThinButton21.Click += new System.EventHandler(this.bunifuThinButton21_Click);

//

// btnExit

//

this.btnExit.ActiveBorderThickness = 1;

this.btnExit.ActiveCornerRadius = 20;

this.btnExit.ActiveFillColor = System.Drawing.Color.DarkGreen;

this.btnExit.ActiveForecolor = System.Drawing.Color.White;

this.btnExit.ActiveLineColor = System.Drawing.Color.DarkGreen;

this.btnExit.BackColor = System.Drawing.Color.Transparent;

this.btnExit.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnExit.BackgroundImage")));

this.btnExit.ButtonText = "Завершить сеанс";

this.btnExit.Cursor = System.Windows.Forms.Cursors.Hand;

this.btnExit.Font = new System.Drawing.Font("Arial Narrow", 11.26957F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.btnExit.ForeColor = System.Drawing.Color.Black;

this.btnExit.IdleBorderThickness = 1;

this.btnExit.IdleCornerRadius = 20;

this.btnExit.IdleFillColor = System.Drawing.Color.Green;

this.btnExit.IdleForecolor = System.Drawing.Color.White;

this.btnExit.IdleLineColor = System.Drawing.Color.Green;

this.btnExit.Location = new System.Drawing.Point(160, 453);

this.btnExit.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);

this.btnExit.Name = "btnExit";

this.btnExit.Size = new System.Drawing.Size(361, 47);

this.btnExit.TabIndex = 9;

this.btnExit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

this.btnExit.Click += new System.EventHandler(this.btnExit_Click_1);

//

// btnMembers

//

this.btnMembers.ActiveBorderThickness = 1;

this.btnMembers.ActiveCornerRadius = 20;

this.btnMembers.ActiveFillColor = System.Drawing.Color.DarkGreen;

this.btnMembers.ActiveForecolor = System.Drawing.Color.White;

this.btnMembers.ActiveLineColor = System.Drawing.Color.DarkGreen;

this.btnMembers.BackColor = System.Drawing.Color.Transparent;

this.btnMembers.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnMembers.BackgroundImage")));

this.btnMembers.ButtonText = "Воспитанники";

this.btnMembers.Cursor = System.Windows.Forms.Cursors.Hand;

this.btnMembers.Font = new System.Drawing.Font("Arial Narrow", 11.26957F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.btnMembers.ForeColor = System.Drawing.Color.Black;

this.btnMembers.IdleBorderThickness = 1;

this.btnMembers.IdleCornerRadius = 20;

this.btnMembers.IdleFillColor = System.Drawing.Color.Green;

this.btnMembers.IdleForecolor = System.Drawing.Color.White;

this.btnMembers.IdleLineColor = System.Drawing.Color.Green;

this.btnMembers.Location = new System.Drawing.Point(160, 285);

this.btnMembers.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);

this.btnMembers.Name = "btnMembers";

this.btnMembers.Size = new System.Drawing.Size(361, 47);

this.btnMembers.TabIndex = 8;

this.btnMembers.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

this.btnMembers.Click += new System.EventHandler(this.btnMembers_Click);

//

// btnTrainers

//

this.btnTrainers.ActiveBorderThickness = 1;

this.btnTrainers.ActiveCornerRadius = 20;

this.btnTrainers.ActiveFillColor = System.Drawing.Color.DarkGreen;

this.btnTrainers.ActiveForecolor = System.Drawing.Color.White;

this.btnTrainers.ActiveLineColor = System.Drawing.Color.DarkGreen;

this.btnTrainers.BackColor = System.Drawing.Color.Transparent;

this.btnTrainers.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnTrainers.BackgroundImage")));

this.btnTrainers.ButtonText = "Тренеры";

this.btnTrainers.Cursor = System.Windows.Forms.Cursors.Hand;

this.btnTrainers.Font = new System.Drawing.Font("Arial Narrow", 11.26957F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.btnTrainers.ForeColor = System.Drawing.Color.Black;

this.btnTrainers.IdleBorderThickness = 1;

this.btnTrainers.IdleCornerRadius = 20;

this.btnTrainers.IdleFillColor = System.Drawing.Color.Green;

this.btnTrainers.IdleForecolor = System.Drawing.Color.White;

this.btnTrainers.IdleLineColor = System.Drawing.Color.Green;

this.btnTrainers.Location = new System.Drawing.Point(160, 229);

this.btnTrainers.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);

this.btnTrainers.Name = "btnTrainers";

this.btnTrainers.Size = new System.Drawing.Size(361, 47);

this.btnTrainers.TabIndex = 7;

this.btnTrainers.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

this.btnTrainers.Click += new System.EventHandler(this.btnTrainers_Click);

//

// btnSchools

//

this.btnSchools.ActiveBorderThickness = 1;

this.btnSchools.ActiveCornerRadius = 20;

this.btnSchools.ActiveFillColor = System.Drawing.Color.DarkGreen;

this.btnSchools.ActiveForecolor = System.Drawing.Color.White;

this.btnSchools.ActiveLineColor = System.Drawing.Color.DarkGreen;

this.btnSchools.BackColor = System.Drawing.Color.Transparent;

this.btnSchools.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSchools.BackgroundImage")));

this.btnSchools.ButtonText = "Спортивные школы";

this.btnSchools.Cursor = System.Windows.Forms.Cursors.Hand;

this.btnSchools.Font = new System.Drawing.Font("Arial Narrow", 11.26957F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.btnSchools.ForeColor = System.Drawing.Color.Black;

this.btnSchools.IdleBorderThickness = 1;

this.btnSchools.IdleCornerRadius = 20;

this.btnSchools.IdleFillColor = System.Drawing.Color.Green;

this.btnSchools.IdleForecolor = System.Drawing.Color.White;

this.btnSchools.IdleLineColor = System.Drawing.Color.Green;

this.btnSchools.Location = new System.Drawing.Point(160, 117);

this.btnSchools.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);

this.btnSchools.Name = "btnSchools";

this.btnSchools.Size = new System.Drawing.Size(361, 47);

this.btnSchools.TabIndex = 6;

this.btnSchools.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

this.btnSchools.Click += new System.EventHandler(this.btnSchools_Click);

//

// pictureBox2

//

this.pictureBox2.BackColor = System.Drawing.Color.Transparent;

this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));

this.pictureBox2.Location = new System.Drawing.Point(175, 165);

this.pictureBox2.Name = "pictureBox2";

this.pictureBox2.Size = new System.Drawing.Size(242, 229);

this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;

this.pictureBox2.TabIndex = 0;

this.pictureBox2.TabStop = false;

//

// btnEnter

//

this.btnEnter.ActiveBorderThickness = 1;

this.btnEnter.ActiveCornerRadius = 20;

this.btnEnter.ActiveFillColor = System.Drawing.Color.DarkGreen;

this.btnEnter.ActiveForecolor = System.Drawing.Color.White;

this.btnEnter.ActiveLineColor = System.Drawing.Color.DarkGreen;

this.btnEnter.BackColor = System.Drawing.Color.Transparent;

this.btnEnter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnEnter.BackgroundImage")));

this.btnEnter.ButtonText = "Войти";

this.btnEnter.Cursor = System.Windows.Forms.Cursors.Hand;

this.btnEnter.Font = new System.Drawing.Font("Arial Narrow", 11.26957F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.btnEnter.ForeColor = System.Drawing.Color.Black;

this.btnEnter.IdleBorderThickness = 1;

this.btnEnter.IdleCornerRadius = 20;

this.btnEnter.IdleFillColor = System.Drawing.Color.Green;

this.btnEnter.IdleForecolor = System.Drawing.Color.White;

this.btnEnter.IdleLineColor = System.Drawing.Color.Green;

this.btnEnter.Location = new System.Drawing.Point(460, 347);

this.btnEnter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);

this.btnEnter.Name = "btnEnter";

this.btnEnter.Size = new System.Drawing.Size(173, 47);

this.btnEnter.TabIndex = 3;

this.btnEnter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

this.btnEnter.Click += new System.EventHandler(this.btnEnter_Click);

//

// label4

//

this.label4.AutoSize = true;

this.label4.BackColor = System.Drawing.Color.Transparent;

this.label4.Font = new System.Drawing.Font("Arial Narrow", 8.139131F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));

this.label4.Location = new System.Drawing.Point(460, 165);

this.label4.Name = "label4";

this.label4.Size = new System.Drawing.Size(48, 17);

this.label4.TabIndex = 4;

this.label4.Text = "ЛОГИН";

//

// tLogin

//

this.tLogin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(185)))), ((int)(((byte)(191)))));

this.tLogin.Cursor = System.Windows.Forms.Cursors.IBeam;

this.tLogin.Font = new System.Drawing.Font("Arial Narrow", 13.14783F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.tLogin.ForeColor = System.Drawing.Color.Black;

this.tLogin.HintForeColor = System.Drawing.Color.Empty;

this.tLogin.HintText = "";

this.tLogin.isPassword = false;

this.tLogin.LineFocusedColor = System.Drawing.Color.ForestGreen;

this.tLogin.LineIdleColor = System.Drawing.Color.Black;

this.tLogin.LineMouseHoverColor = System.Drawing.Color.DarkGreen;

this.tLogin.LineThickness = 3;

this.tLogin.Location = new System.Drawing.Point(460, 192);

this.tLogin.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);

this.tLogin.Name = "tLogin";

this.tLogin.Size = new System.Drawing.Size(355, 34);

this.tLogin.TabIndex = 1;

this.tLogin.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;

//

// label3

//

this.label3.AutoSize = true;

this.label3.BackColor = System.Drawing.Color.Transparent;

this.label3.Font = new System.Drawing.Font("Arial Narrow", 8.139131F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));

this.label3.Location = new System.Drawing.Point(460, 252);

this.label3.Name = "label3";

this.label3.Size = new System.Drawing.Size(57, 17);

this.label3.TabIndex = 2;

this.label3.Text = "ПАРОЛЬ";

//

// tPassword

//

this.tPassword.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(199)))), ((int)(((byte)(203)))));

this.tPassword.Cursor = System.Windows.Forms.Cursors.IBeam;

this.tPassword.Font = new System.Drawing.Font("Arial Narrow", 13.14783F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.tPassword.ForeColor = System.Drawing.Color.Black;

this.tPassword.HintForeColor = System.Drawing.Color.Empty;

this.tPassword.HintText = "";

this.tPassword.isPassword = false;

this.tPassword.LineFocusedColor = System.Drawing.Color.ForestGreen;

this.tPassword.LineIdleColor = System.Drawing.Color.Black;

this.tPassword.LineMouseHoverColor = System.Drawing.Color.DarkGreen;

this.tPassword.LineThickness = 3;

this.tPassword.Location = new System.Drawing.Point(460, 278);

this.tPassword.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);

this.tPassword.Name = "tPassword";

this.tPassword.Size = new System.Drawing.Size(355, 34);

this.tPassword.TabIndex = 2;

this.tPassword.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;

this.tPassword.Enter += new System.EventHandler(this.tPassword_Enter);

//

// btnCloseProgram

//

this.btnCloseProgram.ActiveBorderThickness = 1;

this.btnCloseProgram.ActiveCornerRadius = 20;

this.btnCloseProgram.ActiveFillColor = System.Drawing.Color.DarkRed;

this.btnCloseProgram.ActiveForecolor = System.Drawing.Color.White;

this.btnCloseProgram.ActiveLineColor = System.Drawing.Color.DarkRed;

this.btnCloseProgram.BackColor = System.Drawing.Color.Transparent;

this.btnCloseProgram.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnCloseProgram.BackgroundImage")));

this.btnCloseProgram.ButtonText = "Выйти";

this.btnCloseProgram.Cursor = System.Windows.Forms.Cursors.Hand;

this.btnCloseProgram.Font = new System.Drawing.Font("Arial Narrow", 11.26957F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.btnCloseProgram.ForeColor = System.Drawing.Color.Black;

this.btnCloseProgram.IdleBorderThickness = 1;

this.btnCloseProgram.IdleCornerRadius = 20;

this.btnCloseProgram.IdleFillColor = System.Drawing.Color.Red;

this.btnCloseProgram.IdleForecolor = System.Drawing.Color.White;

this.btnCloseProgram.IdleLineColor = System.Drawing.Color.Red;

this.btnCloseProgram.Location = new System.Drawing.Point(642, 347);

this.btnCloseProgram.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);

this.btnCloseProgram.Name = "btnCloseProgram";

this.btnCloseProgram.Size = new System.Drawing.Size(173, 47);

this.btnCloseProgram.TabIndex = 5;

this.btnCloseProgram.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

this.btnCloseProgram.Click += new System.EventHandler(this.btnExit_Click);

//

{

public partial class FormAddCompetition : Form

{

private Form form;

public FormAddCompetition()

{

InitializeComponent();

KeyPreview = true;

}

public FormAddCompetition(Form form)

{

InitializeComponent();

this.form = form;

KeyPreview = true;

}

private void btnNext_Click(object sender, EventArgs e)

{

if (tbName.TextLength > 0)

{

pnlCompretitions.Visible = true;

}

else

{

MessageBox.Show("Все поля должны быть заполнены", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

}

private IDictionary<int, int> compretitions = new Dictionary<int, int>();

private void btnAddCompretition_Click(object sender, EventArgs e)

{

if (cbTrainers.SelectedIndex >= 0 && cbMembers.SelectedIndex >= 0)

{

if (compretitions.ContainsKey(Convert.ToInt32(cbMembers.SelectedValue)))

{

MessageBox.Show("Указанный воспитанник уже записан в список участников", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Information);

}

else

{

compretitions.Add(Convert.ToInt32(cbMembers.SelectedValue), Convert.ToInt32(cbTrainers.SelectedValue));

Member currentMember = Storage.getInstance().ListMembers.ToList().Find(a => a.PersonPK == Convert.ToInt32(cbMembers.SelectedValue));

Trainer currentTrainer = Storage.getInstance().ListTrainers.ToList().Find(a => a.PersonPK == Convert.ToInt32(cbTrainers.SelectedValue));

dGVMembers.Rows.Add(

currentMember.PersonPK,

currentMember.Fio,

currentMember.PassportSeries,

currentMember.PassportID,

currentTrainer.Fio,

currentTrainer.PersonPK

MessageBox.Show("Необходимо выбрать воспитанника и его тренера.", "Предурждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

}

private void updateDataGrid()

{

dGVMembers.Rows.Clear();

foreach (KeyValuePair<int, int> valuePair in compretitions)

{

Member currentMember = Storage.getInstance().ListMembers.ToList().Find(a => a.PersonPK == valuePair.Key);

Trainer currentTrainer = Storage.getInstance().ListTrainers.ToList().Find(a => a.PersonPK == valuePair.Value);

dGVMembers.Rows.Add(

currentMember.PersonPK,

currentMember.Fio,

currentMember.PassportSeries,

currentMember.PassportID,

currentTrainer.Fio,

currentTrainer.PersonPK

);

}

}

private void FormAddCompetition_Load(object sender, EventArgs e)

{

Storage.getInstance().update();

updateDataGrid();

BindingSource bsTrainer = new BindingSource();

bsTrainer.DataSource = Storage.getInstance().ListTrainers;

cbTrainers.DataSource = bsTrainer.DataSource;

cbTrainers.DisplayMember = "fio";

cbTrainers.ValueMember = "personPK";

BindingSource bsMember = new BindingSource();

bsMember.DataSource = Storage.getInstance().ListMembers;

cbMembers.DataSource = bsMember.DataSource;

cbMembers.DisplayMember = "fio";

cbMembers.ValueMember = "personPK";

BindingSource bsRegion = new BindingSource();

bsRegion.DataSource = AddressInfo.Regions;

cbRegion.DataSource = bsRegion.DataSource;

cbRegion.DisplayMember = "Name";

cbRegion.ValueMember = "Name";

cbRegion_SelectionChangeCommitted(sender, e);

}

private void cbRegion_SelectionChangeCommitted(object sender, EventArgs e)

{

BindingSource bsDistrict = new BindingSource();

bsDistrict.DataSource = AddressInfo.Districts.ToList().FindAll(a => a.Region.Equals(cbRegion.SelectedValue));

cbDistrict.DataSource = bsDistrict.DataSource;

cbDistrict.DisplayMember = "Name";

cbDistrict.ValueMember = "Name";

cbDistrict_SelectionChangeCommitted(sender, e);

}

private void cbDistrict_SelectionChangeCommitted(object sender, EventArgs e)

{

BindingSource bsSettlement = new BindingSource();

bsSettlement.DataSource = AddressInfo.Settlements.ToList().FindAll(a => a.DistrictName.Equals(cbDistrict.SelectedValue));

cbSettlement.DataSource = bsSettlement.DataSource;

cbSettlement.ValueMember = "SettlementPK";

cbSettlement.DisplayMember = "FullName";

cbSettlement_SelectionChangeCommitted(sender, e);

}

private void cbSettlement_SelectionChangeCommitted(object sender, EventArgs e)

{

BindingSource bsStreet = new BindingSource();

bsStreet.DataSource = AddressInfo.Streets.ToList().FindAll(a => (a.SettlementFK == Convert.ToInt32(cbSettlement.SelectedValue)));

cbStreet.DataSource = bsStreet.DataSource;

cbStreet.DisplayMember = "Name";

cbStreet.ValueMember = "StreetPK";

cbStreet_SelectionChangeCommitted(sender, e);

}

private void cbStreet_SelectionChangeCommitted(object sender, EventArgs e)

{

BindingSource bsHouse = new BindingSource();

bsHouse.DataSource = AddressInfo.Houses.ToList().FindAll(a => (a.StreetFK == Convert.ToInt32(cbStreet.SelectedValue)));

cbHome.DataSource = bsHouse.DataSource;

cbHome.ValueMember = "HousePK";

cbHome.DisplayMember = "Number";

cbHome_SelectionChangeCommitted(sender, e);

}

private void cbHome_SelectionChangeCommitted(object sender, EventArgs e)

{

lblIndex.Text = "Индекс: " + AddressInfo.Houses.ToList().Find(a => a.HousePK == Convert.ToInt32(cbHome.SelectedValue)).Index;

}

private void btnInfoAboutTrainer_Click(object sender, EventArgs e)

{

if (cbTrainers.SelectedIndex >= 0)

{

FormInfoAboutTrainer form = new FormInfoAboutTrainer(Storage.getInstance().ListTrainers.ToList().Find(

a => a.PersonPK == Convert.ToInt32(cbTrainers.SelectedValue)));

form.ShowDialog();

FormAddCompetition_Load(sender, e);

}

else

{

MessageBox.Show("Выберите тренера", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

}

private void btnInfoAboutMember_Click(object sender, EventArgs e)

{

if (cbMembers.SelectedIndex >= 0)

{

FormInfoAboutMember form = new FormInfoAboutMember(Storage.getInstance().ListMembers.ToList().Find(

a => a.PersonPK == Convert.ToInt32(cbMembers.SelectedValue)));

form.ShowDialog();

FormAddCompetition_Load(sender, e);

}

else

{

MessageBox.Show("Выберите воспитанника", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);

//cbFirst_SelectionChangeCommitted(sender, e);

}

private void cbFirst_SelectionChangeCommitted(object sender, EventArgs e)

{

IList<Member> members = neededMember.ToList().FindAll(a => a.PersonPK != Convert.ToInt32(cbFirst.SelectedValue));

BindingSource bsSecond = new BindingSource();

bsSecond.DataSource = members;

cbSecond.DataSource = bsSecond.DataSource;

cbSecond.DisplayMember = "fio";

cbSecond.ValueMember = "personPK";

cbSecond_SelectionChangeCommitted(sender, e);

}

private void cbSecond_SelectionChangeCommitted(object sender, EventArgs e)

{

IList<Member> members = neededMember.ToList().FindAll(

a => a.PersonPK != Convert.ToInt32(cbSecond.SelectedValue) && a.PersonPK != Convert.ToInt32(cbFirst.SelectedValue)

);

BindingSource bsThird = new BindingSource();

bsThird.DataSource = members;

cbThird.DataSource = bsThird.DataSource;

cbThird.DisplayMember = "fio";

cbThird.ValueMember = "personPK";

}

private void btnBackWinners_Click(object sender, EventArgs e)

{

pnlWinners.Visible = false;

}

private void btnSave_Click(object sender, EventArgs e)

{

String sql = "INSERT INTO competitions (competition_name, competition_datetime, competition_responsible, competition_house_FK) " +

"VALUES (@name, @dateTime, @resp, @house)";

String bufDate = date.Value.ToString("dd.MM.yyyy");

String bufTime = time.Value.ToString("HH:mm");

OleDbCommand command = new OleDbCommand(sql, ConnectionWithDB.getInstance().Connection);

command.Parameters.AddWithValue("name", tbName.Text);

command.Parameters.AddWithValue("dateTime", Convert.ToDateTime(bufDate + " " + bufTime));

command.Parameters.AddWithValue("resp", Data.CurrentStaff);

command.Parameters.AddWithValue("house", cbHome.SelectedValue);

command.ExecuteNonQuery();

sql = "SELECT MAX(competition_PK) FROM competitions";

command = new OleDbCommand(sql, ConnectionWithDB.getInstance().Connection);

var competition_PK = command.ExecuteScalar();

foreach (KeyValuePair<int, int> valuePair in compretitions)

{

int position = 0;

if (valuePair.Key == Convert.ToInt32(cbFirst.SelectedValue))

{

position = 1;

}

else if (valuePair.Key == Convert.ToInt32(cbSecond.SelectedValue))

{

position = 2;

}

else if (valuePair.Key == Convert.ToInt32(cbThird.SelectedValue))

{

position = 3;

}

sql = "INSERT INTO competitors (competitor_member, competitor_position, competitor_competition, competitor_trainer) " +

"VALUES (@member, @position, @competition, @trainer)";

command = new OleDbCommand(sql, ConnectionWithDB.getInstance().Connection);

command.Parameters.AddWithValue("member", valuePair.Key);

command.Parameters.AddWithValue("position", position);

command.Parameters.AddWithValue("competition", competition_PK);

command.Parameters.AddWithValue("trainer", valuePair.Value);

command.ExecuteNonQuery();

}

Close();

}

private void btnClose_Click(object sender, EventArgs e)

{

form.Close();

}

private void btnInfoFirst_Click(object sender, EventArgs e)

{

if (cbFirst.SelectedIndex >= 0)

{

FormInfoAboutMember form = new FormInfoAboutMember(Storage.getInstance().ListMembers.ToList().Find(

a => a.PersonPK == Convert.ToInt32(cbFirst.SelectedValue)));

form.ShowDialog();

FormAddCompetition_Load(sender, e);

}

else

{

MessageBox.Show("Выберите участника", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

}

private void btnInfoSecond_Click(object sender, EventArgs e)

{

if (cbSecond.SelectedIndex >= 0)

{

FormInfoAboutMember form = new FormInfoAboutMember(Storage.getInstance().ListMembers.ToList().Find(

a => a.PersonPK == Convert.ToInt32(cbSecond.SelectedValue)));

form.ShowDialog();

FormAddCompetition_Load(sender, e);

}

else

{

MessageBox.Show("Выберите участника", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

}

private void btnInfoThird_Click(object sender, EventArgs e)

{

if (cbThird.SelectedIndex >= 0)

{

FormInfoAboutMember form = new FormInfoAboutMember(Storage.getInstance().ListMembers.ToList().Find(

a => a.PersonPK == Convert.ToInt32(cbThird.SelectedValue)));

form.ShowDialog();

FormAddCompetition_Load(sender, e);

}

else

{

MessageBox.Show("Выберите участника", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

}

private void pnlWinners_Paint(object sender, PaintEventArgs e)

{

}

private void btnMinimize_Click(object sender, EventArgs e)

{

WindowState = FormWindowState.Maximized;

}

private bool isDragging = false;

private Point lastCursor;

private Point lastForm;

private void panel1_MouseDown(object sender, MouseEventArgs e)

{

isDragging = true;

lastCursor = Cursor.Position;

lastForm = this.Location;

}

private void panel1_MouseMove(object sender, MouseEventArgs e)

{

if (isDragging)

{

this.Location =

Point.Add(lastForm, new Size(Point.Subtract(Cursor.Position, new Size(lastCursor))));

}

}

private void panel1_MouseUp(object sender, MouseEventArgs e)

{

isDragging = false;

}

private void FormAddCompetition_KeyDown(object sender, KeyEventArgs e)

{

if (e.KeyCode == Keys.F1)

{

btnHelp_Click(sender, e);

}

if (e.KeyCode == Keys.F2)

{

FormInfo form = new FormInfo();

form.ShowDialog();

}

}

private void btnHelp_Click(object sender, EventArgs e)

{

System.Diagnostics.Process.Start("Help.chm");

}

}

}

namespace DepOfYaS

{

public partial class FormAddDocument : Form

{

public FormAddDocument()

{

InitializeComponent();

}

private Document document;

public FormAddDocument(Object document)

{

InitializeComponent();

this.document = (Document)document;

}

private void btnBack_Click(object sender, EventArgs e)

{

Close();

}

private void btnClose_Click(object sender, EventArgs e)

{

Close();

}

private void FormAddDocument_Load(object sender, EventArgs e)

{

Storage.getInstance().update();

BindingSource bsTrainer = new BindingSource();

bsTrainer.DataSource = Storage.getInstance().ListTrainers;

cbTrainer.DataSource = bsTrainer.DataSource;

cbTrainer.DisplayMember = "fio";

cbTrainer.ValueMember = "personPK";

if (document != null)

{

label2.Text = "Редактирование";

tbDocumentID.Text = document.DocumentID;

tbDocumentName.Text = document.DocumentName;

date.Value = document.Date;

cbTrainer.SelectedValue = document.ReceiverID;

btnSave.ButtonText = "Сохранить";

}

}

private void bunifuImageButton1_Click(object sender, EventArgs e)

{

if (cbTrainer.SelectedIndex >= 0)

{

else

{

MessageBox.Show("Документ с таким номером уже существует.", "Предупрждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

}

else

{

IList<Document> neededDocuments = Storage.getInstance().ListDocuments.ToList().FindAll(a => !document.DocumentID.Equals(a.DocumentID));

if (neededDocuments.ToList().Find(a => tbDocumentID.Text.Equals(a.DocumentID)) == null)

{

String sql = "UPDATE documents SET document_ID = @id, document_name = @name, document_sender = @sender, " +

"document_receiver = @receiver, document_date = @date WHERE document_ID = @currentID";

OleDbCommand command = new OleDbCommand(sql, ConnectionWithDB.getInstance().Connection);

command.Parameters.AddWithValue("id", tbDocumentID.Text);

command.Parameters.AddWithValue("name", tbDocumentName.Text);

command.Parameters.AddWithValue("sender", Data.CurrentStaff);

command.Parameters.AddWithValue("receiver", cbTrainer.SelectedValue);

command.Parameters.AddWithValue("date", date.Value.ToShortDateString());

command.Parameters.AddWithValue("currentID", document.DocumentID);

command.ExecuteNonQuery();

Close();

}

else

{

MessageBox.Show("Документ с таким номером уже существует.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

}

}

else

{

MessageBox.Show("Все поля должны быть заполнены", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

}

private void panel1_MouseDown(object sender, MouseEventArgs e)

{

isDragging = true;

lastCursor = Cursor.Position;

lastForm = this.Location;

}

private void panel1_MouseMove(object sender, MouseEventArgs e)

{

if (isDragging)

{

this.Location =

Point.Add(lastForm, new Size(Point.Subtract(Cursor.Position, new Size(lastCursor))));

}

}

private void panel1_MouseUp(object sender, MouseEventArgs e)

{

isDragging = false;

}

private bool isDragging = false;

private Point lastCursor;

private Point lastForm;

}

}

{

BindingSource bsHouse = new BindingSource();

bsHouse.DataSource = AddressInfo.Houses.ToList().FindAll(a => (a.StreetFK == Convert.ToInt32(cbStreet.SelectedValue)));

cbHome.DataSource = bsHouse.DataSource;

cbHome.ValueMember = "HousePK";

cbHome.DisplayMember = "Number";

cbHome_SelectionChangeCommitted(sender, e);

}

private void cbHome_SelectionChangeCommitted(object sender, EventArgs e)

{

lblIndex.Text = "Индекс: " + AddressInfo.Houses.ToList().Find(a => a.HousePK == Convert.ToInt32(cbHome.SelectedValue)).Index;

}

private void btnHelp_Click(object sender, EventArgs e)

{

System.Diagnostics.Process.Start("Help.chm");

}

private void FormAddSchool_KeyDown(object sender, KeyEventArgs e)

{

if (e.KeyCode == Keys.F1)

{

btnHelp_Click(sender, e);

}

}

}

}

private Section currentSection;

internal Section CurrentSection { get => currentSection; set => currentSection = value; }

private void FormAddSection_Load(object sender, EventArgs e)

{

Storage.getInstance().update();

BindingSource bsTrainer = new BindingSource();

bsTrainer.DataSource = Storage.getInstance().ListTrainers;

cbTrainer.DataSource = bsTrainer.DataSource;

cbTrainer.DisplayMember = "fio";

cbTrainer.ValueMember = "personPK";

BindingSource bsSchool = new BindingSource();

bsSchool.DataSource = Storage.getInstance().ListSchools;

cbSchool.DataSource = bsSchool.DataSource;

cbSchool.DisplayMember = "name";

cbSchool.ValueMember = "schoolPK";

if (status.Equals("Добавление"))

{

label2.Text = "Добавление секции";

btnSave.ButtonText = "Добавить";

cbSchool.SelectedValue = schoolPK;

else

{

MessageBox.Show("Выберите тренера", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

}

}

}

private void FormCompetitions_Load(object sender, EventArgs e)

{

dGVCompetitions.DefaultCellStyle.WrapMode = DataGridViewTriState.True;

Storage.getInstance().update();

tbName_TextChanged(sender, e);

KeyPreview = true;

}

private void tbName_TextChanged(object sender, EventArgs e)

{

IList<Competition> competitions = Storage.getInstance().ListCompetitions;

competitions = competitions.ToList().FindAll(a => a.CompetitionName.ToLower().Contains(tbName.Text.ToLower()));

dGVCompetitions.Rows.Clear();

foreach (Competition competition in competitions)

{

dGVCompetitions.Rows.Add(

competition.CompetitonID,

competition.CompetitionName,

competition.DateTimeBegin.ToString("dd.MM.yyyy HH:mm"),

Storage.getInstance().ListStaff.ToList().Find(a => a.PersonPK == competition.Responsible).Fio,

AddressInfo.GetFullAddress(competition.House)

);

}

}

private void btnBack_Click(object sender, EventArgs e)

{

Close();

}

private void btnClose_Click(object sender, EventArgs e)

{

form.Close();

}

private void btnMinimize_Click(object sender, EventArgs e)

{

this.WindowState = FormWindowState.Minimized;

}

private void panel1_MouseDown(object sender, MouseEventArgs e)

{

isDragging = true;

lastCursor = Cursor.Position;

lastForm = this.Location;

}

private void panel1_MouseMove(object sender, MouseEventArgs e)

{

if (isDragging)

{

this.Location =

Point.Add(lastForm, new Size(Point.Subtract(Cursor.Position, new Size(lastCursor))));

}

}

private void panel1_MouseUp(object sender, MouseEventArgs e)

{

isDragging = false;

}

private bool isDragging = false;

private Point lastCursor;

private Point lastForm;

private void btnInfo_Click(object sender, EventArgs e)

{

if (dGVCompetitions.CurrentCell != null)

{

Competition competition = Storage.getInstance().ListCompetitions.ToList().Find(

a => a.CompetitonID == Convert.ToInt32(dGVCompetitions.Rows[dGVCompetitions.CurrentCell.RowIndex].Cells[0].Value)

);

FormInfoAboutCompetition form = new FormInfoAboutCompetition(competition, this.form);

Hide();

form.ShowDialog();

try

{

Visible = true;

FormCompetitions_Load(sender, e);

}

catch (Exception)

{

}

}

else

{

MessageBox.Show("Необходимо выбрать соревнование", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

}

private void btnDelete_Click(object sender, EventArgs e)

{

if (dGVCompetitions.CurrentCell != null)

{

var result = MessageBox.Show("Вы действительно хотите удалить всю информацию связанную с этим соревнованием?", "Подтверждение", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

if (result == DialogResult.Yes)

{

String sql = "DELETE FROM competitions WHERE competition_PK = " + dGVCompetitions.Rows[dGVCompetitions.CurrentCell.RowIndex].Cells[0].Value;

OleDbCommand command = new OleDbCommand(sql, ConnectionWithDB.getInstance().Connection);

command.ExecuteNonQuery();

FormCompetitions_Load(sender, e);

}

}

else

{

MessageBox.Show("Необходимо выбрать соревнование для удаления", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}

FormAddCompetition form = new FormAddCompetition(this.form);

Hide();

form.ShowDialog();

try

{

Visible = true;

FormCompetitions_Load(sender, e);

}

catch (Exception)

private void FormCompetitions_KeyDown(object sender, KeyEventArgs e)

{

if (e.KeyCode == Keys.F1)

{

btnHelp_Click(sender, e);

}

}

}

}

namespace DepOfYaS

{

public partial class FormDocuments : Form

{

public FormDocuments()

{

InitializeComponent();

KeyPreview = true;

}

private Form form;

public FormDocuments(Form form)

{

InitializeComponent();

this.form = form;

KeyPreview = true;

}

private void FormDocuments_Load(object sender, EventArgs e)

{

Storage.getInstance().update();

tbName_TextChanged(sender, e);

}

private void tbName_TextChanged(object sender, EventArgs e)

{

IList<Document> documents = Storage.getInstance().ListDocuments;

documents = documents.ToList().FindAll(a => a.DocumentName.ToLower().Contains(tbName.Text.ToLower()));

dGVDocuments.Rows.Clear();

foreach (Document document in documents)

{

dGVDocuments.Rows.Add(

document.DocumentID,

document.DocumentName,

document.Date.ToString("dd.MM.yyyy"),

Storage.getInstance().ListStaff.ToList().Find(a => a.PersonPK == document.SenderID).Fio,

Storage.getInstance().ListTrainers.ToList().Find(a => a.PersonPK == document.ReceiverID).Fio

);

}

}

private void btnBack_Click(object sender, EventArgs e)

{

Close();

}

private void btnDelete_Click(object sender, EventArgs e)

{

if (dGVDocuments.CurrentCell != null)

{

var result = MessageBox.Show("Вы действительно хотите удалить выбранное положение?", "Подтверждение", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

if (result == DialogResult.Yes)

{

String sql = "DELETE FROM documents WHERE document_ID = @document";

OleDbCommand command = new OleDbCommand(sql, ConnectionWithDB.getInstance().Connection);

command.Parameters.AddWithValue("document", dGVDocuments.Rows[dGVDocuments.CurrentCell.RowIndex].Cells[0].Value);

command.ExecuteNonQuery();

FormDocuments_Load(sender, e);

}

}

}

private void btnAdd_Click(object sender, EventArgs e)

{

FormAddDocument form = new FormAddDocument();

form.ShowDialog();

FormDocuments_Load(sender, e);

}

private void btnClose_Click(object sender, EventArgs e)

{

form.Close();

}

private void panel1_MouseDown(object sender, MouseEventArgs e)

{

isDragging = true;

lastCursor = Cursor.Position;

lastForm = this.Location;

}

private void panel1_MouseMove(object sender, MouseEventArgs e)

{

if (isDragging)

{

this.Location =

Point.Add(lastForm, new Size(Point.Subtract(Cursor.Position, new Size(lastCursor))));

}

}

private void panel1_MouseUp(object sender, MouseEventArgs e)

{

isDragging = false;

}

private bool isDragging = false;

private Point lastCursor;

private Point lastForm;

private void btnEdit_Click(object sender, EventArgs e)

{

if (dGVDocuments.CurrentCell != null)

{

Document currentDocument = Storage.getInstance().ListDocuments.ToList().Find(

a => dGVDocuments.Rows[dGVDocuments.CurrentCell.RowIndex].Cells[0].Value.ToString().Equals(a.DocumentID)

);

FormAddDocument form = new FormAddDocument(currentDocument);

form.ShowDialog();

FormDocuments_Load(sender, e);

}

}

private void btnMinimize_Click(object sender, EventArgs e)

{

this.WindowState = FormWindowState.Minimized;

}

private void btnHelp_Click(object sender, EventArgs e)

{

System.Diagnostics.Process.Start("Help.chm");

}

private void FormDocuments_KeyDown(object sender, KeyEventArgs e)

{

if (e.KeyCode == Keys.F1)

{

btnHelp_Click(sender, e);

}

}

}

}

namespace DepOfYaS

{

public partial class FormInfoAboutCompetition : Form

{

private Competition currentCompetition;

private Form form;

public FormInfoAboutCompetition()

{

InitializeComponent();

KeyPreview = true;

}

public FormInfoAboutCompetition(Object competition, Form form)

{

InitializeComponent();

currentCompetition = (Competition)competition;

this.form = form;

KeyPreview = true;

}

private void btnBack_Click(object sender, EventArgs e)

{

Close();

}

private Member first;

private Member second;

private Member third;

private void FormInfoAboutCompetition_Load(object sender, EventArgs e)

{

lblCompetition.Text = currentCompetition.CompetitionName;

int[] info = new int[2];

first = Storage.getInstance().ListMembers.ToList().Find(

a => a.GetCompetitions().TryGetValue(currentCompetition.CompetitonID, out info) && info[0] == 1

);

if (first == null)

{

lblFirst.Text = "I место никто не занял";

}

else

{

lblFirst.Text = "I место занял(а): " + first.Fio;

}

second = Storage.getInstance().ListMembers.ToList().Find(

a => a.GetCompetitions().TryGetValue(currentCompetition.CompetitonID, out info) && info[0] == 2

);

if (second == null)

{

lblSecond.Text = "II место никто не занял";

}

else

{

lblSecond.Text = "II место занял(а): " + second.Fio;

}

third = Storage.getInstance().ListMembers.ToList().Find(

a => a.GetCompetitions().TryGetValue(currentCompetition.CompetitonID, out info) && info[0] == 3

);

if (third == null)

{

lblThird.Text = "III место никто не занял";

}

else

{

lblThird.Text = "III место занял(а): " + third.Fio;

}

List<Member> neededMembers = Storage.getInstance().ListMembers.ToList().FindAll(

a => a.GetCompetitions().ContainsKey(currentCompetition.CompetitonID)

);

dGVMembers.Rows.Clear();

foreach (Member member in neededMembers)

{

int[] data = new int[2];

member.GetCompetitions().TryGetValue(currentCompetition.CompetitonID, out data);

Trainer trainer = Storage.getInstance().ListTrainers.ToList().Find(a => a.PersonPK == data[1]);

dGVMembers.Rows.Add(

member.PersonPK,

member.Fio,

member.PassportSeries,

member.PassportID,

trainer.Fio,

trainer.PersonPK

);

}

}

private void lblFirst_MouseMove(object sender, MouseEventArgs e)

{

lblFirst.Font = new Font(lblFirst.Font, (FontStyle)(Convert.ToInt16(FontStyle.Bold) + Convert.ToInt16(FontStyle.Italic) + Convert.ToInt16(FontStyle.Underline)));

}

private void lblFirst_MouseLeave(object sender, EventArgs e)

{

lblFirst.Font = new Font(lblFirst.Font, (FontStyle)(Convert.ToInt16(FontStyle.Bold) + Convert.ToInt16(FontStyle.Italic)));

}

private void lblSecond_MouseLeave(object sender, EventArgs e)

{

lblSecond.Font = new Font(lblSecond.Font, (FontStyle)(Convert.ToInt16(FontStyle.Bold) + Convert.ToInt16(FontStyle.Italic)));

}

private void lblSecond_MouseMove(object sender, MouseEventArgs e)

{

lblSecond.Font = new Font(lblFirst.Font, (FontStyle)(Convert.ToInt16(FontStyle.Bold) + Convert.ToInt16(FontStyle.Italic) + Convert.ToInt16(FontStyle.Underline)));

}

private void lblThird_MouseMove(object sender, MouseEventArgs e)

{

lblThird.Font = new Font(lblFirst.Font, (FontStyle)(Convert.ToInt16(FontStyle.Bold) + Convert.ToInt16(FontStyle.Italic) + Convert.ToInt16(FontStyle.Underline)));

}

private void lblThird_MouseLeave(object sender, EventArgs e)

{

lblThird.Font = new Font(lblSecond.Font, (FontStyle)(Convert.ToInt16(FontStyle.Bold) + Convert.ToInt16(FontStyle.Italic)));

}

private void lblFirst_Click(object sender, EventArgs e)

{

if (first != null)

{

FormInfoAboutMember form = new FormInfoAboutMember(first, this.form);

Hide();

form.ShowDialog();

try

{

Visible = true;

FormInfoAboutCompetition_Load(sender, e);

}

catch (Exception)

{

}

private void lblSecond_Click(object sender, EventArgs e)

{

if (second != null)

{

FormInfoAboutMember form = new FormInfoAboutMember(second, this.form);

Hide();

form.ShowDialog();

try

{

Visible = true;

FormInfoAboutCompetition_Load(sender, e);

}

catch (Exception)

{

}

}

}

private void lblThird_Click(object sender, EventArgs e)

{

if (third != null)

{

FormInfoAboutMember form = new FormInfoAboutMember(third, this.form);

Hide();

form.ShowDialog();

try

{

Visible = true;

FormInfoAboutCompetition_Load(sender, e);

}

private void btnInfo_Click(object sender, EventArgs e)

{

if (dGVMembers.CurrentCell != null)

{

String currentMemberPK = dGVMembers.Rows[dGVMembers.CurrentCell.RowIndex].Cells[0].Value.ToString();

Member currentMember = Storage.getInstance().ListMembers.ToList().Find(a => (a.PersonPK == Convert.ToInt32(currentMemberPK)));

FormInfoAboutMember form = new FormInfoAboutMember(currentMember, this.form);

Hide();

form.ShowDialog();

try

{

Visible = true;

FormInfoAboutCompetition_Load(sender, e);

}

catch (Exception)

{

}

}

}

private void btnInfoAboutTrainer_Click(object sender, EventArgs e)

{

if (dGVMembers.CurrentCell != null)

{

String currentTrainerPK = dGVMembers.Rows[dGVMembers.CurrentCell.RowIndex].Cells["TrainerID"].Value.ToString();

Trainer currentTrainer = Storage.getInstance().ListTrainers.ToList().Find(a => (a.PersonPK == Convert.ToInt32(currentTrainerPK)));

FormInfoAboutTrainer form = new FormInfoAboutTrainer(currentTrainer, this.form);

Hide();

form.ShowDialog();

try

{

Visible = true;

FormInfoAboutCompetition_Load(sender, e);

}

catch (Exception)

private void btnClose_Click(object sender, EventArgs e)

{

form.Close();

}

private void btnMinimize_Click(object sender, EventArgs e)

{

WindowState = FormWindowState.Minimized;

}

private bool isDragging = false;

private Point lastCursor;

private Point lastForm;

private void panel1_MouseDown(object sender, MouseEventArgs e)

{

isDragging = true;

lastCursor = Cursor.Position;

lastForm = this.Location;

}

private void panel1_MouseMove(object sender, MouseEventArgs e)

{

if (isDragging)

{

this.Location =

Point.Add(lastForm, new Size(Point.Subtract(Cursor.Position, new Size(lastCursor))));

}

}

private void panel1_MouseUp(object sender, MouseEventArgs e)

{

isDragging = false;

}

private void btnHelp_Click(object sender, EventArgs e)

{

System.Diagnostics.Process.Start("Help.chm");

}

private void FormInfoAboutCompetition_KeyDown(object sender, KeyEventArgs e)

{

if (e.KeyCode == Keys.F1)

{

btnHelp_Click(sender, e);

}

}

}

}

namespace DepOfYaS

{

class LoadingCompetitions

{

public static IList<Competition> LoadCompetitions()

{

String sql = "SELECT * FROM competitions";

OleDbCommand command = new OleDbCommand(sql, ConnectionWithDB.getInstance().Connection);

OleDbDataReader reader = command.ExecuteReader();

IList<Competition> competitions = new List<Competition>();

while (reader.Read())

{

private IList<int> groups = new List<int>();

private IDictionary<int, int[]> competitions = new Dictionary<int, int[]>();

public string Email { get => email; set => email = value; }

public string Phone { get => phone; set => phone = value; }

public int HouseFK { get => houseFK; set => houseFK = value; }

public bool IsFullFamily { get => isFullFamily; set => isFullFamily = value; }

public DateTime Birthday { get => birthday; set => birthday = value; }

public string BirthdayCertificateSeries { get => birthdayCertificateSeries; set => birthdayCertificateSeries = value; }

public string BirthdayCertificateID { get => birthdayCertificateID; set => birthdayCertificateID = value; }

public void addGroup(int group)

{

groups.Add(group);

}

public IList<int> getGroups()

{

return groups;

}

public void addCompetition(int competition, int position, int trainer)

{

competitions.Add(competition, new int[] { position, trainer });

}

public IDictionary<int, int[]> GetCompetitions()

{

return competitions;

}

}

}

namespace DepOfYaS

{

class Trainer: Person

{

private String gender;

private DateTime employmentDate;

private byte pedagogicalExp;

private String maritalStatus;

private String employmentHistoryID;

private String levelOfEducation;

public DateTime EmploymentDate { get => employmentDate; set => employmentDate = value; }

public byte PedagogicalExp { get => pedagogicalExp; set => pedagogicalExp = value; }

public string MaritalStatus { get => maritalStatus; set => maritalStatus = value; }

public string EmploymentHistoryID { get => employmentHistoryID; set => employmentHistoryID = value; }

public string LevelOfEducation { get => levelOfEducation; set => levelOfEducation = value; }

public string Gender { get => gender; set => gender = value; }

}

}

2.5 Руководство программиста

Аннотация. В данном подразделе рассказывается, как правильно установить программный продукт на компьютер для ознакомления и работы с программой. Наглядно описываются все этапы установки.

Установка программного продукта АИС «Отдела молодежи, спорта и туризма» на компьютер под управлением операционной системой Microsoft Windows для проверки и использования програмного обеспечения.

Для начала установки АИС «Отдела молодежи спорта, и туризма» запустите установщик на компакт-диске: Setup АИС Отдел молодежи.exe. Появится окно приветствия (рисунок 2).

Рисунок 2 - Окно приветствия

Выбор папку для установки АИС отдела молодежи спорта, и туризма в которой будет хранится установочник (рисунок 3)

Рисунок 3 - Окно выбора папки установки

Далее идет окно выбора папки установки каталога, в который будет установлена программа (рисунок 4).

Рисунок 4 - Окно выбора каталога установки

Окно завершения установки представлено на (рисунке 5).

Рисунок 5 - Завершение установки

В данном подразделе описывается, как установить установочник АИС отдела молодежи, спорта и туризма на компьютер под управлением операционной системой Microsoft Windows для проверки и использования програмного обеспечения.

2.6 Руководство оператора

Анотация. В данном подразделе рассказывается про автоматизированное информационую систему отдела молодежи спорта, и туризма, описывается внешний вид программы.

Начальная форма программы (форма входа) представлена на рисунке 6.

Рисунок 6 - Начальная форма

Главная форма программы в режиме администратора представлена на рисунке 7.

Рисунок 7 - Главная форма программы.

Открывается окно, в котором хранятся все спортивные школы представлено на рисунке 8

Рисунок 8 - Спортивные школы

Окно с подробной информацией о спортивной школе представлено на рисунке 9.

Рисунок 9 - Подробгая информация о спортивной школе.

Окно выбора Региона представлено на рисунке 10

Рисунок 10 - Региона

Окно пользовательского интерфейса выбора Района представлено на рисунке 11

Рисунок 11 - Района

Окно пользовательского интерфейса выбора улици представлено на рисунке 12

Рисунок 12 - Наименование улиц

Окно выбора тренера представлено на рисунке 13

Рисунок 13 - Выбор тренера

Внешний вид интерфейса программы воспитанники представлен на рисунке 14

Рисунок 14 - Выбор воспитанника

Внешний вид интерфейса программы подробного описания данных воспитанника представлено на рисунке 15

Рисунок 15 - Описание данных воспитанника

Внешний вид интерфейса программы запрашивает разрешение на изменение данных представлено на рисунке 16

Рисунок 16 - Разрешение на изменение данных

Внешний вид интерфейса программы запрашивает разрешение на удаление данных представлено на рисунке 17

Рисунок 17 - Разрешение на удаление данных

Внешний вид интерфейса программы справка выдает информацию о разработчике программы представлено на рисунке 18

Рисунок 18 - Данные о разработчике программы

Основные разделы программы:

1) Спортивные школы - раздел, содержащий информацию о всех спортивных школах города.

2) Соревнования - раздел, содержащий сведения о наступающих соревнованиях.

3) Тренера - раздел, содержащий описание тренеров.

4) Воспитанники - раздел, содержащий описание воспитанников.

5) Положения - раздел, содержащий информацию о мероприятии и условия подачи заявок на соревнование.

6) О программе - раздел содержащий информацию по пользованию программой.

7) Завершение сеанса - смена пользователя.

8) Закрыть программу - завершение работы в ней.

Сотрудникам разрешено:

1) Вносить новые данные.

2) Редактировать данные.

3) Удалять данные.

4) Создавать отчеты и осуществлять поиск информации.

Заключение

В данном курсовом проекте была разработана автоматизированная информационная система «Отдела молодежи, спорта и туризма» соответствующая всем требованиям задания, она протестирована и отлажена. Программа автоматизирует труд сотрудника отдела молодежи и спорта, а также организует надежное хранение и обработку данных которая так необходима даннуму отделу.

В программном проекте используются следующие объекты:

- таблицы для сохранения данных;

- запросы для поиска и извлечения требуемых данных;

- формы для просмотра, добавления и рудактирования данных в таблицах.

Во время выполнения работы был сделан вывод, что внедрение информационных систем может улучшить работоспасобность сотрудников отдела и сократить врямя на поиск необходимой информации. Что позволит улучшеть качество выполненной работы.

Список использованных источников

1. Биллинг, В. А. Основы объектного программирования на C#: учебное пособие для СПО / В.А. Биллинг. - М.: Бином, 2013. - 584 с.

2. Клейнберг, Дж. Алгоритмы. Разработка и применение: учебник / Дж. Клейнберг. - СПб.: Питер, 2016. - 800 с.

3. Окулов, С. И. Основы программирования: учебник для СПО / С. И. Окулов. - М.: Бином, 2015. - 428 с.

4. Рихтер, Дж. CLR via C#. Программирование на платформе Microsoft.NET Framework 4.5 на языке C#: учебник для вузов / Дж. Рихтер - СПб.: Питер, 2000. - 296 с.

5. Челпанов, Г. И. Учебник логики: учебное пособие для СПО / Г. И. Челпанов. - СПб.: Ленанд, 2016. - 264 с.

6. Черпаков, И. В. Основы программирования: учебник и практикум / И. В. Черпаков. - М.: Юрайт, 2016. - 220 с.

7. Шарп, Д. Microsoft Visual C#. Подробное руководство: учебник для вузов / Д. Шарп. - СПб.: Питер, 2017. - 848 с.

Приложения

Приложение А

Схема потоков данных

Приложение Б

Блок схема

Размещено на Allbest.ru

...

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

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