Преглед изворни кода

Окно регистрации

gr672_lii пре 5 година
родитељ
комит
5b16fa3969

+ 7 - 0
CopyCenter/CopyCenter.csproj

@@ -97,6 +97,9 @@
     <Compile Include="Payment.cs">
       <DependentUpon>DataBase.tt</DependentUpon>
     </Compile>
+    <Compile Include="RegistrationWindow.xaml.cs">
+      <DependentUpon>RegistrationWindow.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Service.cs">
       <DependentUpon>DataBase.tt</DependentUpon>
     </Compile>
@@ -145,6 +148,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="RegistrationWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="ServicesWindow.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 12 - 0
CopyCenter/RegistrationWindow.xaml

@@ -0,0 +1,12 @@
+<Window x:Class="CopyCenter.RegistrationWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:CopyCenter"
+        mc:Ignorable="d"
+        Title="Регистрация" Height="450" Width="800">
+    <Grid>
+        
+    </Grid>
+</Window>

+ 27 - 0
CopyCenter/RegistrationWindow.xaml.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace CopyCenter
+{
+    /// <summary>
+    /// Логика взаимодействия для RegistrationWindow.xaml
+    /// </summary>
+    public partial class RegistrationWindow : Window
+    {
+        public RegistrationWindow()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 3 - 8
CopyCenter/ServicesWindow.xaml.cs

@@ -46,17 +46,11 @@ namespace CopyCenter
 
         private void Update(object sender, RoutedEventArgs e)
         {
-            int num = Convert.ToInt32(txtId.Text);
-            var uRow = db.Service.Where(w => w.idService == num).FirstOrDefault();
-            uRow.NameService = Name.Text;
-            uRow.PriceService = Convert.ToInt32(Price.Text);
-            uRow.DescriptionService = Description.Text;
-            uRow.idCategory = Convert.ToInt32(idCategory.Text);
-            db.SaveChanges();
+            
         }
         private void Window_Loaded(object sender, RoutedEventArgs e)
         {
-                db = new gr672_liiEntities();
+            db = new gr672_liiEntities();
         }
 
         private void Delete(object sender, RoutedEventArgs e)
@@ -65,3 +59,4 @@ namespace CopyCenter
         }
     }
 }
+