Last fixes

This commit is contained in:
2024-09-20 06:53:52 +03:00
parent 09f10a924c
commit d07c586ade
139 changed files with 12409 additions and 1234 deletions

274
SupportForms/ChildForm.Designer.cs generated Normal file
View File

@@ -0,0 +1,274 @@

namespace Diplom_O.SupportForms
{
partial class ChildForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.fNameBox = new System.Windows.Forms.TextBox();
this.sNameBox = new System.Windows.Forms.TextBox();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.errorLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.workButton = new System.Windows.Forms.Button();
this.canceledButton = new System.Windows.Forms.Button();
this.tNameBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.maleBox = new System.Windows.Forms.ComboBox();
this.birthdayBox = new System.Windows.Forms.DateTimePicker();
this.linkRod1 = new System.Windows.Forms.LinkLabel();
this.linkRod2 = new System.Windows.Forms.LinkLabel();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// fNameBox
//
this.fNameBox.Location = new System.Drawing.Point(104, 12);
this.fNameBox.Name = "fNameBox";
this.fNameBox.Size = new System.Drawing.Size(216, 20);
this.fNameBox.TabIndex = 0;
//
// sNameBox
//
this.sNameBox.Location = new System.Drawing.Point(104, 38);
this.sNameBox.Name = "sNameBox";
this.sNameBox.Size = new System.Drawing.Size(216, 20);
this.sNameBox.TabIndex = 1;
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.errorLabel});
this.statusStrip1.Location = new System.Drawing.Point(0, 225);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(332, 22);
this.statusStrip1.TabIndex = 2;
this.statusStrip1.Text = "statusStrip1";
//
// errorLabel
//
this.errorLabel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.errorLabel.ForeColor = System.Drawing.Color.Red;
this.errorLabel.Name = "errorLabel";
this.errorLabel.Size = new System.Drawing.Size(57, 17);
this.errorLabel.Text = "Ошибка.";
this.errorLabel.Visible = false;
//
// workButton
//
this.workButton.Location = new System.Drawing.Point(245, 194);
this.workButton.Name = "workButton";
this.workButton.Size = new System.Drawing.Size(75, 23);
this.workButton.TabIndex = 9;
this.workButton.Text = "Добавить";
this.workButton.UseVisualStyleBackColor = true;
this.workButton.Click += new System.EventHandler(this.workButton_Click);
//
// canceledButton
//
this.canceledButton.Location = new System.Drawing.Point(164, 194);
this.canceledButton.Name = "canceledButton";
this.canceledButton.Size = new System.Drawing.Size(75, 23);
this.canceledButton.TabIndex = 10;
this.canceledButton.Text = "Отмена";
this.canceledButton.UseVisualStyleBackColor = true;
this.canceledButton.Click += new System.EventHandler(this.canceledButton_Click);
//
// tNameBox
//
this.tNameBox.Location = new System.Drawing.Point(104, 64);
this.tNameBox.Name = "tNameBox";
this.tNameBox.Size = new System.Drawing.Size(216, 20);
this.tNameBox.TabIndex = 2;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(42, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 13);
this.label1.TabIndex = 29;
this.label1.Text = "Фамилия";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(69, 41);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 13);
this.label2.TabIndex = 30;
this.label2.Text = "Имя";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(44, 67);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(54, 13);
this.label3.TabIndex = 31;
this.label3.Text = "Отчество";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(71, 93);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(27, 13);
this.label4.TabIndex = 32;
this.label4.Text = "Пол";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 119);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(86, 13);
this.label5.TabIndex = 33;
this.label5.Text = "Дата рождения";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(34, 145);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(64, 13);
this.label6.TabIndex = 34;
this.label6.Text = "Родитель 1";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(34, 171);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(64, 13);
this.label7.TabIndex = 35;
this.label7.Text = "Родитель 2";
//
// maleBox
//
this.maleBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.maleBox.FormattingEnabled = true;
this.maleBox.Items.AddRange(new object[] {
"Мужчина",
"Женщина"});
this.maleBox.Location = new System.Drawing.Point(104, 90);
this.maleBox.Name = "maleBox";
this.maleBox.Size = new System.Drawing.Size(216, 21);
this.maleBox.TabIndex = 3;
//
// birthdayBox
//
this.birthdayBox.CustomFormat = "yyyy.MM.dd";
this.birthdayBox.Location = new System.Drawing.Point(104, 116);
this.birthdayBox.Name = "birthdayBox";
this.birthdayBox.Size = new System.Drawing.Size(216, 20);
this.birthdayBox.TabIndex = 4;
//
// linkRod1
//
this.linkRod1.AutoSize = true;
this.linkRod1.Location = new System.Drawing.Point(104, 145);
this.linkRod1.Name = "linkRod1";
this.linkRod1.Size = new System.Drawing.Size(110, 13);
this.linkRod1.TabIndex = 40;
this.linkRod1.TabStop = true;
this.linkRod1.Text = "Выбрать человека...";
this.linkRod1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkRod1_LinkClicked);
//
// linkRod2
//
this.linkRod2.AutoSize = true;
this.linkRod2.Location = new System.Drawing.Point(104, 171);
this.linkRod2.Name = "linkRod2";
this.linkRod2.Size = new System.Drawing.Size(110, 13);
this.linkRod2.TabIndex = 41;
this.linkRod2.TabStop = true;
this.linkRod2.Text = "Выбрать человека...";
this.linkRod2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkRod2_LinkClicked);
//
// ChildForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(332, 247);
this.ControlBox = false;
this.Controls.Add(this.linkRod2);
this.Controls.Add(this.linkRod1);
this.Controls.Add(this.birthdayBox);
this.Controls.Add(this.maleBox);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.tNameBox);
this.Controls.Add(this.canceledButton);
this.Controls.Add(this.workButton);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.sNameBox);
this.Controls.Add(this.fNameBox);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ChildForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Ребенок";
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox fNameBox;
private System.Windows.Forms.TextBox sNameBox;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel errorLabel;
private System.Windows.Forms.Button workButton;
private System.Windows.Forms.Button canceledButton;
private System.Windows.Forms.TextBox tNameBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.ComboBox maleBox;
private System.Windows.Forms.DateTimePicker birthdayBox;
private System.Windows.Forms.LinkLabel linkRod1;
private System.Windows.Forms.LinkLabel linkRod2;
}
}

120
SupportForms/ChildForm.cs Normal file
View File

