浏览代码

first commit

Гончаров Виталий Витальевич 4 年之前
当前提交
2f1d12704f

二进制
.vs/BD/v16/.suo


+ 25 - 0
BD.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30503.244
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BD", "BD\BD.csproj", "{A9CE5DD0-BAE1-4CB4-AAB5-060CB799158A}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{A9CE5DD0-BAE1-4CB4-AAB5-060CB799158A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A9CE5DD0-BAE1-4CB4-AAB5-060CB799158A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A9CE5DD0-BAE1-4CB4-AAB5-060CB799158A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A9CE5DD0-BAE1-4CB4-AAB5-060CB799158A}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {81CD946C-9E03-4174-9B2A-69B89AFEA199}
+	EndGlobalSection
+EndGlobal

+ 10 - 0
BD/App.config

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+  </startup>
+  <appSettings>
+    <add key="provider" value="System.Data.SqlClient"/>
+    <add key="conStr" value="Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Z:\РКИС\ДЗ1\USERS HW.MDF;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"/>
+  </appSettings>
+</configuration>

+ 54 - 0
BD/BD.csproj

@@ -0,0 +1,54 @@
+<?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>{A9CE5DD0-BAE1-4CB4-AAB5-060CB799158A}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>BD</RootNamespace>
+    <AssemblyName>BD</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </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="System" />
+    <Reference Include="System.Configuration" />
+    <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.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 57 - 0
BD/Program.cs

@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Configuration;
+using System.Data.Common;
+
+
+namespace BD
+{
+
+        class Program
+        {
+            static void Main(string[] args)
+            {
+                string dp = ConfigurationManager.AppSettings["provider"];
+                string cnStr = ConfigurationManager.AppSettings["conStr"];
+
+                DbProviderFactory df = DbProviderFactories.GetFactory(dp);
+
+                using (DbConnection cn = df.CreateConnection())
+                {
+                    Console.WriteLine("Объект подключения: " + cn.GetType().Name);
+                    cn.ConnectionString = cnStr;
+                    cn.Open();
+
+                    DbCommand cmd = df.CreateCommand();
+                    Console.WriteLine("Объект команды: " + cmd.GetType().Name);
+                    cmd.Connection = cn;
+
+                    string strSQL = "Select * From ";
+
+                    cmd.CommandText = strSQL + "Users";
+                    using (DbDataReader dr = cmd.ExecuteReader())
+                    {
+                        Console.WriteLine("Объект чтения данных: " + dr.GetType().Name);
+                        Console.WriteLine("\n Users");
+                        while (dr.Read())
+                            Console.WriteLine("-> ID - {0} | FIO -{1} | Login - {2} | Password - {3} | Pincode - {4} ",
+                            dr[0], dr[1], dr[2], dr[3], dr[4]);
+                    }
+                    cmd.CommandText = strSQL + "listofpayments";
+                    using (DbDataReader dr = cmd.ExecuteReader())
+                    {
+                        Console.WriteLine("Объект чтения данных: " + dr.GetType().Name);
+                        Console.WriteLine("\n listofpayments");
+                        while (dr.Read())
+                            Console.WriteLine("-> ID - {0} | Дата -{1} | Категория - {2} | Наиминование платежа - {3} | Количество - {4} | Цена - {5} | Стоимость - {6} ",
+                            dr[0], dr[1], dr[2], dr[3], dr[4], dr[5], dr[6]);
+                    }
+                }
+
+                Console.ReadKey();
+            }
+        }
+    }

+ 36 - 0
BD/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Общие сведения об этой сборке предоставляются следующим набором
+// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
+// связанные с этой сборкой.
+[assembly: AssemblyTitle("BD")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("BD")]
+[assembly: AssemblyCopyright("Copyright ©  2020")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
+// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
+// из модели COM задайте для атрибута ComVisible этого типа значение true.
+[assembly: ComVisible(false)]
+
+// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM
+[assembly: Guid("a9ce5dd0-bae1-4cb4-aab5-060cb799158a")]
+
+// Сведения о версии сборки состоят из указанных ниже четырех значений:
+//
+//      Основной номер версии
+//      Дополнительный номер версии
+//      Номер сборки
+//      Номер редакции
+//
+// Можно задать все значения или принять номера сборки и редакции по умолчанию 
+// используя "*", как показано ниже:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

二进制
BD/bin/Debug/BD.exe


+ 10 - 0
BD/bin/Debug/BD.exe.config

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+  </startup>
+  <appSettings>
+    <add key="provider" value="System.Data.SqlClient"/>
+    <add key="conStr" value="Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Z:\РКИС\ДЗ1\USERS HW.MDF;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"/>
+  </appSettings>
+</configuration>

二进制
BD/bin/Debug/BD.pdb


+ 4 - 0
BD/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs

@@ -0,0 +1,4 @@
+// <autogenerated />
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

+ 1 - 0
BD/obj/Debug/BD.csproj.CoreCompileInputs.cache

@@ -0,0 +1 @@
+cac4858e9050c6e286bb9f058bbb81961a25835f

+ 14 - 0
BD/obj/Debug/BD.csproj.FileListAbsolute.txt

@@ -0,0 +1,14 @@
+C:\Users\vitsh\Desktop\Привет\BD\BD\bin\Debug\BD.exe.config
+C:\Users\vitsh\Desktop\Привет\BD\BD\bin\Debug\BD.exe
+C:\Users\vitsh\Desktop\Привет\BD\BD\bin\Debug\BD.pdb
+C:\Users\vitsh\Desktop\Привет\BD\BD\obj\Debug\BD.csprojAssemblyReference.cache
+C:\Users\vitsh\Desktop\Привет\BD\BD\obj\Debug\BD.csproj.CoreCompileInputs.cache
+C:\Users\vitsh\Desktop\Привет\BD\BD\obj\Debug\BD.exe
+C:\Users\vitsh\Desktop\Привет\BD\BD\obj\Debug\BD.pdb
+Z:\РКИС\Привет\BD\BD\bin\Debug\BD.exe.config
+Z:\РКИС\Привет\BD\BD\bin\Debug\BD.exe
+Z:\РКИС\Привет\BD\BD\bin\Debug\BD.pdb
+Z:\РКИС\Привет\BD\BD\obj\Debug\BD.csprojAssemblyReference.cache
+Z:\РКИС\Привет\BD\BD\obj\Debug\BD.csproj.CoreCompileInputs.cache
+Z:\РКИС\Привет\BD\BD\obj\Debug\BD.exe
+Z:\РКИС\Привет\BD\BD\obj\Debug\BD.pdb

二进制
BD/obj/Debug/BD.csprojAssemblyReference.cache


二进制
BD/obj/Debug/BD.exe


二进制
BD/obj/Debug/BD.pdb


二进制
BD/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache