Александр Кайгородов 3 rokov pred
rodič
commit
e9ad21aa56

BIN
veloprokat/bd


+ 63 - 0
veloprokat/veloprokat.sqlproj

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <Name>veloprokat</Name>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectVersion>4.1</ProjectVersion>
+    <ProjectGuid>{29e5c46b-616a-4fc1-ab7b-6135dba4399f}</ProjectGuid>
+    <DSP>Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider</DSP>
+    <OutputType>Database</OutputType>
+    <RootPath>
+    </RootPath>
+    <RootNamespace>veloprokat</RootNamespace>
+    <AssemblyName>veloprokat</AssemblyName>
+    <ModelCollation>1033, CI</ModelCollation>
+    <DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure>
+    <DeployToDatabase>True</DeployToDatabase>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <TargetLanguage>CS</TargetLanguage>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <SqlServerVerification>False</SqlServerVerification>
+    <IncludeCompositeObjects>True</IncludeCompositeObjects>
+    <TargetDatabaseSet>True</TargetDatabaseSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <OutputPath>bin\Release\</OutputPath>
+    <BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
+    <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <DefineDebug>false</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <OutputPath>bin\Debug\</OutputPath>
+    <BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <DefineDebug>true</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
+    <!-- Default to the v11.0 targets path if the targets file for the current VS version is not found -->
+    <SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists>
+    <VisualStudioVersion Condition="'$(SSDTExists)' == ''">11.0</VisualStudioVersion>
+  </PropertyGroup>
+  <Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
+  <Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
+  <ItemGroup>
+    <Folder Include="Properties" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="bd" />
+  </ItemGroup>
+</Project>

+ 1 - 1
veloprokat2/Auth.xaml.cs

@@ -79,7 +79,7 @@ namespace veloprokat2
         {
             DataTable dataTable = new DataTable("dataBase");                // создаём таблицу в приложении
                                                                             // подключаемся к базе данных
-            SqlConnection sqlConnection = new SqlConnection("server=DESKTOP-9UG7OCA;Trusted_Connection=Yes;DataBase=Veloprokat;");
+            SqlConnection sqlConnection = new SqlConnection("server=mssql;Trusted_Connection=Yes;DataBase=gr692_kaa;");
             sqlConnection.Open();                                           // открываем базу данных
             SqlCommand sqlCommand = sqlConnection.CreateCommand();          // создаём команду
             sqlCommand.CommandText = selectSQL;                             // присваиваем команде текст

+ 1 - 1
veloprokat2/Insert_Bikes.xaml.cs

@@ -90,7 +90,7 @@ namespace veloprokat2
         {
             DataTable dataTable = new DataTable("dataBase");                // создаём таблицу в приложении
                                                                             // подключаемся к базе данных
-            SqlConnection sqlConnection = new SqlConnection("server=DESKTOP-9UG7OCA;Trusted_Connection=Yes;DataBase=Veloprokat;");
+            SqlConnection sqlConnection = new SqlConnection("server=mssql;Trusted_Connection=Yes;DataBase=gr692_kaa;");
             sqlConnection.Open();                                           // открываем базу данных
             SqlCommand sqlCommand = sqlConnection.CreateCommand();          // создаём команду
             sqlCommand.CommandText = selectSQL;                             // присваиваем команде текст

+ 1 - 1
veloprokat2/Insert_zap.xaml.cs

@@ -37,7 +37,7 @@ namespace veloprokat2
         {
             DataTable dataTable = new DataTable("dataBase");                // создаём таблицу в приложении
                                                                             // подключаемся к базе данных
-            SqlConnection sqlConnection = new SqlConnection("server=DESKTOP-9UG7OCA;Trusted_Connection=Yes;DataBase=Veloprokat;");
+            SqlConnection sqlConnection = new SqlConnection("server=mssql;Trusted_Connection=Yes;DataBase=gr692_kaa;");
             sqlConnection.Open();                                           // открываем базу данных
             SqlCommand sqlCommand = sqlConnection.CreateCommand();          // создаём команду
             sqlCommand.CommandText = selectSQL;                             // присваиваем команде текст

+ 1 - 1
veloprokat2/MainWindow.xaml.cs

@@ -41,7 +41,7 @@ namespace veloprokat2
         {
             DataTable dataTable = new DataTable("dataBase");                // создаём таблицу в приложении
                                                                             // подключаемся к базе данных
-            SqlConnection sqlConnection = new SqlConnection("server=DESKTOP-9UG7OCA;Trusted_Connection=Yes;DataBase=Veloprokat;");
+            SqlConnection sqlConnection = new SqlConnection("server=mssql;Trusted_Connection=Yes;DataBase=gr692_kaa;");
             sqlConnection.Open();                                           // открываем базу данных
             SqlCommand sqlCommand = sqlConnection.CreateCommand();          // создаём команду
             sqlCommand.CommandText = selectSQL;                             // присваиваем команде текст

+ 1 - 1
veloprokat2/SpisokBikes.xaml.cs

@@ -25,7 +25,7 @@ namespace veloprokat2
         public SpisokBikes()
         {
             InitializeComponent();
-            SqlConnection connection = new SqlConnection("server=DESKTOP-9UG7OCA; Trusted_Connection=YES;DataBase=Veloprokat;");
+            SqlConnection connection = new SqlConnection("server=mssql; Trusted_Connection=YES;DataBase=gr692_kaa;");
             connection.Open();
             string cmd = "select ID, Company as N'Компания', Model as N'Модель' from Bikes";
             SqlCommand createcommand = new SqlCommand(cmd, connection);

+ 11 - 4
veloprokat2/Window1.xaml

@@ -7,9 +7,16 @@
         mc:Ignorable="d"
         Title="Список продавцов" WindowState="Maximized" WindowStyle="None">
     <Grid Background="#EAF4F4">
-        <DataGrid   HorizontalAlignment="Right"  Margin="0,10,10,0" VerticalAlignment="Top" Width="1516" AutoGenerateColumns="True" Name="prodinfo" Height="550">
-        </DataGrid>
-        <Button Content="Вернуться" Click="Vixod" Margin="1085,503,307,49.8" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Width="250" Height="50"/>
-        <Button Content="Добавить" Click="Insert" Margin="339,503,1053,49.8" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Width="250" Height="50"/>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition/>
+            <ColumnDefinition/>
+        </Grid.ColumnDefinitions>
+        <Grid.RowDefinitions>
+            <RowDefinition/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+        <DataGrid AutoGenerateColumns="True" Name="prodinfo"  Grid.Column="1" Grid.Row="0" Margin="0,10,10,10" Grid.RowSpan="2"/>
+        <Button Content="Вернуться" Click="Vixod"  FontSize="20"  Width="250" Height="50" Margin="65,164,65,50"/>
+        <Button Content="Добавить" Click="Insert"  FontSize="20"  Width="250" Height="50" Grid.Column="0" Margin="65,95,65,120"/>
     </Grid>
 </Window>

+ 1 - 1
veloprokat2/Window1.xaml.cs

@@ -24,7 +24,7 @@ namespace veloprokat2
         public Window1()
         {
             InitializeComponent();
-            SqlConnection connection = new SqlConnection("server=DESKTOP-9UG7OCA; Trusted_Connection=YES;DataBase=Veloprokat;");
+            SqlConnection connection = new SqlConnection("server=mssql; Trusted_Connection=YES;DataBase=gr692_kaa;");
             connection.Open();
             string cmd = "select * from InfoRab";
             SqlCommand createcommand = new SqlCommand(cmd, connection);

BIN
veloprokat2/bd


+ 1 - 1
veloprokat2/regadm.xaml.cs

@@ -48,7 +48,7 @@ namespace veloprokat2
         {
             DataTable dataTable = new DataTable("dataBase");                // создаём таблицу в приложении
                                                                             // подключаемся к базе данных
-            SqlConnection sqlConnection = new SqlConnection("server=DESKTOP-9UG7OCA;Trusted_Connection=Yes;DataBase=Veloprokat;");
+            SqlConnection sqlConnection = new SqlConnection("server=mssql;Trusted_Connection=Yes;DataBase=gr692_kaa;");
             sqlConnection.Open();                                           // открываем базу данных
             SqlCommand sqlCommand = sqlConnection.CreateCommand();          // создаём команду
             sqlCommand.CommandText = selectSQL;                             // присваиваем команде текст