@@ -0,0 +1,120 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Diplom_O.DataBase;
namespace Diplom_O.SupportForms
{
public partial class ChildForm : Form
{
private int? rod1Id = null;
private void linkRod1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
var form = new ChelForm(true);
form.ShowDialog();
if (form.isCanceled)
rod1Id = null;
else
rod1Id = form.formResult.Id;
linkRod1_changeName();
}
private void linkRod1_changeName()
{
linkRod1.Text = rod1Id.HasValue ?
FuncDB.ChelGetFIOShortById(rod1Id.Value) :
"Выбрать человека...";
}
private int? rod2Id = null;
private void linkRod2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
var form = new ChelForm(true);
form.ShowDialog();
if (form.isCanceled)
rod2Id = null;
else
rod2Id = form.formResult.Id;
linkRod2_changeName();
}
private void linkRod2_changeName()
{
linkRod2.Text = rod2Id.HasValue ?
FuncDB.ChelGetFIOShortById(rod2Id.Value) :
"Выбрать человека...";
}
public bool isCanceled = false;
private Child child = null;
public ChildForm(Child child = null)
{
InitializeComponent();
maleBox.SelectedIndex = 0;
birthdayBox.Value = DateTime.Now;
try
{
if (child != null)
{
this.child = child;
workButton.Text = "Изменить";
fNameBox.Text = child.FName;
sNameBox.Text = child.SName;
tNameBox.Text = child.TName;
maleBox.SelectedIndex = child.Male ? 0 : 1;
birthdayBox.Value = child.Birthday;
rod1Id = child.Parent1Id;
rod2Id = child.Parent2Id;
linkRod1_changeName();
linkRod2_changeName();
}
}
catch (Exception e)
{
this.ShowError(errorLabel, e.Message);
workButton.Enabled = false;
}
}
private void workButton_Click(object sender, EventArgs e)
{
try
{
if (maleBox.SelectedIndex == -1)
throw new Exception("Пол не указан.");
var _child = new Child();
_child.FName = fNameBox.Text;
_child.SName = sNameBox.Text;
_child.TName = tNameBox.Text;
_child.Male = maleBox.SelectedIndex == 0;
_child.Birthday = birthdayBox.Value;
_child.Parent1Id = rod1Id;
_child.Parent2Id = rod2Id;
FuncDB.ChildCheckValid(_child);
if (child == null)
FuncDB.ChildAdd(_child);
else
{
_child.Id = child.Id;
FuncDB.ChildChange(_child);
}
this.Close();
}
catch (Exception ex)
{
this.ShowError(errorLabel, ex.Message);
}
}
private void canceledButton_Click(object sender, EventArgs e)
{
isCanceled = true;
this.Close();
}
}
}

239
SupportForms/LearnForm.Designer.cs generated Normal file
View File

@@ -0,0 +1,239 @@

namespace Diplom_O.SupportForms
{
partial class LearnForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.nameBox = new System.Windows.Forms.TextBox();
this.typeBox = new System.Windows.Forms.TextBox();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.errorLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.workButton = new System.Windows.Forms.Button();
this.canceledButton = new System.Windows.Forms.Button();
this.specBox = new System.Windows.Forms.TextBox();
this.label = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.dateBox = new System.Windows.Forms.DateTimePicker();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// nameBox
//
this.nameBox.Location = new System.Drawing.Point(104, 12);
this.nameBox.Name = "nameBox";
this.nameBox.Size = new System.Drawing.Size(216, 20);
this.nameBox.TabIndex = 0;
//
// typeBox
//
this.typeBox.Location = new System.Drawing.Point(104, 38);
this.typeBox.Name = "typeBox";
this.typeBox.Size = new System.Drawing.Size(216, 20);
this.typeBox.TabIndex = 1;
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.errorLabel});
this.statusStrip1.Location = new System.Drawing.Point(0, 202);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(332, 22);
this.statusStrip1.TabIndex = 2;
this.statusStrip1.Text = "statusStrip1";
//
// errorLabel
//
this.errorLabel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.errorLabel.ForeColor = System.Drawing.Color.Red;
this.errorLabel.Name = "errorLabel";
this.errorLabel.Size = new System.Drawing.Size(57, 17);
this.errorLabel.Text = "Ошибка.";
this.errorLabel.Visible = false;
//
// workButton
//
this.workButton.Location = new System.Drawing.Point(245, 168);
this.workButton.Name = "workButton";
this.workButton.Size = new System.Drawing.Size(75, 23);
this.workButton.TabIndex = 9;
this.workButton.Text = "Добавить";
this.workButton.UseVisualStyleBackColor = true;
this.workButton.Click += new System.EventHandler(this.workButton_Click);
//
// canceledButton
//
this.canceledButton.Location = new System.Drawing.Point(164, 168);
this.canceledButton.Name = "canceledButton";
this.canceledButton.Size = new System.Drawing.Size(75, 23);
this.canceledButton.TabIndex = 10;
this.canceledButton.Text = "Отмена";
this.canceledButton.UseVisualStyleBackColor = true;
this.canceledButton.Click += new System.EventHandler(this.canceledButton_Click);
//
// specBox
//
this.specBox.Location = new System.Drawing.Point(104, 64);
this.specBox.Name = "specBox";
this.specBox.Size = new System.Drawing.Size(216, 20);
this.specBox.TabIndex = 2;
//
// label
//
this.label.AutoSize = true;
this.label.Location = new System.Drawing.Point(43, 15);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(55, 13);
this.label.TabIndex = 29;
this.label.Text = "Обр. учр.:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(44, 41);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(54, 13);
this.label2.TabIndex = 30;
this.label2.Text = "Уровень:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(60, 67);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(38, 13);
this.label3.TabIndex = 31;
this.label3.Text = "Спец.:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(6, 145);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(92, 13);
this.label5.TabIndex = 33;
this.label5.Text = "Дата окончания:";
//
// dateBox
//
this.dateBox.CustomFormat = "yyyy.MM.dd";
this.dateBox.Location = new System.Drawing.Point(104, 142);
this.dateBox.Name = "dateBox";
this.dateBox.Size = new System.Drawing.Size(216, 20);
this.dateBox.TabIndex = 4;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(104, 90);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(216, 20);
this.textBox1.TabIndex = 34;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(104, 116);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(216, 20);
this.textBox2.TabIndex = 35;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(64, 93);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(34, 13);
this.label1.TabIndex = 36;
this.label1.Text = "Курс:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(21, 119);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(77, 13);
this.label4.TabIndex = 37;
this.label4.Text = "Проф. переп.:";
//
// LearnForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(332, 224);
this.ControlBox = false;
this.Controls.Add(this.label4);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.dateBox);
this.Controls.Add(this.label5);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label);
this.Controls.Add(this.specBox);
this.Controls.Add(this.canceledButton);
this.Controls.Add(this.workButton);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.typeBox);
this.Controls.Add(this.nameBox);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "LearnForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Образование";
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox nameBox;
private System.Windows.Forms.TextBox typeBox;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel errorLabel;
private System.Windows.Forms.Button workButton;
private System.Windows.Forms.Button canceledButton;
private System.Windows.Forms.TextBox specBox;
private System.Windows.Forms.Label label;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.DateTimePicker dateBox;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label4;
}
}

82
SupportForms/LearnForm.cs Normal file
View File

