Клиент на C#

This commit is contained in:
Mark Struchkov 2019-01-04 10:21:08 +03:00
parent dcd467c834
commit 3f932fdc00
24 changed files with 23753 additions and 0 deletions

342
.gitignore vendored
View File

@ -1 +1,343 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true
**/wwwroot/lib/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
/.DS_Store

25
Metro.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2000
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metro", "Metro\Metro.csproj", "{A1B6D0A1-FF51-4ECD-9194-3E770476D58F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A1B6D0A1-FF51-4ECD-9194-3E770476D58F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A1B6D0A1-FF51-4ECD-9194-3E770476D58F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A1B6D0A1-FF51-4ECD-9194-3E770476D58F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A1B6D0A1-FF51-4ECD-9194-3E770476D58F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CA7101A6-C633-4534-917D-E5F70D799119}
EndGlobalSection
EndGlobal

12
Metro/App.config Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="Metro.Properties.Settings.MetroConnectionString" connectionString="Data Source=ROOT2895;Initial Catalog=Metro;User ID=sa;Password=1950"
providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>

3477
Metro/Form1.Designer.cs generated Normal file

File diff suppressed because it is too large Load Diff

717
Metro/Form1.cs Normal file
View File

@ -0,0 +1,717 @@
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 System.Data.SqlClient;
namespace Metro
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void raspisanieBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.raspisanieBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.metroDataSet);
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
DialogResult dialog = MessageBox.Show("Вы действительно хотите выйти из программы?","Завершение программы",MessageBoxButtons.YesNo,MessageBoxIcon.Warning);
if (dialog == DialogResult.Yes) { e.Cancel = false; Environment.Exit(0);} else { e.Cancel = true; }
}
SqlConnection conn = new SqlConnection();
private void Form1_Load(object sender, EventArgs e)
{
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.psostav". При необходимости она может быть перемещена или удалена.
this.psostavTableAdapter.Fill(this.metroDataSet.psostav);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.v_remont". При необходимости она может быть перемещена или удалена.
this.v_remontTableAdapter.Fill(this.metroDataSet.v_remont);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.v_remont". При необходимости она может быть перемещена или удалена.
this.v_remontTableAdapter.Fill(this.metroDataSet.v_remont);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.v_remont". При необходимости она может быть перемещена или удалена.
this.v_remontTableAdapter.Fill(this.metroDataSet.v_remont);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.v_raspisanie". При необходимости она может быть перемещена или удалена.
this.v_raspisanieTableAdapter.Fill(this.metroDataSet.v_raspisanie);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.v_raspisanie". При необходимости она может быть перемещена или удалена.
this.v_raspisanieTableAdapter.Fill(this.metroDataSet.v_raspisanie);
conn.ConnectionString = "Data Source=(local);" + "Initial Catalog=Metro;" + "User ID=sa;" + "Password=1950;";
conn.Open();
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.jurnal". При необходимости она может быть перемещена или удалена.
this.jurnalTableAdapter.Fill(this.metroDataSet.jurnal);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.spravka". При необходимости она может быть перемещена или удалена.
this.spravkaTableAdapter.Fill(this.metroDataSet.spravka);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.remont". При необходимости она может быть перемещена или удалена.
this.remontTableAdapter.Fill(this.metroDataSet.remont);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.mashinist". При необходимости она может быть перемещена или удалена.
this.mashinistTableAdapter.Fill(this.metroDataSet.mashinist);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.dispetcher". При необходимости она может быть перемещена или удалена.
this.dispetcherTableAdapter.Fill(this.metroDataSet.dispetcher);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.typsostav". При необходимости она может быть перемещена или удалена.
this.typsostavTableAdapter.Fill(this.metroDataSet.typsostav);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.raspisanie". При необходимости она может быть перемещена или удалена.
this.raspisanieTableAdapter.Fill(this.metroDataSet.raspisanie);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.raspisanie". При необходимости она может быть перемещена или удалена.
this.raspisanieTableAdapter.Fill(this.metroDataSet.raspisanie);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.vetka". При необходимости она может быть перемещена или удалена.
this.vetkaTableAdapter.Fill(this.metroDataSet.vetka);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.stanciya". При необходимости она может быть перемещена или удалена.
this.stanciyaTableAdapter.Fill(this.metroDataSet.stanciya);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.psostav". При необходимости она может быть перемещена или удалена.
this.psostavTableAdapter.Fill(this.metroDataSet.psostav);
// TODO: данная строка кода позволяет загрузить данные в таблицу "metroDataSet.raspisanie". При необходимости она может быть перемещена или удалена.
this.raspisanieTableAdapter.Fill(this.metroDataSet.raspisanie);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
}
private void Form1_Shown(object sender, EventArgs e)
{
kod_vpered_stanciya.Enabled = false;
kod_nazad_stanciya.Enabled = false;
if (get_doljnost.Value == "Диспетчер")
{
tabPage10.Parent = null;
this.dispetcherDataGridView.Columns[4].Visible = false;
this.raspisanieDataGridView.Columns[7].Visible = false;
this.dispetcherDataGridView.Columns[0].Visible = false;
this.vetkaDataGridView.Size = new Size(786, 420);
groupBox1.Visible = false;
button_del_vetka.Visible = false;
label18.Visible = false;
del_name_vetka.Visible = false;
serialpas.Visible = false;
tel.Visible = false;
pas.Visible = false;
checkBox_dispetcher.Visible = false;
doljnost.Visible = false;
fio.Visible = false;
label9.Visible = false;
label11.Visible = false;
label22.Visible = false;
label12.Visible = false;
label10.Visible = false;
add_dispetcher.Visible = false;
edit_dispetcher.Visible = false;
del_dispetcher.Visible = false;
groupBox10.Visible = false;
dispetcherDataGridView.Size = new Size(790, 417);
groupBox12.Visible = false;
add_typik.Visible = false;
label20.Visible = false;
button_add_typik.Visible = false;
button_del_typik.Visible = false;
groupBox_stanciya.Visible = false;
kod_stanciya.Visible = false;
name_stanciya.Visible = false;
paspotok_stanciya.Visible = false;
stat_stanciya.Visible = false;
rast_nazad_stanciya.Visible = false;
start_time_stanciya.Visible = false;
finish_time_stanciya.Visible = false;
button_add_stanciya.Visible = false;
button_edit_stanciya.Visible = false;
button_del_stanciya.Visible = false;
checkBox2.Visible = false;
label23.Visible = false;
label24.Visible = false;
label25.Visible = false;
label26.Visible = false;
label27.Visible = false;
label28.Visible = false;
label29.Visible = false;
label30.Visible = false;
label31.Visible = false;
label32.Visible = false;
stanciyaDataGridView.Size = new Size(783, 420);
groupBox2.Visible = false;
label33.Visible = false;
label34.Visible = false;
label35.Visible = false;
label36.Visible = false;
label38.Visible = false;
name_vetka.Visible = false;
depo_status_stanciya.Visible = false;
start_status_vetka.Visible = false;
start_stanciya_vetka.Visible = false;
finish_status_vetka.Visible = false;
button_add_vetka.Visible = false;
label13.Visible = false;
name_vetka2.Visible = false;
}
}
public void OnSqlConnectionInfoMessage(object sender, SqlInfoMessageEventArgs eventArgs)
{
string c = eventArgs.Message.ToString();
MessageBox.Show(c, "Информация для пользователя", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
public void ClearBox(CheckBox CB, TextBox TB, string c, BindingSource BS)
{
if (CB.Checked == true)
{
TB.DataBindings.Clear();
TB.Text = "";
}
else
TB.DataBindings.Add(new System.Windows.Forms.Binding("Text", BS, c, true, DataSourceUpdateMode.OnPropertyChanged));
}
private void button1_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("prov_raspisanie", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@vetka", vetka.Text);
insto.Parameters.AddWithValue("@n_time", start_time.Text);
insto.Parameters.AddWithValue("@k_time", finish_time.Text);
insto.Parameters.AddWithValue("@kol", kol.Text);
insto.Parameters.AddWithValue("@typ", typ.Text);
insto.Parameters.AddWithValue("@serialpas", get_login.Value);
insto.ExecuteNonQuery();
raspisanieTableAdapter.Fill(metroDataSet.raspisanie);
v_raspisanieTableAdapter.Fill(metroDataSet.v_raspisanie);
psostavTableAdapter.Fill(metroDataSet.psostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void fillToolStripButton_Click(object sender, EventArgs e)
{
try
{
this.psostavTableAdapter.Fill(this.metroDataSet.psostav);
}
catch (System.Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
}
private void del_rasp_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("del_rasp", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@vetka", vetka.Text);
insto.ExecuteNonQuery();
raspisanieTableAdapter.Fill(metroDataSet.raspisanie);
v_raspisanieTableAdapter.Fill(metroDataSet.v_raspisanie);
psostavTableAdapter.Fill(metroDataSet.psostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void button1_Click_1(object sender, EventArgs e)
{
var insto = new SqlCommand("del_sostav_raspisanie", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@start_time", n_time.Text);
insto.Parameters.AddWithValue("@ser", serial.Text);
insto.ExecuteNonQuery();
raspisanieTableAdapter.Fill(metroDataSet.raspisanie);
v_raspisanieTableAdapter.Fill(metroDataSet.v_raspisanie);
psostavTableAdapter.Fill(metroDataSet.psostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void add_raspis_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("add_sostav_raspis", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@vetka", add_vetka.Text);
insto.Parameters.AddWithValue("@time", n_time.Text);
insto.Parameters.AddWithValue("@ser", serial.Text);
insto.Parameters.AddWithValue("@serialpas", get_login.Value);
insto.ExecuteNonQuery();
raspisanieTableAdapter.Fill(metroDataSet.raspisanie);
v_raspisanieTableAdapter.Fill(metroDataSet.v_raspisanie);
psostavTableAdapter.Fill(metroDataSet.psostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void add_dispetcher_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("add_dispetcher", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@serialpas", serialpas.Text);
insto.Parameters.AddWithValue("@fio", fio.Text);
insto.Parameters.AddWithValue("@tel", tel.Text);
insto.Parameters.AddWithValue("@doljnost", doljnost.Text);
insto.Parameters.AddWithValue("@pas", pas.Text.ToString());
insto.ExecuteNonQuery();
dispetcherTableAdapter.Fill(metroDataSet.dispetcher);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void del_dispetcher_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("del_dispetcher", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@serialpas", serialpas.Text);
insto.ExecuteNonQuery();
dispetcherTableAdapter.Fill(metroDataSet.dispetcher);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void edit_dispetcher_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("edit_dispetcher", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@serialpas", serialpas.Text);
insto.Parameters.AddWithValue("@fio", fio.Text);
insto.Parameters.AddWithValue("@tel", tel.Text);
insto.Parameters.AddWithValue("@doljnost", doljnost.Text);
insto.Parameters.AddWithValue("@pas", pas.Text);
insto.ExecuteNonQuery();
dispetcherTableAdapter.Fill(metroDataSet.dispetcher);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void add_mashinist_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("add_mashinist", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@serialpas", serialpas_mashinist.Text);
insto.Parameters.AddWithValue("@serial", sostav_mashinist.Text);
insto.Parameters.AddWithValue("@fio", fio_mashinist.Text);
insto.Parameters.AddWithValue("@tel", tel_mashinist.Text);
insto.Parameters.AddWithValue("@staj", staj_mashinist.Text);
insto.Parameters.AddWithValue("@kvalif", kvalif_mashinist.Text);
insto.ExecuteNonQuery();
mashinistTableAdapter.Fill(metroDataSet.mashinist);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
{
add_mashinist.Enabled = true;
del_mashinist.Enabled = false;
edit_mashinist.Enabled = false;
}
else
{
add_mashinist.Enabled = false;
del_mashinist.Enabled = true;
edit_mashinist.Enabled = true;
}
ClearBox(checkBox1, serialpas_mashinist, "serialpas", mashinistBindingSource);
ClearBox(checkBox1, kvalif_mashinist, "kvalif", mashinistBindingSource);
ClearBox(checkBox1, tel_mashinist, "tel", mashinistBindingSource);
ClearBox(checkBox1, fio_mashinist, "fio", mashinistBindingSource);
ClearBox(checkBox1, staj_mashinist, "staj", mashinistBindingSource);
}
private void checkBox_dispetcher_CheckedChanged(object sender, EventArgs e)
{
if (checkBox_dispetcher.Checked == true)
{
add_dispetcher.Enabled = true;
del_dispetcher.Enabled = false;
edit_dispetcher.Enabled = false;
}
else
{
add_dispetcher.Enabled = false;
del_dispetcher.Enabled = true;
edit_dispetcher.Enabled = true;
}
ClearBox(checkBox_dispetcher, serialpas, "serialpas", dispetcherBindingSource);
ClearBox(checkBox_dispetcher, tel, "tel", dispetcherBindingSource);
ClearBox(checkBox_dispetcher, doljnost, "doljnost", dispetcherBindingSource);
ClearBox(checkBox_dispetcher, fio, "fio", dispetcherBindingSource);
}
private void checkBox_psostav_CheckedChanged(object sender, EventArgs e)
{
if (checkBox_psostav.Checked == true)
{
add_psostav.Enabled = true;
del_psostav.Enabled = false;
edit_psostav.Enabled = false;
}
else
{
add_psostav.Enabled = false;
del_psostav.Enabled = true;
edit_psostav.Enabled = true;
}
ClearBox(checkBox_psostav, iznos_tk_psostav, "iznos_tk", psostavBindingSource);
ClearBox(checkBox_psostav, probeg_psostav, "probeg", psostavBindingSource);
ClearBox(checkBox_psostav, iznos_motor_psostav, "iznos_motor", psostavBindingSource);
ClearBox(checkBox_psostav, serial_psostav, "serial", psostavBindingSource);
}
private void add_psostav_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("add_sostav", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@serial", serial_psostav.Text);
insto.Parameters.AddWithValue("@iznos_tk", iznos_tk_psostav.Text);
insto.Parameters.AddWithValue("@vetka", stat_sostav.Text);
insto.Parameters.AddWithValue("@typkod", typkod_psostav.Text);
insto.Parameters.AddWithValue("@probeg", probeg_psostav.Text);
insto.Parameters.AddWithValue("@iznos_motor", iznos_motor_psostav.Text);
insto.ExecuteNonQuery();
psostavTableAdapter.Fill(metroDataSet.psostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void del_psostav_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("del_sostav", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@serial", serial_psostav.Text);
insto.ExecuteNonQuery();
psostavTableAdapter.Fill(metroDataSet.psostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void edit_psostav_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("edit_psostav", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@serial", serial_psostav.Text);
insto.Parameters.AddWithValue("@iznos_tk", iznos_tk_psostav.Text);
insto.Parameters.AddWithValue("@vetka", stat_sostav.Text);
insto.Parameters.AddWithValue("@typkod", typkod_psostav.Text);
insto.Parameters.AddWithValue("@probeg", probeg_psostav.Text);
insto.Parameters.AddWithValue("@iznos_motor", iznos_motor_psostav.Text);
insto.ExecuteNonQuery();
psostavTableAdapter.Fill(metroDataSet.psostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void alignment_interval_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("alignment_interval", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
raspisanieTableAdapter.Fill(metroDataSet.raspisanie);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void button_add_vetka_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("add_vetka", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@name", name_vetka.Text);
insto.Parameters.AddWithValue("@depo_status", depo_status_stanciya.Text);
insto.Parameters.AddWithValue("@start_stanciya", start_stanciya_vetka.Text);
insto.Parameters.AddWithValue("@start_status", start_status_vetka.Text);
insto.Parameters.AddWithValue("@finish_status", finish_status_vetka.Text);
insto.ExecuteNonQuery();
vetkaTableAdapter.Fill(metroDataSet.vetka);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void button_del_vetka_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("del_vetka", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@name", del_name_vetka.Text);
insto.Parameters.AddWithValue("@name2", name_vetka2.Text);
insto.ExecuteNonQuery();
vetkaTableAdapter.Fill(metroDataSet.vetka);
raspisanieTableAdapter.Fill(metroDataSet.raspisanie);
v_raspisanieTableAdapter.Fill(metroDataSet.v_raspisanie);
psostavTableAdapter.Fill(metroDataSet.psostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void del_remont_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("del_remont", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@serial", serial_remont.Text);
insto.Parameters.AddWithValue("@vetka", namevetka_remont.Text);
insto.Parameters.AddWithValue("@serialpass", get_login.Value);
insto.ExecuteNonQuery();
v_remontTableAdapter.Fill(metroDataSet.v_remont);
remontTableAdapter.Fill(metroDataSet.remont);
psostavTableAdapter.Fill(metroDataSet.psostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void button_add_remont_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("add_remont", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@typik", typik_psostav.Text);
insto.Parameters.AddWithValue("@zametka", zametka_psostav.Text);
insto.Parameters.AddWithValue("@serial", serial_add_remont.Text);
insto.Parameters.AddWithValue("@date", DateTime.Now);
insto.Parameters.AddWithValue("@serialpass", get_login.Value);
insto.ExecuteNonQuery();
psostavTableAdapter.Fill(metroDataSet.psostav);
remontTableAdapter.Fill(metroDataSet.remont);
v_remontTableAdapter.Fill(metroDataSet.v_remont);
jurnalTableAdapter.Fill(metroDataSet.jurnal);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void checkBox_typsostav_CheckedChanged(object sender, EventArgs e)
{
if (checkBox_typsostav.Checked == true)
{
button_add_typsostav.Enabled = true;
button_del_typsostav.Enabled = false;
button_edit_typsostav.Enabled = false;
}
else
{
button_add_typsostav.Enabled = false;
button_del_typsostav.Enabled = true;
button_edit_typsostav.Enabled = true;
}
ClearBox(checkBox_typsostav, typkod_typsostav, "typkod", typsostavBindingSource);
ClearBox(checkBox_typsostav, name_typsostav, "name", typsostavBindingSource);
ClearBox(checkBox_typsostav, kolmest_typsostav, "kolmest", typsostavBindingSource);
ClearBox(checkBox_typsostav, dlina_typsostav, "dlina", typsostavBindingSource);
ClearBox(checkBox_typsostav, shirina_typsostav, "shirina", typsostavBindingSource);
ClearBox(checkBox_typsostav, visota_typsostav, "visota", typsostavBindingSource);
ClearBox(checkBox_typsostav, naznachenie_typsostav, "naznachenie", typsostavBindingSource);
ClearBox(checkBox_typsostav, koleya_typsostav, "koleya", typsostavBindingSource);
ClearBox(checkBox_typsostav, speed_typsostav, "speed", typsostavBindingSource);
}
private void button_add_typsostav_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("add_typsostav", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@typkod", typkod_typsostav.Text);
insto.Parameters.AddWithValue("@name", name_typsostav.Text);
insto.Parameters.AddWithValue("@kolmest", kolmest_typsostav.Text);
insto.Parameters.AddWithValue("@dlina", dlina_typsostav.Text);
insto.Parameters.AddWithValue("@shirina", shirina_typsostav.Text);
insto.Parameters.AddWithValue("@visota", visota_typsostav.Text);
insto.Parameters.AddWithValue("@naznachenie", naznachenie_typsostav.Text);
insto.Parameters.AddWithValue("@koleya", koleya_typsostav.Text);
insto.Parameters.AddWithValue("@speed", speed_typsostav.Text);
insto.ExecuteNonQuery();
typsostavTableAdapter.Fill(metroDataSet.typsostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void button_del_typsostav_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("del_typsostav", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@typkod", typkod_typsostav.Text);
insto.ExecuteNonQuery();
typsostavTableAdapter.Fill(metroDataSet.typsostav);
mashinistTableAdapter.Fill(metroDataSet.mashinist);
psostavTableAdapter.Fill(metroDataSet.psostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void button_edit_typsostav_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("edit_typsostav", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@typkod", typkod_typsostav.Text);
insto.Parameters.AddWithValue("@name", name_typsostav.Text);
insto.Parameters.AddWithValue("@kolmest", kolmest_typsostav.Text);
insto.Parameters.AddWithValue("@dlina", dlina_typsostav.Text);
insto.Parameters.AddWithValue("@shirina", shirina_typsostav.Text);
insto.Parameters.AddWithValue("@visota", visota_typsostav.Text);
insto.Parameters.AddWithValue("@naznachenie", naznachenie_typsostav.Text);
insto.Parameters.AddWithValue("@koleya", koleya_typsostav.Text);
insto.Parameters.AddWithValue("@speed", speed_typsostav.Text);
insto.ExecuteNonQuery();
typsostavTableAdapter.Fill(metroDataSet.typsostav);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
if (checkBox2.Checked == true)
{
button_add_stanciya.Enabled = true;
button_del_stanciya.Enabled = false;
button_edit_stanciya.Enabled = false;
kod_nazad_stanciya.Enabled = true;
}
else
{
button_add_stanciya.Enabled = false;
button_del_stanciya.Enabled = true;
button_edit_stanciya.Enabled = true;
kod_nazad_stanciya.Enabled = false;
}
ClearBox(checkBox2, kod_stanciya, "kod", stanciyaBindingSource);
ClearBox(checkBox2, name_stanciya, "name", stanciyaBindingSource);
ClearBox(checkBox2, paspotok_stanciya, "paspotok", stanciyaBindingSource);
ClearBox(checkBox2, stat_stanciya, "stat", stanciyaBindingSource);
ClearBox(checkBox2, rast_nazad_stanciya, "rast_nazad", stanciyaBindingSource);
ClearBox(checkBox2, rast_vpered_stanciya, "rast_vpered", stanciyaBindingSource);
ClearBox(checkBox2, start_time_stanciya, "start_time", stanciyaBindingSource);
ClearBox(checkBox2, finish_time_stanciya, "finish_time", stanciyaBindingSource);
ClearBox(checkBox2, kod_vpered_stanciya, "kod_vpered", stanciyaBindingSource);
ClearBox(checkBox2, kod_nazad_stanciya, "kod_nazad", stanciyaBindingSource);
}
private void button_edit_stanciya_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("edit_stanciya", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@kod", kod_stanciya.Text);
insto.Parameters.AddWithValue("@name", name_stanciya.Text);
insto.Parameters.AddWithValue("@paspotok", paspotok_stanciya.Text);
insto.Parameters.AddWithValue("@stat", stat_stanciya.Text);
insto.Parameters.AddWithValue("@rast_nazad", rast_nazad_stanciya.Text);
insto.Parameters.AddWithValue("@rast_vpered", rast_vpered_stanciya.Text);
insto.Parameters.AddWithValue("@start_time", start_time_stanciya.Text);
insto.Parameters.AddWithValue("@finish_time", finish_time_stanciya.Text);
insto.ExecuteNonQuery();
stanciyaTableAdapter.Fill(metroDataSet.stanciya);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void button_add_stanciya_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("add_stanciya", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@kod", kod_stanciya.Text);
insto.Parameters.AddWithValue("@name", name_stanciya.Text);
insto.Parameters.AddWithValue("@paspotok", paspotok_stanciya.Text);
insto.Parameters.AddWithValue("@stat", stat_stanciya.Text);
insto.Parameters.AddWithValue("@rast_nazad", rast_nazad_stanciya.Text);
insto.Parameters.AddWithValue("@rast_vpered", rast_vpered_stanciya.Text);
insto.Parameters.AddWithValue("@start_time", start_time_stanciya.Text);
insto.Parameters.AddWithValue("@finish_time", finish_time_stanciya.Text);
insto.Parameters.AddWithValue("@kod_nazad", kod_nazad_stanciya.Text);
insto.ExecuteNonQuery();
stanciyaTableAdapter.Fill(metroDataSet.stanciya);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void button_del_stanciya_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("del_stanciya", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@kod", kod_stanciya.Text);
insto.ExecuteNonQuery();
stanciyaTableAdapter.Fill(metroDataSet.stanciya);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void smena_raspisanie_CheckedChanged(object sender, EventArgs e)
{
if (smena_raspisanie.Checked == true)
{
raspisanieDataGridView.Visible = true;
v_raspisanieDataGridView.Visible = false;
}
else
{
raspisanieDataGridView.Visible = false;
v_raspisanieDataGridView.Visible = true;
}
}
private void button_add_typik_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("add_typik", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@typik", add_typik.Text);
insto.ExecuteNonQuery();
remontTableAdapter.Fill(metroDataSet.remont);
v_remontTableAdapter.Fill(metroDataSet.v_remont);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void v_remont_CheckedChanged(object sender, EventArgs e)
{
if (v_remont.Checked == true)
{
remontDataGridView.Visible = true;
v_remontDataGridView.Visible = false;
}
else
{
remontDataGridView.Visible = false;
v_remontDataGridView.Visible = true;
}
}
private void button_del_typik_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("del_typik", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@typik", add_typik.Text);
insto.ExecuteNonQuery();
remontTableAdapter.Fill(metroDataSet.remont);
v_remontTableAdapter.Fill(metroDataSet.v_remont);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void edit_mashinist_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("edit_mashinist", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@serialpas", serialpas_mashinist.Text);
insto.Parameters.AddWithValue("@serial", sostav_mashinist.Text);
insto.Parameters.AddWithValue("@fio", fio_mashinist.Text);
insto.Parameters.AddWithValue("@tel", tel_mashinist.Text);
insto.Parameters.AddWithValue("@staj", staj_mashinist.Text);
insto.Parameters.AddWithValue("@kvalif", kvalif_mashinist.Text);
insto.ExecuteNonQuery();
mashinistTableAdapter.Fill(metroDataSet.mashinist);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
private void del_mashinist_Click(object sender, EventArgs e)
{
var insto = new SqlCommand("del_mashinist", conn);
conn.InfoMessage += OnSqlConnectionInfoMessage;
insto.CommandType = CommandType.StoredProcedure;
insto.Parameters.AddWithValue("@serialpas", serialpas_mashinist.Text);
insto.ExecuteNonQuery();
mashinistTableAdapter.Fill(metroDataSet.mashinist);
conn.InfoMessage -= OnSqlConnectionInfoMessage;
}
}
}

294
Metro/Form1.resx Normal file
View File

@ -0,0 +1,294 @@
<?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="serialpasLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="serialLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="fioLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="telLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="stajLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="kvalifLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="serialLabel1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="typkodLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="stat_psostav.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="probegLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="iznos_motorLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="iznos_tkLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="typkodLabel1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="nameLabel2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="kolmestLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="dlinaLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="shirinaLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="visotaLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="naznachenieLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="koleyaLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="speedLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label21.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="v_raspisanieBindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 251</value>
</metadata>
<metadata name="metroDataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 134</value>
</metadata>
<metadata name="start_vremya.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="raspisanieBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>693, 95</value>
</metadata>
<metadata name="vetkaBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>490, 134</value>
</metadata>
<metadata name="psostavBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>144, 134</value>
</metadata>
<metadata name="typsostavBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>248, 173</value>
</metadata>
<metadata name="remontBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>199, 212</value>
</metadata>
<metadata name="dispetcherBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>626, 173</value>
</metadata>
<metadata name="mashinistBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 212</value>
</metadata>
<metadata name="v_remontBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>219, 251</value>
</metadata>
<metadata name="spravkaBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>369, 212</value>
</metadata>
<metadata name="stanciyaBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>316, 134</value>
</metadata>
<metadata name="jurnalBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>541, 212</value>
</metadata>
<metadata name="raspisanieTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>183, 95</value>
</metadata>
<metadata name="tableAdapterManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>703, 56</value>
</metadata>
<metadata name="psostavTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>537, 56</value>
</metadata>
<metadata name="stanciyaTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="vetkaTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>193, 56</value>
</metadata>
<metadata name="fKvetkaraspisanieBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>649, 134</value>
</metadata>
<metadata name="fKvetkaraspisanieBindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 173</value>
</metadata>
<metadata name="typsostavTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="v_raspisanieBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>430, 173</value>
</metadata>
<metadata name="dispetcherTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>526, 17</value>
</metadata>
<metadata name="mashinistTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>350, 17</value>
</metadata>
<metadata name="remontTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>185, 17</value>
</metadata>
<metadata name="spravkaTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="jurnalTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>538, 95</value>
</metadata>
<metadata name="v_raspisanieTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>347, 56</value>
</metadata>
<metadata name="v_remontTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>362, 95</value>
</metadata>
<metadata name="v_psostavBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>400, 251</value>
</metadata>
<metadata name="v_psostavBindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>583, 251</value>
</metadata>
<metadata name="v_psostavBindingSource2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 290</value>
</metadata>
<metadata name="v_psostavBindingSource3.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>206, 290</value>
</metadata>
<metadata name="fKtypkodpsostavBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>395, 290</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
</root>

107
Metro/Form2.Designer.cs generated Normal file
View File

@ -0,0 +1,107 @@
namespace Metro
{
partial class Authorization
{
/// <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.login = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.password = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// login
//
this.login.Location = new System.Drawing.Point(26, 28);
this.login.Name = "login";
this.login.Size = new System.Drawing.Size(166, 20);
this.login.TabIndex = 0;
this.login.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.login_KeyPress);
//
// button1
//
this.button1.Location = new System.Drawing.Point(198, 25);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 60);
this.button1.TabIndex = 1;
this.button1.Text = "Вход";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// password
//
this.password.Location = new System.Drawing.Point(26, 65);
this.password.Name = "password";
this.password.PasswordChar = '*';
this.password.Size = new System.Drawing.Size(166, 20);
this.password.TabIndex = 2;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(26, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(38, 13);
this.label1.TabIndex = 3;
this.label1.Text = "Логин";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(26, 51);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(45, 13);
this.label2.TabIndex = 4;
this.label2.Text = "Пароль";
//
// Authorization
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(285, 111);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.password);
this.Controls.Add(this.button1);
this.Controls.Add(this.login);
this.Name = "Authorization";
this.Text = "Авторизация";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox login;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox password;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
}
}

75
Metro/Form2.cs Normal file
View File

@ -0,0 +1,75 @@
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 System.Data.SqlClient;
using System.Security;
using System.Security.Cryptography;
namespace Metro
{
public partial class Authorization : Form
{
const string connectionString = "Data Source=(local);" + "Initial Catalog=Metro;" + "User ID=sa;" + "Password=1950;";
public Authorization()
{
InitializeComponent();
}
static string GetMd5Hash(MD5 md5Hash, string input)
{
byte[] data = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(input));
StringBuilder sBuilder = new StringBuilder();
for (int i = 0; i < data.Length; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}
return sBuilder.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
if (login.Text != "" && password.Text != "")
{
MD5 md5Hash = MD5.Create();
string sql = "SELECT doljnost FROM dispetcher WHERE serialpas = " + login.Text + " and pas = 0x" + GetMd5Hash(md5Hash, password.Text);
using (SqlConnection connection = new SqlConnection(connectionString))
{
connection.Open();
SqlCommand cp = new SqlCommand(sql, connection);
get_doljnost.Value = (string)cp.ExecuteScalar();
SqlDataReader reader = cp.ExecuteReader();
if (reader.HasRows)
{
get_login.Value = float.Parse(login.Text);
Form a = new Form1();
a.Show();
this.Hide();
} else
{
MessageBox.Show("Неправильный логин или пароль");
}
}
} else
{
MessageBox.Show("Введите данные для авторизации!");
}
}
private void login_KeyPress(object sender, KeyPressEventArgs e)
{
char number = e.KeyChar;
if (!Char.IsDigit(number) && number != 8) // цифры и клавиша BackSpace
{
e.Handled = true;
}
}
}
}

120
Metro/Form2.resx Normal file
View File

@ -0,0 +1,120 @@
<?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>
</root>

143
Metro/Metro.csproj Normal file
View File

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A1B6D0A1-FF51-4ECD-9194-3E770476D58F}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Metro</RootNamespace>
<AssemblyName>Metro</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.ReportViewer.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.140.1000.523\lib\net40\Microsoft.ReportViewer.Common.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ReportViewer.DataVisualization, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.140.1000.523\lib\net40\Microsoft.ReportViewer.DataVisualization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ReportViewer.Design, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.140.1000.523\lib\net40\Microsoft.ReportViewer.Design.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ReportViewer.ProcessingObjectModel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.140.1000.523\lib\net40\Microsoft.ReportViewer.ProcessingObjectModel.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ReportViewer.WinForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.140.1000.523\lib\net40\Microsoft.ReportViewer.WinForms.dll</HintPath>
</Reference>
<Reference Include="Microsoft.SqlServer.Types, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SqlServer.Types.14.0.314.76\lib\net40\Microsoft.SqlServer.Types.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Form2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form2.Designer.cs">
<DependentUpon>Form2.cs</DependentUpon>
</Compile>
<Compile Include="MetroDataSet.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>MetroDataSet.xsd</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SqlServerTypes\Loader.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form2.resx">
<DependentUpon>Form2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="MetroDataSet.xsc">
<DependentUpon>MetroDataSet.xsd</DependentUpon>
</None>
<None Include="MetroDataSet.xsd">
<Generator>MSDataSetGenerator</Generator>
<LastGenOutput>MetroDataSet.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</None>
<None Include="MetroDataSet.xss">
<DependentUpon>MetroDataSet.xsd</DependentUpon>
</None>
<None Include="packages.config" />
<None Include="Properties\DataSources\Metro.MetroDataSetTableAdapters.stanciyaTableAdapter.datasource" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="SqlServerTypes\readme.htm" />
<Content Include="SqlServerTypes\x64\msvcr120.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="SqlServerTypes\x64\SqlServerSpatial140.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="SqlServerTypes\x86\msvcr120.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="SqlServerTypes\x86\SqlServerSpatial140.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

16047
Metro/MetroDataSet.Designer.cs generated Normal file

File diff suppressed because it is too large Load Diff

9
Metro/MetroDataSet.xsc Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--<autogenerated>
This code was generated by a tool.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TableUISettings />
</DataSetUISetting>

1741
Metro/MetroDataSet.xsd Normal file

File diff suppressed because it is too large Load Diff

218
Metro/MetroDataSet.xss Normal file
View File

@ -0,0 +1,218 @@
<?xml version="1.0" encoding="utf-8"?>
<!--<autogenerated>
This code was generated by a tool to store the dataset designer's layout information.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:dispetcher" ZOrder="28" X="577" Y="70" Height="172" Width="205" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:jurnal" ZOrder="27" X="329" Y="70" Height="172" Width="178" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:mashinist" ZOrder="26" X="329" Y="1152" Height="210" Width="200" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
<Shape ID="DesignTable:psostav" ZOrder="25" X="70" Y="70" Height="191" Width="189" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
<Shape ID="DesignTable:raspisanie" ZOrder="24" X="329" Y="312" Height="229" Width="202" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
<Shape ID="DesignTable:remont" ZOrder="23" X="329" Y="910" Height="153" Width="187" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:spravka" ZOrder="22" X="586" Y="910" Height="172" Width="189" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:stanciya" ZOrder="21" X="601" Y="312" Height="267" Width="191" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
<Shape ID="DesignTable:stanitsa" ZOrder="20" X="862" Y="70" Height="191" Width="189" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
<Shape ID="DesignTable:typsostav" ZOrder="19" X="329" Y="1432" Height="248" Width="200" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
<Shape ID="DesignTable:vetka" ZOrder="18" X="601" Y="649" Height="191" Width="176" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
<Shape ID="DesignTable:v_raspisanie" ZOrder="2" X="1491" Y="70" Height="172" Width="214" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:v_remont" ZOrder="1" X="1775" Y="70" Height="172" Width="207" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignSources:QueriesTableAdapter" ZOrder="3" X="1121" Y="70" Height="257" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="253" />
</Shapes>
<Connectors>
<Connector ID="DesignRelation:FK_serial_jurnal" ZOrder="17" LineWidth="11">
<RoutePoints>
<Point>
<X>259</X>
<Y>156</Y>
</Point>
<Point>
<X>329</X>
<Y>156</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_serialpas_jurnal" ZOrder="16" LineWidth="11">
<RoutePoints>
<Point>
<X>577</X>
<Y>156</Y>
</Point>
<Point>
<X>507</X>
<Y>156</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_typik_jurnal" ZOrder="15" LineWidth="11">
<RoutePoints>
<Point>
<X>418</X>
<Y>910</Y>
</Point>
<Point>
<X>418</X>
<Y>242</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_serial_mashinist" ZOrder="14" LineWidth="11">
<RoutePoints>
<Point>
<X>226</X>
<Y>261</Y>
</Point>
<Point>
<X>226</X>
<Y>1169</Y>
</Point>
<Point>
<X>329</X>
<Y>1169</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_typkod_psostav" ZOrder="13" LineWidth="11">
<RoutePoints>
<Point>
<X>329</X>
<Y>1449</Y>
</Point>
<Point>
<X>218</X>
<Y>1449</Y>
</Point>
<Point>
<X>218</X>
<Y>261</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_finish_kod_raspisanie" ZOrder="12" LineWidth="11">
<RoutePoints>
<Point>
<X>601</X>
<Y>426</Y>
</Point>
<Point>
<X>531</X>
<Y>426</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_serial_raspisanie" ZOrder="11" LineWidth="11">
<RoutePoints>
<Point>
<X>242</X>
<Y>261</Y>
</Point>
<Point>
<X>242</X>
<Y>329</Y>
</Point>
<Point>
<X>329</X>
<Y>329</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_serialpas_raspisanie" ZOrder="10" LineWidth="11">
<RoutePoints>
<Point>
<X>594</X>
<Y>242</Y>
</Point>
<Point>
<X>594</X>
<Y>337</Y>
</Point>
<Point>
<X>531</X>
<Y>337</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_start_kod_raspisanie" ZOrder="9" LineWidth="11">
<RoutePoints>
<Point>
<X>601</X>
<Y>426</Y>
</Point>
<Point>
<X>531</X>
<Y>426</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_vetka_raspisanie" ZOrder="8" LineWidth="11">
<RoutePoints>
<Point>
<X>601</X>
<Y>666</Y>
</Point>
<Point>
<X>514</X>
<Y>666</Y>
</Point>
<Point>
<X>514</X>
<Y>541</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_kod_remont" ZOrder="7" LineWidth="11">
<RoutePoints>
<Point>
<X>586</X>
<Y>996</Y>
</Point>
<Point>
<X>516</X>
<Y>996</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_serial_remont" ZOrder="6" LineWidth="11">
<RoutePoints>
<Point>
<X>234</X>
<Y>261</Y>
</Point>
<Point>
<X>234</X>
<Y>927</Y>
</Point>
<Point>
<X>329</X>
<Y>927</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_finish_stanciya" ZOrder="5" LineWidth="11">
<RoutePoints>
<Point>
<X>689</X>
<Y>579</Y>
</Point>
<Point>
<X>689</X>
<Y>649</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_start_stanciya" ZOrder="4" LineWidth="11">
<RoutePoints>
<Point>
<X>681</X>
<Y>579</Y>
</Point>
<Point>
<X>681</X>
<Y>649</Y>
</Point>
</RoutePoints>
</Connector>
</Connectors>
</DiagramLayout>

31
Metro/Program.cs Normal file
View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Metro
{
static class Program
{
/// <summary>
/// Главная точка входа для приложения.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Authorization());
}
}
static class get_login
{
public static float Value { get; set; }
}
static class get_doljnost
{
public static string Value { get; set; }
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Общие сведения об этой сборке предоставляются следующим набором
// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
// связанные со сборкой.
[assembly: AssemblyTitle("Metro")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Metro")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
[assembly: ComVisible(false)]
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
[assembly: Guid("a1b6d0a1-ff51-4ecd-9194-3e770476d58f")]
// Сведения о версии сборки состоят из следующих четырех значений:
//
// Основной номер версии
// Дополнительный номер версии
// Номер сборки
// Редакция
//
// Можно задать все значения или принять номер сборки и номер редакции по умолчанию.
// используя "*", как показано ниже:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="stanciyaTableAdapter" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>Metro.MetroDataSetTableAdapters.stanciyaTableAdapter, MetroDataSet.Designer.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

71
Metro/Properties/Resources.Designer.cs generated Normal file
View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программным средством.
// Версия среды выполнения: 4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если
// код создан повторно.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Metro.Properties
{
/// <summary>
/// Класс ресурсов со строгим типом для поиска локализованных строк и пр.
/// </summary>
// Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder
// класс с помощью таких средств, как ResGen или Visual Studio.
// Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen
// с параметром /str или заново постройте свой VS-проект.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Возврат кэшированного экземпляра ResourceManager, используемого этим классом.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Metro.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Переопределяет свойство CurrentUICulture текущего потока для всех
/// подстановки ресурсов с помощью этого класса ресурсов со строгим типом.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

36
Metro/Properties/Settings.Designer.cs generated Normal file
View File

@ -0,0 +1,36 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Metro.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=ROOT2895;Initial Catalog=Metro;User ID=sa;Password=1950")]
public string MetroConnectionString {
get {
return ((string)(this["MetroConnectionString"]));
}
}
}
}

View File

@ -0,0 +1,14 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Metro.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="MetroConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=ROOT2895;Initial Catalog=Metro;User ID=sa;Password=1950&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=ROOT2895;Initial Catalog=Metro;User ID=sa;Password=1950</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace SqlServerTypes
{
/// <summary>
/// Utility methods related to CLR Types for SQL Server
/// </summary>
public class Utilities
{
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr LoadLibrary(string libname);
/// <summary>
/// Loads the required native assemblies for the current architecture (x86 or x64)
/// </summary>
/// <param name="rootApplicationPath">
/// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications
/// and AppDomain.CurrentDomain.BaseDirectory for desktop applications.
/// </param>
public static void LoadNativeAssemblies(string rootApplicationPath)
{
var nativeBinaryPath = IntPtr.Size > 4
? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\")
: Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\");
LoadNativeAssembly(nativeBinaryPath, "msvcr120.dll");
LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial140.dll");
}
private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName)
{
var path = Path.Combine(nativeBinaryPath, assemblyName);
var ptr = LoadLibrary(path);
if (ptr == IntPtr.Zero)
{
throw new Exception(string.Format(
"Error loading {0} (ErrorCode: {1})",
assemblyName,
Marshal.GetLastWin32Error()));
}
}
}
}

View File

@ -0,0 +1,61 @@
<html lang="en-US">
<head>
<meta charset="utf-8" />
<title>Microsoft.SqlServer.Types</title>
<style>
body {
background: #fff;
color: #505050;
margin: 20px;
}
#main {
background: #efefef;
padding: 5px 30px;
}
</style>
</head>
<body>
<div id="main">
<h1>Action required to load native assemblies</h1>
<p>
To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial140.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr120.dll is also included in case the C++ runtime is not installed.
</p>
<p>
You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture).
</p>
<h2>ASP.NET Web Sites</h2>
<p>
For ASP.NET Web Sites, add the following block of code to the code behind file of the Web Form where you have added Report Viewer Control:
<pre>
Default.aspx.cs:
public partial class _Default : System.Web.UI.Page
{
static bool _isSqlTypesLoaded = false;
public _Default()
{
if (!_isSqlTypesLoaded)
{
SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~"));
_isSqlTypesLoaded = true;
}
}
}
</pre>
</p>
<h2>ASP.NET Web Applications</h2>
<p>
For ASP.NET Web Applications, add the following line of code to the Application_Start method in Global.asax.cs:
<pre> SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));</pre>
</p>
<h2>Desktop Applications</h2>
<p>
For desktop applications, add the following line of code to run before any spatial operations are performed:
<pre> SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);</pre>
</p>
</div>
</body>
</html>

5
Metro/packages.config Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.ReportingServices.ReportViewerControl.Winforms" version="140.1000.523" targetFramework="net461" />
<package id="Microsoft.SqlServer.Types" version="14.0.314.76" targetFramework="net461" />
</packages>