@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Diplom_O.DataBase;
namespace Diplom_O.SupportForms
{
public partial class LearnForm : Form
{
public bool isCanceled = false;
private int chelId = 0;
private Learn learn = null;
public LearnForm(Learn learn = null, int? chelId = null)
{
InitializeComponent();
if (learn == null && chelId == null)
throw new Exception("Не выбран сотрудник.");
dateBox.Value = DateTime.Now;
try
{
if (learn != null)
{
this.learn = learn;
this.chelId = learn.ChelId;
nameBox.Text = learn.NameSchool;
typeBox.Text = learn.Type;
specBox.Text = learn.Spec;
dateBox.Value = learn.End;
workButton.Text = "Изменить";
}
else
{
this.chelId = chelId.Value;
}
}
catch (Exception e)
{
this.ShowError(errorLabel, e.Message);
workButton.Enabled = false;
}
}
private void workButton_Click(object sender, EventArgs e)
{
try
{
var _learn = new Learn();
_learn.NameSchool = nameBox.Text;
_learn.Type = typeBox.Text;
_learn.Spec = specBox.Text;
_learn.Curs = textBox1.Text;
_learn.ProfPer = textBox2.Text;
_learn.ChelId = chelId;
_learn.End = dateBox.Value;
FuncDB.LearnCheckValid(_learn);
if (learn == null)
FuncDB.LearnAdd(_learn);
else
{
_learn.Id = learn.Id;
FuncDB.LearnChange(_learn);
}
this.Close();
}
catch (Exception ex)
{
this.ShowError(errorLabel, ex.Message);
}
}
private void canceledButton_Click(object sender, EventArgs e)
{
isCanceled = true;
this.Close();
}
}
}

126
SupportForms/LearnForm.resx Normal file
View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

188
SupportForms/LoginForm.Designer.cs generated Normal file
View File

@@ -0,0 +1,188 @@

namespace Diplom_O.SupportForms
{
partial class LoginForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.loginBox = new System.Windows.Forms.TextBox();
this.passBox = new System.Windows.Forms.TextBox();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.errorLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.workButton = new System.Windows.Forms.Button();
this.canceledButton = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.formBox = new System.Windows.Forms.ComboBox();
this.hideBox = new System.Windows.Forms.CheckBox();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// loginBox
//
this.loginBox.Location = new System.Drawing.Point(128, 12);
this.loginBox.Name = "loginBox";
this.loginBox.Size = new System.Drawing.Size(216, 20);
this.loginBox.TabIndex = 0;
//
// passBox
//
this.passBox.Location = new System.Drawing.Point(128, 38);
this.passBox.Name = "passBox";
this.passBox.Size = new System.Drawing.Size(216, 20);
this.passBox.TabIndex = 1;
this.passBox.UseSystemPasswordChar = true;
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.errorLabel});
this.statusStrip1.Location = new System.Drawing.Point(0, 155);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(352, 22);
this.statusStrip1.TabIndex = 2;
this.statusStrip1.Text = "statusStrip1";
//
// errorLabel
//
this.errorLabel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.errorLabel.ForeColor = System.Drawing.Color.Red;
this.errorLabel.Name = "errorLabel";
this.errorLabel.Size = new System.Drawing.Size(57, 17);
this.errorLabel.Text = "Ошибка.";
this.errorLabel.Visible = false;
//
// workButton
//
this.workButton.Location = new System.Drawing.Point(269, 121);
this.workButton.Name = "workButton";
this.workButton.Size = new System.Drawing.Size(75, 23);
this.workButton.TabIndex = 9;
this.workButton.Text = "Добавить";
this.workButton.UseVisualStyleBackColor = true;
this.workButton.Click += new System.EventHandler(this.workButton_Click);
//
// canceledButton
//
this.canceledButton.Location = new System.Drawing.Point(188, 121);
this.canceledButton.Name = "canceledButton";
this.canceledButton.Size = new System.Drawing.Size(75, 23);
this.canceledButton.TabIndex = 10;
this.canceledButton.Text = "Отмена";
this.canceledButton.UseVisualStyleBackColor = true;
this.canceledButton.Click += new System.EventHandler(this.canceledButton_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(81, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 13);
this.label1.TabIndex = 29;
this.label1.Text = "Логин:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(74, 41);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(48, 13);
this.label2.TabIndex = 30;
this.label2.Text = "Пароль:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 67);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(110, 13);
this.label4.TabIndex = 32;
this.label4.Text = "Окно по умолчанию:";
//
// formBox
//
this.formBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.formBox.FormattingEnabled = true;
this.formBox.Location = new System.Drawing.Point(128, 64);
this.formBox.Name = "formBox";
this.formBox.Size = new System.Drawing.Size(216, 21);
this.formBox.TabIndex = 3;
//
// hideBox
//
this.hideBox.AutoSize = true;
this.hideBox.Location = new System.Drawing.Point(128, 92);
this.hideBox.Name = "hideBox";
this.hideBox.Size = new System.Drawing.Size(76, 17);
this.hideBox.TabIndex = 42;
this.hideBox.Text = "Скрывать";
this.hideBox.UseVisualStyleBackColor = true;
//
// LoginForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(352, 177);
this.ControlBox = false;
this.Controls.Add(this.hideBox);
this.Controls.Add(this.formBox);
this.Controls.Add(this.label4);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.canceledButton);
this.Controls.Add(this.workButton);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.passBox);
this.Controls.Add(this.loginBox);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "LoginForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Штатное место";
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox loginBox;
private System.Windows.Forms.TextBox passBox;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel errorLabel;
private System.Windows.Forms.Button workButton;
private System.Windows.Forms.Button canceledButton;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox formBox;
private System.Windows.Forms.CheckBox hideBox;
}
}

79
SupportForms/LoginForm.cs Normal file
View File

@@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Diplom_O.DataBase;
namespace Diplom_O.SupportForms
{
public partial class LoginForm : Form
{
public bool isCanceled = false;
private User user = null;
public LoginForm(User user = null)
{
InitializeComponent();
formBox.Items.Clear();
for (var i = 0; i < 8; i++)
formBox.Items.Add(FormArray.GetNameString(i));
formBox.SelectedIndex = 0;
hideBox.Checked = false;
try
{
if (user != null)
{
this.user = user;
workButton.Text = "Изменить";
loginBox.Text = user.Login;
passBox.Text = user.Pass;
formBox.SelectedIndex = user.Default;
hideBox.Checked = user.Hide;
}
}
catch (Exception e)
{
this.ShowError(errorLabel, e.Message);
workButton.Enabled = false;
}
}
private void workButton_Click(object sender, EventArgs e)
{
try
{
var _user = new User();
_user.Login = loginBox.Text;
_user.Pass = passBox.Text;
_user.Hide = hideBox.Checked;
_user.Default = formBox.SelectedIndex;
FuncDB.UserCheckValid(_user);
if (user == null)
FuncDB.UserAdd(_user);
else
{
_user.Id = user.Id;
if (FuncDB.AccessGetByUserIdFormIdAccessId(_user.Id, _user.Default, 0) == null)
throw new Exception("Необходим сначала доступ к форме.");
FuncDB.UserChange(_user);
}
this.Close();
}
catch (Exception ex)
{
this.ShowError(errorLabel, ex.Message);
}
}
private void canceledButton_Click(object sender, EventArgs e)
{
isCanceled = true;
this.Close();
}
}
}

126
SupportForms/LoginForm.resx Normal file
View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

193
SupportForms/OptForm.Designer.cs generated Normal file
View File

@@ -0,0 +1,193 @@

namespace Diplom_O.SupportForms
{
partial class OptForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.errorLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.workButton = new System.Windows.Forms.Button();
this.canceledButton = new System.Windows.Forms.Button();
this.label = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.dateBox = new System.Windows.Forms.DateTimePicker();
this.dateBox2 = new System.Windows.Forms.DateTimePicker();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.errorLabel});
this.statusStrip1.Location = new System.Drawing.Point(0, 152);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(332, 22);
this.statusStrip1.TabIndex = 2;
this.statusStrip1.Text = "statusStrip1";
//
// errorLabel
//
this.errorLabel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.errorLabel.ForeColor = System.Drawing.Color.Red;
this.errorLabel.Name = "errorLabel";
this.errorLabel.Size = new System.Drawing.Size(57, 17);
this.errorLabel.Text = "Ошибка.";
this.errorLabel.Visible = false;
//
// workButton
//
this.workButton.Location = new System.Drawing.Point(245, 116);
this.workButton.Name = "workButton";
this.workButton.Size = new System.Drawing.Size(75, 23);
this.workButton.TabIndex = 9;
this.workButton.Text = "Добавить";
this.workButton.UseVisualStyleBackColor = true;
this.workButton.Click += new System.EventHandler(this.workButton_Click);
//
// canceledButton
//
this.canceledButton.Location = new System.Drawing.Point(164, 116);
this.canceledButton.Name = "canceledButton";
this.canceledButton.Size = new System.Drawing.Size(75, 23);
this.canceledButton.TabIndex = 10;
this.canceledButton.Text = "Отмена";
this.canceledButton.UseVisualStyleBackColor = true;
this.canceledButton.Click += new System.EventHandler(this.canceledButton_Click);
//
// label
//
this.label.AutoSize = true;
this.label.Location = new System.Drawing.Point(57, 15);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(29, 13);
this.label.TabIndex = 29;
this.label.Text = "Тип:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 41);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(74, 13);
this.label2.TabIndex = 30;
this.label2.Text = "Дата начала:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(17, 93);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(69, 13);
this.label3.TabIndex = 31;
this.label3.Text = "Дата конца:";
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(104, 66);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(121, 17);
this.checkBox1.TabIndex = 38;
this.checkBox1.Text = "По текущее время";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// dateBox
//
this.dateBox.CustomFormat = "yyyy.MM.dd";
this.dateBox.Location = new System.Drawing.Point(104, 38);
this.dateBox.Name = "dateBox";
this.dateBox.Size = new System.Drawing.Size(216, 20);
this.dateBox.TabIndex = 39;
//
// dateBox2
//
this.dateBox2.CustomFormat = "yyyy.MM.dd";
this.dateBox2.Location = new System.Drawing.Point(104, 90);
this.dateBox2.Name = "dateBox2";
this.dateBox2.Size = new System.Drawing.Size(216, 20);
this.dateBox2.TabIndex = 40;
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"Отпуск",
"Больничный",
"Иное"});
this.comboBox1.Location = new System.Drawing.Point(104, 12);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(216, 21);
this.comboBox1.TabIndex = 41;
//
// OptForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(332, 174);
this.ControlBox = false;
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.dateBox2);
this.Controls.Add(this.dateBox);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label);
this.Controls.Add(this.canceledButton);
this.Controls.Add(this.workButton);
this.Controls.Add(this.statusStrip1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "OptForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Образование";
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel errorLabel;
private System.Windows.Forms.Button workButton;
private System.Windows.Forms.Button canceledButton;
private System.Windows.Forms.Label label;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.DateTimePicker dateBox;
private System.Windows.Forms.DateTimePicker dateBox2;
private System.Windows.Forms.ComboBox comboBox1;
}
}

98
SupportForms/OptForm.cs Normal file
View File

@@ -0,0 +1,98 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Diplom_O.DataBase;
namespace Diplom_O.SupportForms
{
public partial class OptForm : Form
{
public bool isCanceled = false;
private int chelId = 0;
private Free free = null;
public OptForm(Free free = null, int? chelId = null)
{
InitializeComponent();
if (free == null && chelId == null)
throw new Exception("Не выбран сотрудник.");
dateBox.Value = DateTime.Now;
dateBox2.Value = DateTime.Now;
comboBox1.SelectedIndex = 0;
try
{
if (free != null)
{
this.free = free;
this.chelId = free.ChelId;
dateBox.Value = free.Start;
comboBox1.Text = free.Type;
if (free.End.HasValue)
{
checkBox1.Checked = false;
dateBox2.Enabled = true;
dateBox2.Value = free.End.Value;
}
else
{
checkBox1.Checked = true;
dateBox2.Enabled = false;
}
workButton.Text = "Изменить";
}
else
{
this.chelId = chelId.Value;
}
}
catch (Exception e)
{
this.ShowError(errorLabel, e.Message);
workButton.Enabled = false;
}
}
private void workButton_Click(object sender, EventArgs e)
{
try
{
var _free = new Free();
_free.ChelId = chelId;
_free.Type = comboBox1.Text;
_free.Start = dateBox.Value;
if (checkBox1.Checked)
_free.End = null;
else
_free.End = dateBox2.Value;
FuncDB.FreeCheckValid(_free);
if (free == null)
FuncDB.FreeAdd(_free);
else
{
_free.Id = free.Id;
FuncDB.FreeChange(_free);
}
this.Close();
}
catch (Exception ex)
{
this.ShowError(errorLabel, ex.Message);
}
}
private void canceledButton_Click(object sender, EventArgs e)
{
isCanceled = true;
this.Close();
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
dateBox2.Enabled = !checkBox1.Checked;
}
}
}

126
SupportForms/OptForm.resx Normal file
View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -1,165 +0,0 @@

namespace Diplom_O.SupportForms
{
partial class SelectChelForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.errorLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.chelGridView = new System.Windows.Forms.DataGridView();
this.dropFindButton = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.findBox = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.canceledButton = new System.Windows.Forms.Button();
this.statusStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.chelGridView)).BeginInit();
this.SuspendLayout();
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.errorLabel});
this.statusStrip1.Location = new System.Drawing.Point(0, 529);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(352, 22);
this.statusStrip1.TabIndex = 2;
this.statusStrip1.Text = "statusStrip1";
//
// errorLabel
//
this.errorLabel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.errorLabel.ForeColor = System.Drawing.Color.Red;
this.errorLabel.Name = "errorLabel";
this.errorLabel.Size = new System.Drawing.Size(57, 17);
this.errorLabel.Text = "Ошибка.";
this.errorLabel.Visible = false;
//
// chelGridView
//
this.chelGridView.AllowUserToAddRows = false;
this.chelGridView.AllowUserToDeleteRows = false;
this.chelGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.chelGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.chelGridView.Location = new System.Drawing.Point(12, 41);
this.chelGridView.MultiSelect = false;
this.chelGridView.Name = "chelGridView";
this.chelGridView.ReadOnly = true;
this.chelGridView.RowHeadersVisible = false;
this.chelGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.chelGridView.Size = new System.Drawing.Size(328, 456);
this.chelGridView.TabIndex = 4;
//
// dropFindButton
//
this.dropFindButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.dropFindButton.Location = new System.Drawing.Point(265, 503);
this.dropFindButton.Name = "dropFindButton";
this.dropFindButton.Size = new System.Drawing.Size(75, 23);
this.dropFindButton.TabIndex = 3;
this.dropFindButton.Text = "Сбросить";
this.dropFindButton.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 508);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(39, 13);
this.label1.TabIndex = 37;
this.label1.Text = "Поиск";
//
// findBox
//
this.findBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.findBox.Location = new System.Drawing.Point(57, 505);
this.findBox.Name = "findBox";
this.findBox.Size = new System.Drawing.Size(202, 20);
this.findBox.TabIndex = 2;
//
// button1
//
this.button1.Location = new System.Drawing.Point(12, 12);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Выбрать";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.workButton_Click);
//
// canceledButton
//
this.canceledButton.Location = new System.Drawing.Point(93, 12);
this.canceledButton.Name = "canceledButton";
this.canceledButton.Size = new System.Drawing.Size(75, 23);
this.canceledButton.TabIndex = 1;
this.canceledButton.Text = "Отмена";
this.canceledButton.UseVisualStyleBackColor = true;
this.canceledButton.Click += new System.EventHandler(this.canceledButton_Click);
//
// SelectChelForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(352, 551);
this.ControlBox = false;
this.Controls.Add(this.canceledButton);
this.Controls.Add(this.button1);
this.Controls.Add(this.chelGridView);
this.Controls.Add(this.dropFindButton);
this.Controls.Add(this.label1);
this.Controls.Add(this.findBox);
this.Controls.Add(this.statusStrip1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "SelectChelForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Человек";
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.chelGridView)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel errorLabel;
private System.Windows.Forms.DataGridView chelGridView;
private System.Windows.Forms.Button dropFindButton;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox findBox;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button canceledButton;
}
}

View File

@@ -1,108 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Diplom_O.DataBase;
namespace Diplom_O.SupportForms
{
public partial class SelectChelForm : Form
{
private Task errDrop;
private void ShowError(string msg = null)
{
errorLabel.Text = string.IsNullOrEmpty(msg) ? "Неизвестная ошибка." : msg;
errorLabel.Visible = true;
errDrop = new Task(() =>
{
var fd = errDrop.Id;
Task.Delay(5000).Wait();
if (errDrop.Id == fd)
if (InvokeRequired) Invoke((Action)(() => { errorLabel.Visible = false; }));
else errorLabel.Visible = false;
});
errDrop.Start();
}
private void resetChelTable()
{
try
{
{
chelGridView.Rows.Clear();
chelGridView.Columns.Clear();
var c = chelGridView.Columns;
c.Add("Id", "№");
c.Add("FName", "Фамилия");
c.Add("SName", "Имя");
c.Add("TName", "Отчество");
c.Add("Birthday", "Дата рождения");
c.Add("Male", "Пол");
c[0].Width = 40;
c[1].Width = 120;
c[1].Width = 120;
c[1].Width = 120;
c[4].Width = 80;
c[5].Width = 80;
}
{
var arr = FuncDB.ListChel(findBox.Text);
var r = chelGridView.Rows;
foreach (var chel in arr)
r.Add(new object[] {
chel.Id,
chel.FName,
chel.SName,
chel.TName,
chel.Birthday.ToString("yyyy.MM.dd"),
chel.Male ? "Муж" : "Жен"
});
}
if (chelGridView.Rows.Count > 0)
chelGridView.Rows[0].Selected = true;
}
catch (Exception e) { ShowError(e.Message); }
}
private Chel selectedChel()
{
try
{
if (chelGridView.SelectedRows.Count != 1) throw new Exception("Человек не выбран.");
var chel = FuncDB.GetChel((int)chelGridView.SelectedRows[0].Cells[0].Value);
return chel;
}
catch (Exception e) { ShowError(e.Message); return null; }
}
public bool isCanceled = false;
private Chel chel = null;
public SelectChelForm(Chel chel = null)
{
InitializeComponent();
resetChelTable();
}
private void workButton_Click(object sender, EventArgs e)
{
try
{
chel = selectedChel();
this.Close();
}
catch (Exception ex) {
chel = null;
ShowError(ex.Message);
}
}
private void canceledButton_Click(object sender, EventArgs e)
{
isCanceled = true;
this.Close();
}
}
}

View File

@@ -51,6 +51,9 @@ namespace Diplom_O.SupportForms
this.birthdayBox = new System.Windows.Forms.DateTimePicker();
this.snilsBox = new System.Windows.Forms.MaskedTextBox();
this.innBox = new System.Windows.Forms.MaskedTextBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.phoneBox = new System.Windows.Forms.MaskedTextBox();
this.label10 = new System.Windows.Forms.Label();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
@@ -72,7 +75,7 @@ namespace Diplom_O.SupportForms
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.errorLabel});
this.statusStrip1.Location = new System.Drawing.Point(0, 428);
this.statusStrip1.Location = new System.Drawing.Point(0, 485);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(332, 22);
this.statusStrip1.TabIndex = 2;
@@ -89,7 +92,7 @@ namespace Diplom_O.SupportForms
//
// workButton
//
this.workButton.Location = new System.Drawing.Point(245, 402);
this.workButton.Location = new System.Drawing.Point(245, 451);
this.workButton.Name = "workButton";
this.workButton.Size = new System.Drawing.Size(75, 23);
this.workButton.TabIndex = 9;
@@ -99,7 +102,7 @@ namespace Diplom_O.SupportForms
//
// canceledButton
//
this.canceledButton.Location = new System.Drawing.Point(164, 402);
this.canceledButton.Location = new System.Drawing.Point(164, 451);
this.canceledButton.Name = "canceledButton";
this.canceledButton.Size = new System.Drawing.Size(75, 23);
this.canceledButton.TabIndex = 10;
@@ -162,7 +165,7 @@ namespace Diplom_O.SupportForms
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(12, 145);
this.label6.Location = new System.Drawing.Point(60, 145);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(38, 13);
this.label6.TabIndex = 34;
@@ -171,7 +174,7 @@ namespace Diplom_O.SupportForms
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(12, 249);
this.label7.Location = new System.Drawing.Point(67, 275);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(31, 13);
this.label7.TabIndex = 35;
@@ -180,7 +183,7 @@ namespace Diplom_O.SupportForms
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(12, 275);
this.label8.Location = new System.Drawing.Point(53, 301);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(45, 13);
this.label8.TabIndex = 36;
@@ -189,7 +192,7 @@ namespace Diplom_O.SupportForms
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(12, 301);
this.label9.Location = new System.Drawing.Point(48, 327);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(50, 13);
this.label9.TabIndex = 37;
@@ -205,7 +208,7 @@ namespace Diplom_O.SupportForms
//
// pasportBox
//
this.pasportBox.Location = new System.Drawing.Point(104, 298);
this.pasportBox.Location = new System.Drawing.Point(104, 324);
this.pasportBox.Name = "pasportBox";
this.pasportBox.Size = new System.Drawing.Size(216, 98);
this.pasportBox.TabIndex = 8;
@@ -233,7 +236,7 @@ namespace Diplom_O.SupportForms
//
// snilsBox
//
this.snilsBox.Location = new System.Drawing.Point(104, 272);
this.snilsBox.Location = new System.Drawing.Point(104, 298);
this.snilsBox.Mask = "000-000-000 00";
this.snilsBox.Name = "snilsBox";
this.snilsBox.Size = new System.Drawing.Size(216, 20);
@@ -241,18 +244,48 @@ namespace Diplom_O.SupportForms
//
// innBox
//
this.innBox.Location = new System.Drawing.Point(104, 246);
this.innBox.Location = new System.Drawing.Point(104, 272);
this.innBox.Mask = "000000000000";
this.innBox.Name = "innBox";
this.innBox.Size = new System.Drawing.Size(216, 20);
this.innBox.TabIndex = 6;
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(104, 428);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(82, 17);
this.checkBox1.TabIndex = 38;
this.checkBox1.Text = "Пенсионер";
this.checkBox1.UseVisualStyleBackColor = true;
//
// phoneBox
//
this.phoneBox.Location = new System.Drawing.Point(104, 246);
this.phoneBox.Mask = "+7(000)000-00-00";
this.phoneBox.Name = "phoneBox";
this.phoneBox.Size = new System.Drawing.Size(216, 20);
this.phoneBox.TabIndex = 39;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(46, 249);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(52, 13);
this.label10.TabIndex = 40;
this.label10.Text = "Телефон";
//
// WorkChelForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(332, 450);
this.ClientSize = new System.Drawing.Size(332, 507);
this.ControlBox = false;
this.Controls.Add(this.label10);
this.Controls.Add(this.phoneBox);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.innBox);
this.Controls.Add(this.snilsBox);
this.Controls.Add(this.birthdayBox);
@@ -310,5 +343,8 @@ namespace Diplom_O.SupportForms
private System.Windows.Forms.DateTimePicker birthdayBox;
private System.Windows.Forms.MaskedTextBox snilsBox;
private System.Windows.Forms.MaskedTextBox innBox;
}
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.MaskedTextBox phoneBox;
private System.Windows.Forms.Label label10;
}
}

View File

@@ -13,22 +13,6 @@ namespace Diplom_O.SupportForms
{
public partial class WorkChelForm : Form
{
private Task errDrop;
private void ShowError(string msg = null)
{
errorLabel.Text = string.IsNullOrEmpty(msg) ? "Неизвестная ошибка." : msg;
errorLabel.Visible = true;
errDrop = new Task(() =>
{
var fd = errDrop.Id;
Task.Delay(5000).Wait();
if (errDrop.Id == fd)
if (InvokeRequired) Invoke((Action)(() => { errorLabel.Visible = false; }));
else errorLabel.Visible = false;
});
errDrop.Start();
}
public bool isCanceled = false;
private Chel chel = null;
public WorkChelForm(Chel chel = null)
@@ -48,14 +32,16 @@ namespace Diplom_O.SupportForms
maleBox.SelectedIndex = chel.Male ? 0 : 1;
birthdayBox.Value = chel.Birthday;
addressBox.Text = chel.Address;
phoneBox.Text = chel.Phone;
innBox.Text = chel.INN;
snilsBox.Text = chel.SNILS;
pasportBox.Text = chel.Pasport;
checkBox1.Checked = chel.Pensia;
}
}
catch (Exception e)
{
ShowError(e.Message);
this.ShowError(errorLabel, e.Message);
workButton.Enabled = false;
}
}
@@ -64,39 +50,34 @@ namespace Diplom_O.SupportForms
{
try
{
if (maleBox.SelectedIndex == -1) throw new Exception("Пол не указан.");
if (maleBox.SelectedIndex == -1)
throw new Exception("Пол не указан.");
var _chel = new Chel();
_chel.FName = fNameBox.Text;
_chel.SName = sNameBox.Text;
_chel.TName = tNameBox.Text;
_chel.Male = maleBox.SelectedIndex == 0;
_chel.Birthday = birthdayBox.Value;
_chel.Address = addressBox.Text;
_chel.Phone = phoneBox.Text;
_chel.INN = innBox.Text;
_chel.SNILS = snilsBox.Text;
_chel.Pasport = pasportBox.Text;
_chel.Pensia = checkBox1.Checked;
FuncDB.ChelCheckValid(_chel);
if (chel == null)
{
var s = new Chel()
{
FName = fNameBox.Text,
SName = sNameBox.Text,
TName = tNameBox.Text,
Male = maleBox.SelectedIndex == 0,
Birthday = birthdayBox.Value,
Address = addressBox.Text,
INN = innBox.Text,
SNILS = snilsBox.Text,
Pasport = pasportBox.Text
};
FuncDB.AddChel(s);
}
FuncDB.ChelAdd(_chel);
else
{
chel.FName = fNameBox.Text;
chel.SName = sNameBox.Text;
chel.TName = tNameBox.Text;
chel.Male = maleBox.SelectedIndex == 0;
chel.Birthday = birthdayBox.Value;
chel.Address = addressBox.Text;
chel.INN = innBox.Text;
chel.SNILS = snilsBox.Text;
chel.Pasport = pasportBox.Text;
FuncDB.ChangeChel(chel);
{
_chel.Id = chel.Id;
FuncDB.ChelChange(_chel);
}
this.Close();
}
catch (Exception ex) { ShowError(ex.Message); }
catch (Exception ex)
{
this.ShowError(errorLabel, ex.Message);
}
}
private void canceledButton_Click(object sender, EventArgs e)
{

View File

@@ -60,7 +60,7 @@ namespace Diplom_O.SupportForms
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.errorLabel,
this.busySizeLabel});
this.statusStrip1.Location = new System.Drawing.Point(0, 90);
this.statusStrip1.Location = new System.Drawing.Point(0, 94);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(262, 22);
this.statusStrip1.TabIndex = 2;
@@ -102,7 +102,7 @@ namespace Diplom_O.SupportForms
//
// workButton
//
this.workButton.Location = new System.Drawing.Point(175, 64);
this.workButton.Location = new System.Drawing.Point(174, 64);
this.workButton.Name = "workButton";
this.workButton.Size = new System.Drawing.Size(75, 23);
this.workButton.TabIndex = 2;
@@ -112,7 +112,7 @@ namespace Diplom_O.SupportForms
//
// canceledButton
//
this.canceledButton.Location = new System.Drawing.Point(94, 64);
this.canceledButton.Location = new System.Drawing.Point(93, 64);
this.canceledButton.Name = "canceledButton";
this.canceledButton.Size = new System.Drawing.Size(75, 23);
this.canceledButton.TabIndex = 3;
@@ -124,7 +124,7 @@ namespace Diplom_O.SupportForms
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(262, 112);
this.ClientSize = new System.Drawing.Size(262, 116);
this.ControlBox = false;
this.Controls.Add(this.canceledButton);
this.Controls.Add(this.workButton);
@@ -156,5 +156,5 @@ namespace Diplom_O.SupportForms
private System.Windows.Forms.Button workButton;
private System.Windows.Forms.Button canceledButton;
private System.Windows.Forms.ToolStripStatusLabel busySizeLabel;
}
}
}

View File

@@ -13,24 +13,9 @@ namespace Diplom_O.SupportForms
{
public partial class WorkShtatForm : Form
{
private Task errDrop;
private void ShowError(string msg = null)
{
errorLabel.Text = string.IsNullOrEmpty(msg) ? "Неизвестная ошибка." : msg;
errorLabel.Visible = true;
errDrop = new Task(() =>
{
var fd = errDrop.Id;
Task.Delay(5000).Wait();
if (errDrop.Id == fd)
if (InvokeRequired) Invoke((Action)(() => { errorLabel.Visible = false; }));
else errorLabel.Visible = false;
});
errDrop.Start();
}
public bool isCanceled = false;
private Shtat shtat = null;
public WorkShtatForm(Shtat shtat = null)
{
InitializeComponent();
@@ -42,12 +27,13 @@ namespace Diplom_O.SupportForms
workButton.Text = "Изменить";
doljBox.Text = shtat.Doljnost;
kolvoBox.Text = shtat.Size.ToString();
busySizeLabel.Text = "Занято: " + FuncDB.BusySizeShtat(shtat.Id);
busySizeLabel.Text = "Занято: " + (shtat.Size - FuncDB.ShtatFreeSpaceById(shtat.Id));
busySizeLabel.Visible = true;
}
}
catch (Exception e)
{
ShowError(e.Message);
this.ShowError(errorLabel, e.Message);
workButton.Enabled = false;
}
}
@@ -56,21 +42,24 @@ namespace Diplom_O.SupportForms
{
try
{
if (!int.TryParse(kolvoBox.Text, out int kolvo)) throw new Exception("Ошибка указания количества.");
if (string.IsNullOrEmpty(doljBox.Text))
throw new Exception("Ошибка указания должности.");
if (!int.TryParse(kolvoBox.Text, out int kolvo))
throw new Exception("Ошибка указания количества.");
if (shtat == null)
{
var s = new Shtat() { Doljnost = doljBox.Text, Size = kolvo };
FuncDB.AddShtat(s);
FuncDB.ShtatAdd(s);
}
else
{
shtat.Doljnost = doljBox.Text;
shtat.Size = kolvo;
FuncDB.ChangeShtat(shtat);
FuncDB.ShtatChange(shtat);
}
this.Close();
}
catch (Exception ex) { ShowError(ex.Message); }
catch (Exception ex) { this.ShowError(errorLabel, ex.Message); }
}
private void canceledButton_Click(object sender, EventArgs e)
{

252
SupportForms/WorkerForm.Designer.cs generated Normal file
View File

@@ -0,0 +1,252 @@

namespace Diplom_O.SupportForms
{
partial class WorkerForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.errorLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.workButton = new System.Windows.Forms.Button();
this.canceledButton = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.linkSelectFIO = new System.Windows.Forms.LinkLabel();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
this.tabNumBox = new System.Windows.Forms.TextBox();
this.linkDolj = new System.Windows.Forms.LinkLabel();
this.label3 = new System.Windows.Forms.Label();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.errorLabel});
this.statusStrip1.Location = new System.Drawing.Point(0, 253);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(332, 22);
this.statusStrip1.TabIndex = 2;
this.statusStrip1.Text = "statusStrip1";
//
// errorLabel
//
this.errorLabel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.errorLabel.ForeColor = System.Drawing.Color.Red;
this.errorLabel.Name = "errorLabel";
this.errorLabel.Size = new System.Drawing.Size(57, 17);
this.errorLabel.Text = "Ошибка.";
this.errorLabel.Visible = false;
//
// workButton
//
this.workButton.Location = new System.Drawing.Point(248, 191);
this.workButton.Name = "workButton";
this.workButton.Size = new System.Drawing.Size(75, 23);
this.workButton.TabIndex = 9;
this.workButton.Text = "Добавить";
this.workButton.UseVisualStyleBackColor = true;
this.workButton.Click += new System.EventHandler(this.workButton_Click);
//
// canceledButton
//
this.canceledButton.Location = new System.Drawing.Point(167, 191);
this.canceledButton.Name = "canceledButton";
this.canceledButton.Size = new System.Drawing.Size(75, 23);
this.canceledButton.TabIndex = 10;
this.canceledButton.Text = "Отмена";
this.canceledButton.UseVisualStyleBackColor = true;
this.canceledButton.Click += new System.EventHandler(this.canceledButton_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(17, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(81, 13);
this.label1.TabIndex = 29;
this.label1.Text = "Фамилия И.О.";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(23, 93);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(78, 13);
this.label2.TabIndex = 30;
this.label2.Text = "Табельный №";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(39, 145);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(62, 13);
this.label4.TabIndex = 32;
this.label4.Text = "Конец раб.";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(33, 116);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(68, 13);
this.label5.TabIndex = 33;
this.label5.Text = "Начало раб.";
//
// linkSelectFIO
//
this.linkSelectFIO.AutoSize = true;
this.linkSelectFIO.Location = new System.Drawing.Point(104, 15);
this.linkSelectFIO.Name = "linkSelectFIO";
this.linkSelectFIO.Size = new System.Drawing.Size(110, 13);
this.linkSelectFIO.TabIndex = 38;
this.linkSelectFIO.TabStop = true;
this.linkSelectFIO.Text = "Выбрать человека...";
this.linkSelectFIO.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkSelectFIO_LinkClicked);
//
// dateTimePicker1
//
this.dateTimePicker1.CustomFormat = "yyyy.MM.dd";
this.dateTimePicker1.Location = new System.Drawing.Point(107, 116);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(216, 20);
this.dateTimePicker1.TabIndex = 40;
//
// dateTimePicker2
//
this.dateTimePicker2.CustomFormat = "yyyy.MM.dd";
this.dateTimePicker2.Location = new System.Drawing.Point(107, 142);
this.dateTimePicker2.Name = "dateTimePicker2";
this.dateTimePicker2.Size = new System.Drawing.Size(216, 20);
this.dateTimePicker2.TabIndex = 41;
//
// tabNumBox
//
this.tabNumBox.Location = new System.Drawing.Point(107, 90);
this.tabNumBox.Name = "tabNumBox";
this.tabNumBox.Size = new System.Drawing.Size(216, 20);
this.tabNumBox.TabIndex = 1;
//
// linkDolj
//
this.linkDolj.AutoSize = true;
this.linkDolj.Location = new System.Drawing.Point(104, 67);
this.linkDolj.Name = "linkDolj";
this.linkDolj.Size = new System.Drawing.Size(118, 13);
this.linkDolj.TabIndex = 43;
this.linkDolj.TabStop = true;
this.linkDolj.Text = "Выбрать должность...";
this.linkDolj.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkDolj_LinkClicked);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(33, 67);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 13);
this.label3.TabIndex = 44;
this.label3.Text = "Должность";
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(189, 168);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(134, 17);
this.checkBox1.TabIndex = 45;
this.checkBox1.Text = "По настоящее время";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// checkBox2
//
this.checkBox2.AutoSize = true;
this.checkBox2.Location = new System.Drawing.Point(194, 40);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(126, 17);
this.checkBox2.TabIndex = 49;
this.checkBox2.Text = "Иное место работы";
this.checkBox2.UseVisualStyleBackColor = true;
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
// WorkerForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(332, 275);
this.ControlBox = false;
this.Controls.Add(this.checkBox2);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.label3);
this.Controls.Add(this.linkDolj);
this.Controls.Add(this.dateTimePicker2);
this.Controls.Add(this.dateTimePicker1);
this.Controls.Add(this.linkSelectFIO);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.canceledButton);
this.Controls.Add(this.workButton);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.tabNumBox);
this.MaximizeBox = false;
this.Name = "WorkerForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Сотрудник";
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel errorLabel;
private System.Windows.Forms.Button workButton;
private System.Windows.Forms.Button canceledButton;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.LinkLabel linkSelectFIO;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.DateTimePicker dateTimePicker2;
private System.Windows.Forms.TextBox tabNumBox;
private System.Windows.Forms.LinkLabel linkDolj;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
}
}

169
SupportForms/WorkerForm.cs Normal file
View File

@@ -0,0 +1,169 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Diplom_O.DataBase;
namespace Diplom_O.SupportForms
{
public partial class WorkerForm : Form
{
private Chel chel = null;
private void ResetLinkFIO()
{
if (chel == null)
{
linkSelectFIO.Text = "Выбрать человека...";
return;
}
var res = chel.FName.ToString() + " " +
chel.SName[0].ToString() + "." +
((!string.IsNullOrEmpty(chel.TName)) ?
chel.TName[0].ToString() + "." : "");
linkSelectFIO.Text = res;
}
private int? shtatId = null;
private void ResetLinkShtat()
{
if (shtatId == null)
{
linkDolj.Text = "Выбрать должность...";
return;
}
var res = FuncDB.ShtatGetById(shtatId.Value)?.Doljnost;
linkDolj.Text = res;
}
public bool isCanceled = false;
private Rabotnik rabotnik = null;
public WorkerForm(Rabotnik rabotnik = null, bool create = false)
{
InitializeComponent();
try
{
ResetLinkFIO();
ResetLinkShtat();
tabNumBox.Text = "";
dateTimePicker1.Value = DateTime.Now;
dateTimePicker2.Value = DateTime.Now;
if (rabotnik == null) return;
chel = FuncDB.ChelGetById(rabotnik.ChelId);
ResetLinkFIO();
linkSelectFIO.Enabled = false;
if (create)
return;
this.rabotnik = rabotnik;
workButton.Text = "Изменить";
chel = FuncDB.ChelGetById(rabotnik.ChelId);
ResetLinkFIO();
if (checkBox2.Checked)
shtatId = null;
else
shtatId = FuncDB.ShtatGetById(rabotnik.ShtatId.Value).Id;
ResetLinkShtat();
tabNumBox.Text = rabotnik.TabNum;
dateTimePicker1.Value = rabotnik.Start;
if (rabotnik.End.HasValue)
{
checkBox1.Checked = false;
dateTimePicker2.Value = rabotnik.End.Value;
}
else
checkBox1.Checked = true;
}
catch (Exception e)
{
this.ShowError(errorLabel, e.Message);
workButton.Enabled = false;
}
}
private void linkSelectFIO_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
var form = new ChelForm(true);
form.ShowDialog();
if (form.isCanceled)
chel = null;
else
chel = form.formResult;
ResetLinkFIO();
}
private void linkDolj_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
var form = new ShtatForm(true);
form.ShowDialog();
if (form.isCanceled)
shtatId = null;
else
shtatId = form.formResult.Id;
ResetLinkShtat();
}
private void workButton_Click(object sender, EventArgs e)
{
try
{
if (chel == null)
throw new Exception("Не выбран человек.");
if (!checkBox2.Checked && !shtatId.HasValue)
throw new Exception("Не выбрана должность.");
DateTime start = dateTimePicker1.Value;
start = new DateTime(start.Year, start.Month, start.Day, 0, 0, 0);
DateTime? end = null;
if (!checkBox1.Checked)
{
end = dateTimePicker2.Value;
end = new DateTime(end.Value.Year, end.Value.Month, end.Value.Day, 23, 59, 59);
}
var _rabotnik = new Rabotnik()
{
ChelId = chel.Id,
ShtatId = checkBox2.Checked ? null : shtatId,
AnotherWork = checkBox2.Checked,
TabNum = checkBox2.Checked ? "" : tabNumBox.Text,
Start = start,
End = end
};
if (rabotnik == null)
FuncDB.RabotnikAdd(_rabotnik);
else
{
_rabotnik.Id = rabotnik.Id;
FuncDB.RabotnikChange(_rabotnik);
}
this.Close();
}
catch (Exception ex)
{
this.ShowError(errorLabel, ex.Message);
}
}
private void canceledButton_Click(object sender, EventArgs e)
{
isCanceled = true;
this.Close();
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
dateTimePicker2.Enabled = !checkBox1.Checked;
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
linkDolj.Enabled = !checkBox2.Checked;
tabNumBox.Enabled = !checkBox2.Checked;
}
}
}

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>