gr672_pgv %!s(int64=4) %!d(string=hai) anos
pai
achega
4d6ced19dc

+ 32 - 0
Server/Car.cs

@@ -0,0 +1,32 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Server
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Car
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public Car()
+        {
+            this.Refueling = new HashSet<Refueling>();
+        }
+    
+        public int CarID { get; set; }
+        public string CarNumber { get; set; }
+        public Nullable<int> VolumeTank { get; set; }
+        public Nullable<int> IDClient { get; set; }
+    
+        public virtual Client Client { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Refueling> Refueling { get; set; }
+    }
+}

+ 37 - 0
Server/Card.cs

@@ -0,0 +1,37 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Server
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Card
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public Card()
+        {
+            this.Payment = new HashSet<Payment>();
+        }
+    
+        public int CardID { get; set; }
+        public string NumberCard { get; set; }
+        public string CardExpDate { get; set; }
+        public decimal Balance { get; set; }
+        public int IDCardType { get; set; }
+        public Nullable<int> IDCardIssuer { get; set; }
+        public int IDHolder { get; set; }
+    
+        public virtual CardIssuer CardIssuer { get; set; }
+        public virtual CardType CardType { get; set; }
+        public virtual Client Client { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Payment> Payment { get; set; }
+    }
+}

+ 29 - 0
Server/CardIssuer.cs

@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Server
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class CardIssuer
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public CardIssuer()
+        {
+            this.Card = new HashSet<Card>();
+        }
+    
+        public int CardIssuerID { get; set; }
+        public string NameCardIssuer { get; set; }
+    
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Card> Card { get; set; }
+    }
+}

+ 29 - 0
Server/CardType.cs

@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Server
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class CardType
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public CardType()
+        {
+            this.Card = new HashSet<Card>();
+        }
+    
+        public int CardTypeID { get; set; }
+        public string NameType { get; set; }
+    
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Card> Card { get; set; }
+    }
+}

+ 33 - 0
Server/Client.cs

@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Server
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Client
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public Client()
+        {
+            this.Car = new HashSet<Car>();
+            this.Card = new HashSet<Card>();
+        }
+    
+        public int ClientID { get; set; }
+        public string LastName { get; set; }
+        public string Name { get; set; }
+    
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Car> Car { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Card> Card { get; set; }
+    }
+}

+ 32 - 0
Server/DataOfCamera.cs

@@ -0,0 +1,32 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Server
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class DataOfCamera
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public DataOfCamera()
+        {
+            this.Refueling = new HashSet<Refueling>();
+        }
+    
+        public int DataOfCameraID { get; set; }
+        public System.DateTime Date { get; set; }
+        public bool Status { get; set; }
+        public string CarNumber { get; set; }
+        public string NameImage { get; set; }
+    
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Refueling> Refueling { get; set; }
+    }
+}

+ 3 - 0
Server/FuelType.cs

@@ -18,6 +18,7 @@ namespace Server
         public FuelType()
         {
             this.FuelTypeOnGasStation = new HashSet<FuelTypeOnGasStation>();
+            this.RefuelingGun = new HashSet<RefuelingGun>();
         }
     
         public int FuelTypeID { get; set; }
@@ -25,5 +26,7 @@ namespace Server
     
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
         public virtual ICollection<FuelTypeOnGasStation> FuelTypeOnGasStation { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<RefuelingGun> RefuelingGun { get; set; }
     }
 }

+ 3 - 0
Server/GasStation.cs

@@ -18,6 +18,7 @@ namespace Server
         public GasStation()
         {
             this.FuelTypeOnGasStation = new HashSet<FuelTypeOnGasStation>();
+            this.RefuelingColumn = new HashSet<RefuelingColumn>();
         }
     
         public int GasStationID { get; set; }
@@ -25,5 +26,7 @@ namespace Server
     
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
         public virtual ICollection<FuelTypeOnGasStation> FuelTypeOnGasStation { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<RefuelingColumn> RefuelingColumn { get; set; }
     }
 }

+ 10 - 0
Server/GasStationModel.Context.cs

@@ -25,8 +25,18 @@ namespace Server
             throw new UnintentionalCodeFirstException();
         }
     
+        public virtual DbSet<Car> Car { get; set; }
+        public virtual DbSet<Card> Card { get; set; }
+        public virtual DbSet<CardIssuer> CardIssuer { get; set; }
+        public virtual DbSet<CardType> CardType { get; set; }
+        public virtual DbSet<Client> Client { get; set; }
+        public virtual DbSet<DataOfCamera> DataOfCamera { get; set; }
         public virtual DbSet<FuelType> FuelType { get; set; }
         public virtual DbSet<FuelTypeOnGasStation> FuelTypeOnGasStation { get; set; }
         public virtual DbSet<GasStation> GasStation { get; set; }
+        public virtual DbSet<Payment> Payment { get; set; }
+        public virtual DbSet<Refueling> Refueling { get; set; }
+        public virtual DbSet<RefuelingColumn> RefuelingColumn { get; set; }
+        public virtual DbSet<RefuelingGun> RefuelingGun { get; set; }
     }
 }

+ 708 - 0
Server/GasStationModel.edmx

@@ -5,6 +5,59 @@
     <!-- SSDL content -->
     <edmx:StorageModels>
     <Schema Namespace="Хранилище gr672_pgvModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
+        <EntityType Name="Car">
+          <Key>
+            <PropertyRef Name="CarID" />
+          </Key>
+          <Property Name="CarID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="CarNumber" Type="nvarchar" MaxLength="9" Nullable="false" />
+          <Property Name="VolumeTank" Type="int" />
+          <Property Name="IDClient" Type="int" />
+        </EntityType>
+        <EntityType Name="Card">
+          <Key>
+            <PropertyRef Name="CardID" />
+          </Key>
+          <Property Name="CardID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NumberCard" Type="nvarchar" MaxLength="20" Nullable="false" />
+          <Property Name="CardExpDate" Type="nvarchar" MaxLength="10" Nullable="false" />
+          <Property Name="Balance" Type="money" Nullable="false" />
+          <Property Name="IDCardType" Type="int" Nullable="false" />
+          <Property Name="IDCardIssuer" Type="int" />
+          <Property Name="IDHolder" Type="int" Nullable="false" />
+        </EntityType>
+        <EntityType Name="CardIssuer">
+          <Key>
+            <PropertyRef Name="CardIssuerID" />
+          </Key>
+          <Property Name="CardIssuerID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NameCardIssuer" Type="nvarchar" MaxLength="50" Nullable="false" />
+        </EntityType>
+        <EntityType Name="CardType">
+          <Key>
+            <PropertyRef Name="CardTypeID" />
+          </Key>
+          <Property Name="CardTypeID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NameType" Type="nvarchar" MaxLength="50" Nullable="false" />
+        </EntityType>
+        <EntityType Name="Client">
+          <Key>
+            <PropertyRef Name="ClientID" />
+          </Key>
+          <Property Name="ClientID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="LastName" Type="nvarchar" MaxLength="50" Nullable="false" />
+          <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
+        </EntityType>
+        <EntityType Name="DataOfCamera">
+          <Key>
+            <PropertyRef Name="DataOfCameraID" />
+          </Key>
+          <Property Name="DataOfCameraID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="Date" Type="datetime" Nullable="false" />
+          <Property Name="Status" Type="bit" Nullable="false" />
+          <Property Name="CarNumber" Type="nvarchar" MaxLength="9" />
+          <Property Name="NameImage" Type="nvarchar(max)" Nullable="false" />
+        </EntityType>
         <EntityType Name="FuelType">
           <Key>
             <PropertyRef Name="FuelTypeID" />
@@ -29,6 +82,91 @@
           <Property Name="GasStationID" Type="int" Nullable="false" />
           <Property Name="Address" Type="nvarchar(max)" Nullable="false" />
         </EntityType>
+        <EntityType Name="Payment">
+          <Key>
+            <PropertyRef Name="PaymentID" />
+          </Key>
+          <Property Name="PaymentID" Type="int" Nullable="false" />
+          <Property Name="IDRefueling" Type="int" Nullable="false" />
+          <Property Name="PriceRefueling" Type="money" Nullable="false" />
+          <Property Name="Status" Type="bit" Nullable="false" />
+          <Property Name="TransactionCode" Type="nvarchar" MaxLength="17" Nullable="false" />
+          <Property Name="IDCard" Type="int" Nullable="false" />
+        </EntityType>
+        <EntityType Name="Refueling">
+          <Key>
+            <PropertyRef Name="RefuelingID" />
+          </Key>
+          <Property Name="RefuelingID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="IDCar" Type="int" />
+          <Property Name="VolumeFuel" Type="int" Nullable="false" />
+          <Property Name="IDDataOfCamera" Type="int" />
+          <Property Name="KeySession" Type="nvarchar" MaxLength="12" Nullable="false" />
+          <Property Name="IDRefulingGun" Type="int" Nullable="false" />
+        </EntityType>
+        <EntityType Name="RefuelingColumn">
+          <Key>
+            <PropertyRef Name="RefuelingColumnID" />
+          </Key>
+          <Property Name="RefuelingColumnID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="IDGasStation" Type="int" Nullable="false" />
+        </EntityType>
+        <EntityType Name="RefuelingGun">
+          <Key>
+            <PropertyRef Name="RefuelingGunID" />
+          </Key>
+          <Property Name="RefuelingGunID" Type="int" Nullable="false" />
+          <Property Name="IDRefuelingColumn" Type="int" Nullable="false" />
+          <Property Name="IDFuelType" Type="int" Nullable="false" />
+        </EntityType>
+        <Association Name="FK_Car_Client">
+          <End Role="Client" Type="Self.Client" Multiplicity="0..1" />
+          <End Role="Car" Type="Self.Car" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Client">
+              <PropertyRef Name="ClientID" />
+            </Principal>
+            <Dependent Role="Car">
+              <PropertyRef Name="IDClient" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Card_CardIssuer">
+          <End Role="CardIssuer" Type="Self.CardIssuer" Multiplicity="0..1" />
+          <End Role="Card" Type="Self.Card" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="CardIssuer">
+              <PropertyRef Name="CardIssuerID" />
+            </Principal>
+            <Dependent Role="Card">
+              <PropertyRef Name="IDCardIssuer" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Card_CardType">
+          <End Role="CardType" Type="Self.CardType" Multiplicity="1" />
+          <End Role="Card" Type="Self.Card" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="CardType">
+              <PropertyRef Name="CardTypeID" />
+            </Principal>
+            <Dependent Role="Card">
+              <PropertyRef Name="IDCardType" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Card_Client">
+          <End Role="Client" Type="Self.Client" Multiplicity="1" />
+          <End Role="Card" Type="Self.Card" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Client">
+              <PropertyRef Name="ClientID" />
+            </Principal>
+            <Dependent Role="Card">
+              <PropertyRef Name="IDHolder" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
         <Association Name="FK_FuelInGasStation_GasStation">
           <End Role="GasStation" Type="Self.GasStation" Multiplicity="1" />
           <End Role="FuelTypeOnGasStation" Type="Self.FuelTypeOnGasStation" Multiplicity="*" />
@@ -53,10 +191,132 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
+        <Association Name="FK_Payment_Card">
+          <End Role="Card" Type="Self.Card" Multiplicity="1" />
+          <End Role="Payment" Type="Self.Payment" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Card">
+              <PropertyRef Name="CardID" />
+            </Principal>
+            <Dependent Role="Payment">
+              <PropertyRef Name="IDCard" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Payment_Refueling">
+          <End Role="Refueling" Type="Self.Refueling" Multiplicity="1" />
+          <End Role="Payment" Type="Self.Payment" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Refueling">
+              <PropertyRef Name="RefuelingID" />
+            </Principal>
+            <Dependent Role="Payment">
+              <PropertyRef Name="IDRefueling" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Refueling_Car">
+          <End Role="Car" Type="Self.Car" Multiplicity="0..1" />
+          <End Role="Refueling" Type="Self.Refueling" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Car">
+              <PropertyRef Name="CarID" />
+            </Principal>
+            <Dependent Role="Refueling">
+              <PropertyRef Name="IDCar" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Refueling_DataOfCamera">
+          <End Role="DataOfCamera" Type="Self.DataOfCamera" Multiplicity="0..1" />
+          <End Role="Refueling" Type="Self.Refueling" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="DataOfCamera">
+              <PropertyRef Name="DataOfCameraID" />
+            </Principal>
+            <Dependent Role="Refueling">
+              <PropertyRef Name="IDDataOfCamera" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Refueling_RefuelingGun">
+          <End Role="RefuelingGun" Type="Self.RefuelingGun" Multiplicity="1" />
+          <End Role="Refueling" Type="Self.Refueling" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="RefuelingGun">
+              <PropertyRef Name="RefuelingGunID" />
+            </Principal>
+            <Dependent Role="Refueling">
+              <PropertyRef Name="IDRefulingGun" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_RefuelingColumn_GasStation">
+          <End Role="GasStation" Type="Self.GasStation" Multiplicity="1" />
+          <End Role="RefuelingColumn" Type="Self.RefuelingColumn" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="GasStation">
+              <PropertyRef Name="GasStationID" />
+            </Principal>
+            <Dependent Role="RefuelingColumn">
+              <PropertyRef Name="IDGasStation" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_RefuelingGun_FuelType">
+          <End Role="FuelType" Type="Self.FuelType" Multiplicity="1" />
+          <End Role="RefuelingGun" Type="Self.RefuelingGun" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="FuelType">
+              <PropertyRef Name="FuelTypeID" />
+            </Principal>
+            <Dependent Role="RefuelingGun">
+              <PropertyRef Name="IDFuelType" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_RefuelingGun_RefuelingColumn">
+          <End Role="RefuelingColumn" Type="Self.RefuelingColumn" Multiplicity="1" />
+          <End Role="RefuelingGun" Type="Self.RefuelingGun" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="RefuelingColumn">
+              <PropertyRef Name="RefuelingColumnID" />
+            </Principal>
+            <Dependent Role="RefuelingGun">
+              <PropertyRef Name="IDRefuelingColumn" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
         <EntityContainer Name="Хранилище gr672_pgvModelContainer">
+          <EntitySet Name="Car" EntityType="Self.Car" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Card" EntityType="Self.Card" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="CardIssuer" EntityType="Self.CardIssuer" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="CardType" EntityType="Self.CardType" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Client" EntityType="Self.Client" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="DataOfCamera" EntityType="Self.DataOfCamera" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="FuelType" EntityType="Self.FuelType" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="FuelTypeOnGasStation" EntityType="Self.FuelTypeOnGasStation" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="GasStation" EntityType="Self.GasStation" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Payment" EntityType="Self.Payment" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Refueling" EntityType="Self.Refueling" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="RefuelingColumn" EntityType="Self.RefuelingColumn" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="RefuelingGun" EntityType="Self.RefuelingGun" Schema="dbo" store:Type="Tables" />
+          <AssociationSet Name="FK_Car_Client" Association="Self.FK_Car_Client">
+            <End Role="Client" EntitySet="Client" />
+            <End Role="Car" EntitySet="Car" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Card_CardIssuer" Association="Self.FK_Card_CardIssuer">
+            <End Role="CardIssuer" EntitySet="CardIssuer" />
+            <End Role="Card" EntitySet="Card" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Card_CardType" Association="Self.FK_Card_CardType">
+            <End Role="CardType" EntitySet="CardType" />
+            <End Role="Card" EntitySet="Card" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Card_Client" Association="Self.FK_Card_Client">
+            <End Role="Client" EntitySet="Client" />
+            <End Role="Card" EntitySet="Card" />
+          </AssociationSet>
           <AssociationSet Name="FK_FuelInGasStation_GasStation" Association="Self.FK_FuelInGasStation_GasStation">
             <End Role="GasStation" EntitySet="GasStation" />
             <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
@@ -65,24 +325,178 @@
             <End Role="FuelType" EntitySet="FuelType" />
             <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
           </AssociationSet>
+          <AssociationSet Name="FK_Payment_Card" Association="Self.FK_Payment_Card">
+            <End Role="Card" EntitySet="Card" />
+            <End Role="Payment" EntitySet="Payment" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Payment_Refueling" Association="Self.FK_Payment_Refueling">
+            <End Role="Refueling" EntitySet="Refueling" />
+            <End Role="Payment" EntitySet="Payment" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Refueling_Car" Association="Self.FK_Refueling_Car">
+            <End Role="Car" EntitySet="Car" />
+            <End Role="Refueling" EntitySet="Refueling" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Refueling_DataOfCamera" Association="Self.FK_Refueling_DataOfCamera">
+            <End Role="DataOfCamera" EntitySet="DataOfCamera" />
+            <End Role="Refueling" EntitySet="Refueling" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Refueling_RefuelingGun" Association="Self.FK_Refueling_RefuelingGun">
+            <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+            <End Role="Refueling" EntitySet="Refueling" />
+          </AssociationSet>
+          <AssociationSet Name="FK_RefuelingColumn_GasStation" Association="Self.FK_RefuelingColumn_GasStation">
+            <End Role="GasStation" EntitySet="GasStation" />
+            <End Role="RefuelingColumn" EntitySet="RefuelingColumn" />
+          </AssociationSet>
+          <AssociationSet Name="FK_RefuelingGun_FuelType" Association="Self.FK_RefuelingGun_FuelType">
+            <End Role="FuelType" EntitySet="FuelType" />
+            <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+          </AssociationSet>
+          <AssociationSet Name="FK_RefuelingGun_RefuelingColumn" Association="Self.FK_RefuelingGun_RefuelingColumn">
+            <End Role="RefuelingColumn" EntitySet="RefuelingColumn" />
+            <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+          </AssociationSet>
         </EntityContainer>
       </Schema></edmx:StorageModels>
     <!-- CSDL content -->
     <edmx:ConceptualModels>
       <Schema Namespace="gr672_pgvModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
         <EntityContainer Name="gr672_pgvEntities" annotation:LazyLoadingEnabled="true">
+          <EntitySet Name="Car" EntityType="gr672_pgvModel.Car" />
+          <EntitySet Name="Card" EntityType="gr672_pgvModel.Card" />
+          <EntitySet Name="CardIssuer" EntityType="gr672_pgvModel.CardIssuer" />
+          <EntitySet Name="CardType" EntityType="gr672_pgvModel.CardType" />
+          <EntitySet Name="Client" EntityType="gr672_pgvModel.Client" />
+          <EntitySet Name="DataOfCamera" EntityType="gr672_pgvModel.DataOfCamera" />
           <EntitySet Name="FuelType" EntityType="gr672_pgvModel.FuelType" />
           <EntitySet Name="FuelTypeOnGasStation" EntityType="gr672_pgvModel.FuelTypeOnGasStation" />
           <EntitySet Name="GasStation" EntityType="gr672_pgvModel.GasStation" />
+          <EntitySet Name="Payment" EntityType="gr672_pgvModel.Payment" />
+          <EntitySet Name="Refueling" EntityType="gr672_pgvModel.Refueling" />
+          <EntitySet Name="RefuelingColumn" EntityType="gr672_pgvModel.RefuelingColumn" />
+          <EntitySet Name="RefuelingGun" EntityType="gr672_pgvModel.RefuelingGun" />
+          <AssociationSet Name="FK_Car_Client" Association="gr672_pgvModel.FK_Car_Client">
+            <End Role="Client" EntitySet="Client" />
+            <End Role="Car" EntitySet="Car" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Refueling_Car" Association="gr672_pgvModel.FK_Refueling_Car">
+            <End Role="Car" EntitySet="Car" />
+            <End Role="Refueling" EntitySet="Refueling" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Card_CardIssuer" Association="gr672_pgvModel.FK_Card_CardIssuer">
+            <End Role="CardIssuer" EntitySet="CardIssuer" />
+            <End Role="Card" EntitySet="Card" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Card_CardType" Association="gr672_pgvModel.FK_Card_CardType">
+            <End Role="CardType" EntitySet="CardType" />
+            <End Role="Card" EntitySet="Card" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Card_Client" Association="gr672_pgvModel.FK_Card_Client">
+            <End Role="Client" EntitySet="Client" />
+            <End Role="Card" EntitySet="Card" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Payment_Card" Association="gr672_pgvModel.FK_Payment_Card">
+            <End Role="Card" EntitySet="Card" />
+            <End Role="Payment" EntitySet="Payment" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Refueling_DataOfCamera" Association="gr672_pgvModel.FK_Refueling_DataOfCamera">
+            <End Role="DataOfCamera" EntitySet="DataOfCamera" />
+            <End Role="Refueling" EntitySet="Refueling" />
+          </AssociationSet>
           <AssociationSet Name="FK_FuelInGasStation_TypeOfFuel" Association="gr672_pgvModel.FK_FuelInGasStation_TypeOfFuel">
             <End Role="FuelType" EntitySet="FuelType" />
             <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
           </AssociationSet>
+          <AssociationSet Name="FK_RefuelingGun_FuelType" Association="gr672_pgvModel.FK_RefuelingGun_FuelType">
+            <End Role="FuelType" EntitySet="FuelType" />
+            <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+          </AssociationSet>
           <AssociationSet Name="FK_FuelInGasStation_GasStation" Association="gr672_pgvModel.FK_FuelInGasStation_GasStation">
             <End Role="GasStation" EntitySet="GasStation" />
             <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
           </AssociationSet>
+          <AssociationSet Name="FK_RefuelingColumn_GasStation" Association="gr672_pgvModel.FK_RefuelingColumn_GasStation">
+            <End Role="GasStation" EntitySet="GasStation" />
+            <End Role="RefuelingColumn" EntitySet="RefuelingColumn" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Payment_Refueling" Association="gr672_pgvModel.FK_Payment_Refueling">
+            <End Role="Refueling" EntitySet="Refueling" />
+            <End Role="Payment" EntitySet="Payment" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Refueling_RefuelingGun" Association="gr672_pgvModel.FK_Refueling_RefuelingGun">
+            <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+            <End Role="Refueling" EntitySet="Refueling" />
+          </AssociationSet>
+          <AssociationSet Name="FK_RefuelingGun_RefuelingColumn" Association="gr672_pgvModel.FK_RefuelingGun_RefuelingColumn">
+            <End Role="RefuelingColumn" EntitySet="RefuelingColumn" />
+            <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+          </AssociationSet>
         </EntityContainer>
+        <EntityType Name="Car">
+          <Key>
+            <PropertyRef Name="CarID" />
+          </Key>
+          <Property Name="CarID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="CarNumber" Type="String" Nullable="false" MaxLength="9" FixedLength="false" Unicode="true" />
+          <Property Name="VolumeTank" Type="Int32" />
+          <Property Name="IDClient" Type="Int32" />
+          <NavigationProperty Name="Client" Relationship="gr672_pgvModel.FK_Car_Client" FromRole="Car" ToRole="Client" />
+          <NavigationProperty Name="Refueling" Relationship="gr672_pgvModel.FK_Refueling_Car" FromRole="Car" ToRole="Refueling" />
+        </EntityType>
+        <EntityType Name="Card">
+          <Key>
+            <PropertyRef Name="CardID" />
+          </Key>
+          <Property Name="CardID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NumberCard" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
+          <Property Name="CardExpDate" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="true" />
+          <Property Name="Balance" Type="Decimal" Nullable="false" Precision="19" Scale="4" />
+          <Property Name="IDCardType" Type="Int32" Nullable="false" />
+          <Property Name="IDCardIssuer" Type="Int32" />
+          <Property Name="IDHolder" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="CardIssuer" Relationship="gr672_pgvModel.FK_Card_CardIssuer" FromRole="Card" ToRole="CardIssuer" />
+          <NavigationProperty Name="CardType" Relationship="gr672_pgvModel.FK_Card_CardType" FromRole="Card" ToRole="CardType" />
+          <NavigationProperty Name="Client" Relationship="gr672_pgvModel.FK_Card_Client" FromRole="Card" ToRole="Client" />
+          <NavigationProperty Name="Payment" Relationship="gr672_pgvModel.FK_Payment_Card" FromRole="Card" ToRole="Payment" />
+        </EntityType>
+        <EntityType Name="CardIssuer">
+          <Key>
+            <PropertyRef Name="CardIssuerID" />
+          </Key>
+          <Property Name="CardIssuerID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NameCardIssuer" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
+          <NavigationProperty Name="Card" Relationship="gr672_pgvModel.FK_Card_CardIssuer" FromRole="CardIssuer" ToRole="Card" />
+        </EntityType>
+        <EntityType Name="CardType">
+          <Key>
+            <PropertyRef Name="CardTypeID" />
+          </Key>
+          <Property Name="CardTypeID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NameType" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
+          <NavigationProperty Name="Card" Relationship="gr672_pgvModel.FK_Card_CardType" FromRole="CardType" ToRole="Card" />
+        </EntityType>
+        <EntityType Name="Client">
+          <Key>
+            <PropertyRef Name="ClientID" />
+          </Key>
+          <Property Name="ClientID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="LastName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
+          <Property Name="Name" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
+          <NavigationProperty Name="Car" Relationship="gr672_pgvModel.FK_Car_Client" FromRole="Client" ToRole="Car" />
+          <NavigationProperty Name="Card" Relationship="gr672_pgvModel.FK_Card_Client" FromRole="Client" ToRole="Card" />
+        </EntityType>
+        <EntityType Name="DataOfCamera">
+          <Key>
+            <PropertyRef Name="DataOfCameraID" />
+          </Key>
+          <Property Name="DataOfCameraID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="Date" Type="DateTime" Nullable="false" Precision="3" />
+          <Property Name="Status" Type="Boolean" Nullable="false" />
+          <Property Name="CarNumber" Type="String" MaxLength="9" FixedLength="false" Unicode="true" />
+          <Property Name="NameImage" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
+          <NavigationProperty Name="Refueling" Relationship="gr672_pgvModel.FK_Refueling_DataOfCamera" FromRole="DataOfCamera" ToRole="Refueling" />
+        </EntityType>
         <EntityType Name="FuelType">
           <Key>
             <PropertyRef Name="FuelTypeID" />
@@ -90,6 +504,7 @@
           <Property Name="FuelTypeID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
           <Property Name="NameFuelType" Type="String" Nullable="false" MaxLength="2" FixedLength="false" Unicode="true" />
           <NavigationProperty Name="FuelTypeOnGasStation" Relationship="gr672_pgvModel.FK_FuelInGasStation_TypeOfFuel" FromRole="FuelType" ToRole="FuelTypeOnGasStation" />
+          <NavigationProperty Name="RefuelingGun" Relationship="gr672_pgvModel.FK_RefuelingGun_FuelType" FromRole="FuelType" ToRole="RefuelingGun" />
         </EntityType>
         <EntityType Name="FuelTypeOnGasStation">
           <Key>
@@ -110,7 +525,140 @@
           <Property Name="GasStationID" Type="Int32" Nullable="false" />
           <Property Name="Address" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
           <NavigationProperty Name="FuelTypeOnGasStation" Relationship="gr672_pgvModel.FK_FuelInGasStation_GasStation" FromRole="GasStation" ToRole="FuelTypeOnGasStation" />
+          <NavigationProperty Name="RefuelingColumn" Relationship="gr672_pgvModel.FK_RefuelingColumn_GasStation" FromRole="GasStation" ToRole="RefuelingColumn" />
         </EntityType>
+        <EntityType Name="Payment">
+          <Key>
+            <PropertyRef Name="PaymentID" />
+          </Key>
+          <Property Name="PaymentID" Type="Int32" Nullable="false" />
+          <Property Name="IDRefueling" Type="Int32" Nullable="false" />
+          <Property Name="PriceRefueling" Type="Decimal" Nullable="false" Precision="19" Scale="4" />
+          <Property Name="Status" Type="Boolean" Nullable="false" />
+          <Property Name="TransactionCode" Type="String" Nullable="false" MaxLength="17" FixedLength="false" Unicode="true" />
+          <Property Name="IDCard" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="Card" Relationship="gr672_pgvModel.FK_Payment_Card" FromRole="Payment" ToRole="Card" />
+          <NavigationProperty Name="Refueling" Relationship="gr672_pgvModel.FK_Payment_Refueling" FromRole="Payment" ToRole="Refueling" />
+        </EntityType>
+        <EntityType Name="Refueling">
+          <Key>
+            <PropertyRef Name="RefuelingID" />
+          </Key>
+          <Property Name="RefuelingID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="IDCar" Type="Int32" />
+          <Property Name="VolumeFuel" Type="Int32" Nullable="false" />
+          <Property Name="IDDataOfCamera" Type="Int32" />
+          <Property Name="KeySession" Type="String" Nullable="false" MaxLength="12" FixedLength="false" Unicode="true" />
+          <Property Name="IDRefulingGun" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="Car" Relationship="gr672_pgvModel.FK_Refueling_Car" FromRole="Refueling" ToRole="Car" />
+          <NavigationProperty Name="DataOfCamera" Relationship="gr672_pgvModel.FK_Refueling_DataOfCamera" FromRole="Refueling" ToRole="DataOfCamera" />
+          <NavigationProperty Name="Payment" Relationship="gr672_pgvModel.FK_Payment_Refueling" FromRole="Refueling" ToRole="Payment" />
+          <NavigationProperty Name="RefuelingGun" Relationship="gr672_pgvModel.FK_Refueling_RefuelingGun" FromRole="Refueling" ToRole="RefuelingGun" />
+        </EntityType>
+        <EntityType Name="RefuelingColumn">
+          <Key>
+            <PropertyRef Name="RefuelingColumnID" />
+          </Key>
+          <Property Name="RefuelingColumnID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="IDGasStation" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="GasStation" Relationship="gr672_pgvModel.FK_RefuelingColumn_GasStation" FromRole="RefuelingColumn" ToRole="GasStation" />
+          <NavigationProperty Name="RefuelingGun" Relationship="gr672_pgvModel.FK_RefuelingGun_RefuelingColumn" FromRole="RefuelingColumn" ToRole="RefuelingGun" />
+        </EntityType>
+        <EntityType Name="RefuelingGun">
+          <Key>
+            <PropertyRef Name="RefuelingGunID" />
+          </Key>
+          <Property Name="RefuelingGunID" Type="Int32" Nullable="false" />
+          <Property Name="IDRefuelingColumn" Type="Int32" Nullable="false" />
+          <Property Name="IDFuelType" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="FuelType" Relationship="gr672_pgvModel.FK_RefuelingGun_FuelType" FromRole="RefuelingGun" ToRole="FuelType" />
+          <NavigationProperty Name="Refueling" Relationship="gr672_pgvModel.FK_Refueling_RefuelingGun" FromRole="RefuelingGun" ToRole="Refueling" />
+          <NavigationProperty Name="RefuelingColumn" Relationship="gr672_pgvModel.FK_RefuelingGun_RefuelingColumn" FromRole="RefuelingGun" ToRole="RefuelingColumn" />
+        </EntityType>
+        <Association Name="FK_Car_Client">
+          <End Type="gr672_pgvModel.Client" Role="Client" Multiplicity="0..1" />
+          <End Type="gr672_pgvModel.Car" Role="Car" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Client">
+              <PropertyRef Name="ClientID" />
+            </Principal>
+            <Dependent Role="Car">
+              <PropertyRef Name="IDClient" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Refueling_Car">
+          <End Type="gr672_pgvModel.Car" Role="Car" Multiplicity="0..1" />
+          <End Type="gr672_pgvModel.Refueling" Role="Refueling" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Car">
+              <PropertyRef Name="CarID" />
+            </Principal>
+            <Dependent Role="Refueling">
+              <PropertyRef Name="IDCar" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Card_CardIssuer">
+          <End Type="gr672_pgvModel.CardIssuer" Role="CardIssuer" Multiplicity="0..1" />
+          <End Type="gr672_pgvModel.Card" Role="Card" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="CardIssuer">
+              <PropertyRef Name="CardIssuerID" />
+            </Principal>
+            <Dependent Role="Card">
+              <PropertyRef Name="IDCardIssuer" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Card_CardType">
+          <End Type="gr672_pgvModel.CardType" Role="CardType" Multiplicity="1" />
+          <End Type="gr672_pgvModel.Card" Role="Card" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="CardType">
+              <PropertyRef Name="CardTypeID" />
+            </Principal>
+            <Dependent Role="Card">
+              <PropertyRef Name="IDCardType" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Card_Client">
+          <End Type="gr672_pgvModel.Client" Role="Client" Multiplicity="1" />
+          <End Type="gr672_pgvModel.Card" Role="Card" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Client">
+              <PropertyRef Name="ClientID" />
+            </Principal>
+            <Dependent Role="Card">
+              <PropertyRef Name="IDHolder" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Payment_Card">
+          <End Type="gr672_pgvModel.Card" Role="Card" Multiplicity="1" />
+          <End Type="gr672_pgvModel.Payment" Role="Payment" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Card">
+              <PropertyRef Name="CardID" />
+            </Principal>
+            <Dependent Role="Payment">
+              <PropertyRef Name="IDCard" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Refueling_DataOfCamera">
+          <End Type="gr672_pgvModel.DataOfCamera" Role="DataOfCamera" Multiplicity="0..1" />
+          <End Type="gr672_pgvModel.Refueling" Role="Refueling" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="DataOfCamera">
+              <PropertyRef Name="DataOfCameraID" />
+            </Principal>
+            <Dependent Role="Refueling">
+              <PropertyRef Name="IDDataOfCamera" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
         <Association Name="FK_FuelInGasStation_TypeOfFuel">
           <End Type="gr672_pgvModel.FuelType" Role="FuelType" Multiplicity="1" />
           <End Type="gr672_pgvModel.FuelTypeOnGasStation" Role="FuelTypeOnGasStation" Multiplicity="*" />
@@ -123,6 +671,18 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
+        <Association Name="FK_RefuelingGun_FuelType">
+          <End Type="gr672_pgvModel.FuelType" Role="FuelType" Multiplicity="1" />
+          <End Type="gr672_pgvModel.RefuelingGun" Role="RefuelingGun" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="FuelType">
+              <PropertyRef Name="FuelTypeID" />
+            </Principal>
+            <Dependent Role="RefuelingGun">
+              <PropertyRef Name="IDFuelType" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
         <Association Name="FK_FuelInGasStation_GasStation">
           <End Type="gr672_pgvModel.GasStation" Role="GasStation" Multiplicity="1" />
           <End Type="gr672_pgvModel.FuelTypeOnGasStation" Role="FuelTypeOnGasStation" Multiplicity="*" />
@@ -135,12 +695,119 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
+        <Association Name="FK_RefuelingColumn_GasStation">
+          <End Type="gr672_pgvModel.GasStation" Role="GasStation" Multiplicity="1" />
+          <End Type="gr672_pgvModel.RefuelingColumn" Role="RefuelingColumn" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="GasStation">
+              <PropertyRef Name="GasStationID" />
+            </Principal>
+            <Dependent Role="RefuelingColumn">
+              <PropertyRef Name="IDGasStation" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Payment_Refueling">
+          <End Type="gr672_pgvModel.Refueling" Role="Refueling" Multiplicity="1" />
+          <End Type="gr672_pgvModel.Payment" Role="Payment" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Refueling">
+              <PropertyRef Name="RefuelingID" />
+            </Principal>
+            <Dependent Role="Payment">
+              <PropertyRef Name="IDRefueling" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Refueling_RefuelingGun">
+          <End Type="gr672_pgvModel.RefuelingGun" Role="RefuelingGun" Multiplicity="1" />
+          <End Type="gr672_pgvModel.Refueling" Role="Refueling" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="RefuelingGun">
+              <PropertyRef Name="RefuelingGunID" />
+            </Principal>
+            <Dependent Role="Refueling">
+              <PropertyRef Name="IDRefulingGun" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_RefuelingGun_RefuelingColumn">
+          <End Type="gr672_pgvModel.RefuelingColumn" Role="RefuelingColumn" Multiplicity="1" />
+          <End Type="gr672_pgvModel.RefuelingGun" Role="RefuelingGun" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="RefuelingColumn">
+              <PropertyRef Name="RefuelingColumnID" />
+            </Principal>
+            <Dependent Role="RefuelingGun">
+              <PropertyRef Name="IDRefuelingColumn" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
         </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
     <edmx:Mappings>
       <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
         <EntityContainerMapping StorageEntityContainer="Хранилище gr672_pgvModelContainer" CdmEntityContainer="gr672_pgvEntities">
+          <EntitySetMapping Name="Car">
+            <EntityTypeMapping TypeName="gr672_pgvModel.Car">
+              <MappingFragment StoreEntitySet="Car">
+                <ScalarProperty Name="IDClient" ColumnName="IDClient" />
+                <ScalarProperty Name="VolumeTank" ColumnName="VolumeTank" />
+                <ScalarProperty Name="CarNumber" ColumnName="CarNumber" />
+                <ScalarProperty Name="CarID" ColumnName="CarID" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Card">
+            <EntityTypeMapping TypeName="gr672_pgvModel.Card">
+              <MappingFragment StoreEntitySet="Card">
+                <ScalarProperty Name="IDHolder" ColumnName="IDHolder" />
+                <ScalarProperty Name="IDCardIssuer" ColumnName="IDCardIssuer" />
+                <ScalarProperty Name="IDCardType" ColumnName="IDCardType" />
+                <ScalarProperty Name="Balance" ColumnName="Balance" />
+                <ScalarProperty Name="CardExpDate" ColumnName="CardExpDate" />
+                <ScalarProperty Name="NumberCard" ColumnName="NumberCard" />
+                <ScalarProperty Name="CardID" ColumnName="CardID" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="CardIssuer">
+            <EntityTypeMapping TypeName="gr672_pgvModel.CardIssuer">
+              <MappingFragment StoreEntitySet="CardIssuer">
+                <ScalarProperty Name="NameCardIssuer" ColumnName="NameCardIssuer" />
+                <ScalarProperty Name="CardIssuerID" ColumnName="CardIssuerID" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="CardType">
+            <EntityTypeMapping TypeName="gr672_pgvModel.CardType">
+              <MappingFragment StoreEntitySet="CardType">
+                <ScalarProperty Name="NameType" ColumnName="NameType" />
+                <ScalarProperty Name="CardTypeID" ColumnName="CardTypeID" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Client">
+            <EntityTypeMapping TypeName="gr672_pgvModel.Client">
+              <MappingFragment StoreEntitySet="Client">
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="LastName" ColumnName="LastName" />
+                <ScalarProperty Name="ClientID" ColumnName="ClientID" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="DataOfCamera">
+            <EntityTypeMapping TypeName="gr672_pgvModel.DataOfCamera">
+              <MappingFragment StoreEntitySet="DataOfCamera">
+                <ScalarProperty Name="NameImage" ColumnName="NameImage" />
+                <ScalarProperty Name="CarNumber" ColumnName="CarNumber" />
+                <ScalarProperty Name="Status" ColumnName="Status" />
+                <ScalarProperty Name="Date" ColumnName="Date" />
+                <ScalarProperty Name="DataOfCameraID" ColumnName="DataOfCameraID" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
           <EntitySetMapping Name="FuelType">
             <EntityTypeMapping TypeName="gr672_pgvModel.FuelType">
               <MappingFragment StoreEntitySet="FuelType">
@@ -167,6 +834,47 @@
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
+          <EntitySetMapping Name="Payment">
+            <EntityTypeMapping TypeName="gr672_pgvModel.Payment">
+              <MappingFragment StoreEntitySet="Payment">
+                <ScalarProperty Name="IDCard" ColumnName="IDCard" />
+                <ScalarProperty Name="TransactionCode" ColumnName="TransactionCode" />
+                <ScalarProperty Name="Status" ColumnName="Status" />
+                <ScalarProperty Name="PriceRefueling" ColumnName="PriceRefueling" />
+                <ScalarProperty Name="IDRefueling" ColumnName="IDRefueling" />
+                <ScalarProperty Name="PaymentID" ColumnName="PaymentID" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Refueling">
+            <EntityTypeMapping TypeName="gr672_pgvModel.Refueling">
+              <MappingFragment StoreEntitySet="Refueling">
+                <ScalarProperty Name="IDRefulingGun" ColumnName="IDRefulingGun" />
+                <ScalarProperty Name="KeySession" ColumnName="KeySession" />
+                <ScalarProperty Name="IDDataOfCamera" ColumnName="IDDataOfCamera" />
+                <ScalarProperty Name="VolumeFuel" ColumnName="VolumeFuel" />
+                <ScalarProperty Name="IDCar" ColumnName="IDCar" />
+                <ScalarProperty Name="RefuelingID" ColumnName="RefuelingID" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="RefuelingColumn">
+            <EntityTypeMapping TypeName="gr672_pgvModel.RefuelingColumn">
+              <MappingFragment StoreEntitySet="RefuelingColumn">
+                <ScalarProperty Name="IDGasStation" ColumnName="IDGasStation" />
+                <ScalarProperty Name="RefuelingColumnID" ColumnName="RefuelingColumnID" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="RefuelingGun">
+            <EntityTypeMapping TypeName="gr672_pgvModel.RefuelingGun">
+              <MappingFragment StoreEntitySet="RefuelingGun">
+                <ScalarProperty Name="IDFuelType" ColumnName="IDFuelType" />
+                <ScalarProperty Name="IDRefuelingColumn" ColumnName="IDRefuelingColumn" />
+                <ScalarProperty Name="RefuelingGunID" ColumnName="RefuelingGunID" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
         </EntityContainerMapping>
       </Mapping>
     </edmx:Mappings>

+ 25 - 3
Server/GasStationModel.edmx.diagram

@@ -5,11 +5,33 @@
     <!-- Diagram content (shape and connector positions) -->
     <edmx:Diagrams>
       <Diagram DiagramId="f4e9d5c7c118418dbeec7f2029dd3ae0" Name="Diagram1">
-        <EntityTypeShape EntityType="gr672_pgvModel.FuelType" Width="1.5" PointX="0.75" PointY="5.25" />
-        <EntityTypeShape EntityType="gr672_pgvModel.FuelTypeOnGasStation" Width="1.5" PointX="3" PointY="0.875" />
-        <EntityTypeShape EntityType="gr672_pgvModel.GasStation" Width="1.5" PointX="0.75" PointY="1.25" />
+        <EntityTypeShape EntityType="gr672_pgvModel.Car" Width="1.5" PointX="5.25" PointY="10" />
+        <EntityTypeShape EntityType="gr672_pgvModel.Card" Width="1.5" PointX="7.5" PointY="14" />
+        <EntityTypeShape EntityType="gr672_pgvModel.CardIssuer" Width="1.5" PointX="5.25" PointY="16" />
+        <EntityTypeShape EntityType="gr672_pgvModel.CardType" Width="1.5" PointX="5.25" PointY="13.625" />
+        <EntityTypeShape EntityType="gr672_pgvModel.Client" Width="1.5" PointX="3" PointY="10" />
+        <EntityTypeShape EntityType="gr672_pgvModel.DataOfCamera" Width="1.5" PointX="5.25" PointY="3" />
+        <EntityTypeShape EntityType="gr672_pgvModel.FuelType" Width="1.5" PointX="0.75" PointY="0.75" />
+        <EntityTypeShape EntityType="gr672_pgvModel.FuelTypeOnGasStation" Width="1.5" PointX="3" PointY="3.5" />
+        <EntityTypeShape EntityType="gr672_pgvModel.GasStation" Width="1.5" PointX="0.75" PointY="3.75" />
+        <EntityTypeShape EntityType="gr672_pgvModel.Payment" Width="1.5" PointX="9.75" PointY="6.25" />
+        <EntityTypeShape EntityType="gr672_pgvModel.Refueling" Width="1.5" PointX="7.5" PointY="6.125" />
+        <EntityTypeShape EntityType="gr672_pgvModel.RefuelingColumn" Width="1.5" PointX="3" PointY="6.625" />
+        <EntityTypeShape EntityType="gr672_pgvModel.RefuelingGun" Width="1.5" PointX="5.25" PointY="6.5" />
+        <AssociationConnector Association="gr672_pgvModel.FK_Car_Client" />
+        <AssociationConnector Association="gr672_pgvModel.FK_Refueling_Car" />
+        <AssociationConnector Association="gr672_pgvModel.FK_Card_CardIssuer" />
+        <AssociationConnector Association="gr672_pgvModel.FK_Card_CardType" />
+        <AssociationConnector Association="gr672_pgvModel.FK_Card_Client" />
+        <AssociationConnector Association="gr672_pgvModel.FK_Payment_Card" />
+        <AssociationConnector Association="gr672_pgvModel.FK_Refueling_DataOfCamera" />
         <AssociationConnector Association="gr672_pgvModel.FK_FuelInGasStation_TypeOfFuel" />
+        <AssociationConnector Association="gr672_pgvModel.FK_RefuelingGun_FuelType" />
         <AssociationConnector Association="gr672_pgvModel.FK_FuelInGasStation_GasStation" />
+        <AssociationConnector Association="gr672_pgvModel.FK_RefuelingColumn_GasStation" />
+        <AssociationConnector Association="gr672_pgvModel.FK_Payment_Refueling" />
+        <AssociationConnector Association="gr672_pgvModel.FK_Refueling_RefuelingGun" />
+        <AssociationConnector Association="gr672_pgvModel.FK_RefuelingGun_RefuelingColumn" />
       </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 27 - 0
Server/Payment.cs

@@ -0,0 +1,27 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Server
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Payment
+    {
+        public int PaymentID { get; set; }
+        public int IDRefueling { get; set; }
+        public decimal PriceRefueling { get; set; }
+        public bool Status { get; set; }
+        public string TransactionCode { get; set; }
+        public int IDCard { get; set; }
+    
+        public virtual Card Card { get; set; }
+        public virtual Refueling Refueling { get; set; }
+    }
+}

+ 58 - 0
Server/Program.cs

@@ -157,6 +157,64 @@ namespace Server
                     Console.WriteLine("Выполненно");
                 }
 
+                if (request.RawUrl.Contains("/FindOrAddCar") && request.HttpMethod == "POST")
+                {
+                    StreamReader reader = new StreamReader(request.InputStream, Encoding.UTF8);
+                    string Json = await reader.ReadToEndAsync();
+                    DataOfCamera dataOfCamera = JsonConvert.DeserializeObject<DataOfCamera>(Json);
+                    db.DataOfCamera.Add(dataOfCamera);
+                    Car FindCar = db.Car.FirstOrDefault(x => x.CarNumber == dataOfCamera.CarNumber);
+                    RootDataOfCar rootDataOfCar = new RootDataOfCar();
+                    if (FindCar == null)
+                    {
+                        Car ResponseCar = new Car { CarNumber = dataOfCamera.CarNumber, VolumeTank = null, IDClient = null};
+                        db.Car.Add(ResponseCar);
+                        db.SaveChanges();
+
+                        rootDataOfCar = new RootDataOfCar
+                        {
+                            CarID = ResponseCar.CarID,
+                            CarNumber = ResponseCar.CarNumber,
+                            VolumeTank = FindCar.VolumeTank,
+                            CardOfCars = null
+                        };
+                    }
+                    else
+                    {
+                        List<RootDataOfCard> CardOfCars = FindCar.IDClient is null ? null : new List<RootDataOfCard>();
+                        foreach (var item in FindCar.Client.Card.ToList())
+                        {
+                            CardOfCars.Add(new RootDataOfCard {
+                                CardID = item.CardID,
+                                CardExpDate = item.CardExpDate,
+                                Balance = item.Balance,
+                                CardHolder = item.Client.LastName + " " + item.Client.Name,
+                                IDCardIssuer = item.IDCardIssuer,
+                                IDCardType = item.IDCardType,
+                                NumberCard = item.NumberCard
+                            });
+                        }
+
+                        rootDataOfCar = new RootDataOfCar
+                        {
+                            CarID = FindCar.CarID,
+                            CarNumber = FindCar.CarNumber,
+                            VolumeTank = FindCar.VolumeTank,
+                            CardOfCars = CardOfCars
+                        };
+
+                    }
+                    Json = JsonConvert.SerializeObject(rootDataOfCar);
+                    HttpListenerResponse response = context.Response;
+                    byte[] buffer = Encoding.UTF8.GetBytes(Json);
+                    response.ContentLength64 = buffer.Length;
+                    Stream output = response.OutputStream;
+                    output.Write(buffer, 0, buffer.Length);
+                    output.Close();
+                    Console.WriteLine(Json);
+
+                }
+
             }
 
         }

+ 36 - 0
Server/Refueling.cs

@@ -0,0 +1,36 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Server
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Refueling
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public Refueling()
+        {
+            this.Payment = new HashSet<Payment>();
+        }
+    
+        public int RefuelingID { get; set; }
+        public Nullable<int> IDCar { get; set; }
+        public int VolumeFuel { get; set; }
+        public Nullable<int> IDDataOfCamera { get; set; }
+        public string KeySession { get; set; }
+        public int IDRefulingGun { get; set; }
+    
+        public virtual Car Car { get; set; }
+        public virtual DataOfCamera DataOfCamera { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Payment> Payment { get; set; }
+        public virtual RefuelingGun RefuelingGun { get; set; }
+    }
+}

+ 30 - 0
Server/RefuelingColumn.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Server
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class RefuelingColumn
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public RefuelingColumn()
+        {
+            this.RefuelingGun = new HashSet<RefuelingGun>();
+        }
+    
+        public int RefuelingColumnID { get; set; }
+        public int IDGasStation { get; set; }
+    
+        public virtual GasStation GasStation { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<RefuelingGun> RefuelingGun { get; set; }
+    }
+}

+ 32 - 0
Server/RefuelingGun.cs

@@ -0,0 +1,32 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Server
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class RefuelingGun
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public RefuelingGun()
+        {
+            this.Refueling = new HashSet<Refueling>();
+        }
+    
+        public int RefuelingGunID { get; set; }
+        public int IDRefuelingColumn { get; set; }
+        public int IDFuelType { get; set; }
+    
+        public virtual FuelType FuelType { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Refueling> Refueling { get; set; }
+        public virtual RefuelingColumn RefuelingColumn { get; set; }
+    }
+}

+ 16 - 0
Server/RootDataOfCar.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Server
+{
+    public class RootDataOfCar
+    {
+        public int CarID { get; set; }
+        public string CarNumber { get; set; }
+        public Nullable<int> VolumeTank { get; set; }
+        public List<RootDataOfCard> CardOfCars { get; set; }
+    }
+}

+ 20 - 0
Server/RootDataOfCard.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Server
+{
+   public class RootDataOfCard
+    {
+        public int CardID { get; set; }
+        public string NumberCard { get; set; }
+        public string CardExpDate { get; set; }
+        public decimal Balance { get; set; }
+        public int IDCardType { get; set; }
+        public Nullable<int> IDCardIssuer { get; set; }
+        public string CardHolder { get; set; }
+        
+    }
+}

+ 32 - 0
Server/Server.csproj

@@ -55,6 +55,24 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Car.cs">
+      <DependentUpon>GasStationModel.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Card.cs">
+      <DependentUpon>GasStationModel.tt</DependentUpon>
+    </Compile>
+    <Compile Include="CardIssuer.cs">
+      <DependentUpon>GasStationModel.tt</DependentUpon>
+    </Compile>
+    <Compile Include="CardType.cs">
+      <DependentUpon>GasStationModel.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Client.cs">
+      <DependentUpon>GasStationModel.tt</DependentUpon>
+    </Compile>
+    <Compile Include="DataOfCamera.cs">
+      <DependentUpon>GasStationModel.tt</DependentUpon>
+    </Compile>
     <Compile Include="FuelInCurrentGasStation.cs" />
     <Compile Include="FuelType.cs">
       <DependentUpon>GasStationModel.tt</DependentUpon>
@@ -80,8 +98,22 @@
       <DesignTime>True</DesignTime>
       <DependentUpon>GasStationModel.edmx</DependentUpon>
     </Compile>
+    <Compile Include="Payment.cs">
+      <DependentUpon>GasStationModel.tt</DependentUpon>
+    </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Refueling.cs">
+      <DependentUpon>GasStationModel.tt</DependentUpon>
+    </Compile>
+    <Compile Include="RefuelingColumn.cs">
+      <DependentUpon>GasStationModel.tt</DependentUpon>
+    </Compile>
+    <Compile Include="RefuelingGun.cs">
+      <DependentUpon>GasStationModel.tt</DependentUpon>
+    </Compile>
+    <Compile Include="RootDataOfCar.cs" />
+    <Compile Include="RootDataOfCard.cs" />
     <Compile Include="RootDataOfGasStation.cs" />
     <Compile Include="RootFuelInStation.cs" />
   </ItemGroup>

BIN=BIN
Server/bin/Debug/Server.exe


BIN=BIN
Server/bin/Debug/Server.pdb


+ 1 - 1
Server/obj/Debug/Server.csproj.CoreCompileInputs.cache

@@ -1 +1 @@
-7557e8579f2f188c0baa7975efd1b6b19c39aa2d
+5852a6fd78a0306b4829398c7ebe85e94f1f52ec

BIN=BIN
Server/obj/Debug/Server.csprojAssemblyReference.cache


BIN=BIN
Server/obj/Debug/Server.exe


BIN=BIN
Server/obj/Debug/Server.pdb


BIN=BIN
Server/obj/Debug/TempPE/GasStationModel.Designer.cs.dll


BIN=BIN
Server/obj/Debug/TempPE/GasStationModel.cs.dll


+ 316 - 0
Server/obj/Debug/edmxResourcesToEmbed/GasStationModel.csdl

@@ -1,18 +1,140 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Schema Namespace="gr672_pgvModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
   <EntityContainer Name="gr672_pgvEntities" annotation:LazyLoadingEnabled="true">
+    <EntitySet Name="Car" EntityType="gr672_pgvModel.Car" />
+    <EntitySet Name="Card" EntityType="gr672_pgvModel.Card" />
+    <EntitySet Name="CardIssuer" EntityType="gr672_pgvModel.CardIssuer" />
+    <EntitySet Name="CardType" EntityType="gr672_pgvModel.CardType" />
+    <EntitySet Name="Client" EntityType="gr672_pgvModel.Client" />
+    <EntitySet Name="DataOfCamera" EntityType="gr672_pgvModel.DataOfCamera" />
     <EntitySet Name="FuelType" EntityType="gr672_pgvModel.FuelType" />
     <EntitySet Name="FuelTypeOnGasStation" EntityType="gr672_pgvModel.FuelTypeOnGasStation" />
     <EntitySet Name="GasStation" EntityType="gr672_pgvModel.GasStation" />
+    <EntitySet Name="Payment" EntityType="gr672_pgvModel.Payment" />
+    <EntitySet Name="Refueling" EntityType="gr672_pgvModel.Refueling" />
+    <EntitySet Name="RefuelingColumn" EntityType="gr672_pgvModel.RefuelingColumn" />
+    <EntitySet Name="RefuelingGun" EntityType="gr672_pgvModel.RefuelingGun" />
+    <AssociationSet Name="FK_Car_Client" Association="gr672_pgvModel.FK_Car_Client">
+      <End Role="Client" EntitySet="Client" />
+      <End Role="Car" EntitySet="Car" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Refueling_Car" Association="gr672_pgvModel.FK_Refueling_Car">
+      <End Role="Car" EntitySet="Car" />
+      <End Role="Refueling" EntitySet="Refueling" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Card_CardIssuer" Association="gr672_pgvModel.FK_Card_CardIssuer">
+      <End Role="CardIssuer" EntitySet="CardIssuer" />
+      <End Role="Card" EntitySet="Card" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Card_CardType" Association="gr672_pgvModel.FK_Card_CardType">
+      <End Role="CardType" EntitySet="CardType" />
+      <End Role="Card" EntitySet="Card" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Card_Client" Association="gr672_pgvModel.FK_Card_Client">
+      <End Role="Client" EntitySet="Client" />
+      <End Role="Card" EntitySet="Card" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Payment_Card" Association="gr672_pgvModel.FK_Payment_Card">
+      <End Role="Card" EntitySet="Card" />
+      <End Role="Payment" EntitySet="Payment" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Refueling_DataOfCamera" Association="gr672_pgvModel.FK_Refueling_DataOfCamera">
+      <End Role="DataOfCamera" EntitySet="DataOfCamera" />
+      <End Role="Refueling" EntitySet="Refueling" />
+    </AssociationSet>
     <AssociationSet Name="FK_FuelInGasStation_TypeOfFuel" Association="gr672_pgvModel.FK_FuelInGasStation_TypeOfFuel">
       <End Role="FuelType" EntitySet="FuelType" />
       <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
     </AssociationSet>
+    <AssociationSet Name="FK_RefuelingGun_FuelType" Association="gr672_pgvModel.FK_RefuelingGun_FuelType">
+      <End Role="FuelType" EntitySet="FuelType" />
+      <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+    </AssociationSet>
     <AssociationSet Name="FK_FuelInGasStation_GasStation" Association="gr672_pgvModel.FK_FuelInGasStation_GasStation">
       <End Role="GasStation" EntitySet="GasStation" />
       <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
     </AssociationSet>
+    <AssociationSet Name="FK_RefuelingColumn_GasStation" Association="gr672_pgvModel.FK_RefuelingColumn_GasStation">
+      <End Role="GasStation" EntitySet="GasStation" />
+      <End Role="RefuelingColumn" EntitySet="RefuelingColumn" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Payment_Refueling" Association="gr672_pgvModel.FK_Payment_Refueling">
+      <End Role="Refueling" EntitySet="Refueling" />
+      <End Role="Payment" EntitySet="Payment" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Refueling_RefuelingGun" Association="gr672_pgvModel.FK_Refueling_RefuelingGun">
+      <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+      <End Role="Refueling" EntitySet="Refueling" />
+    </AssociationSet>
+    <AssociationSet Name="FK_RefuelingGun_RefuelingColumn" Association="gr672_pgvModel.FK_RefuelingGun_RefuelingColumn">
+      <End Role="RefuelingColumn" EntitySet="RefuelingColumn" />
+      <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+    </AssociationSet>
   </EntityContainer>
+  <EntityType Name="Car">
+    <Key>
+      <PropertyRef Name="CarID" />
+    </Key>
+    <Property Name="CarID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="CarNumber" Type="String" Nullable="false" MaxLength="9" FixedLength="false" Unicode="true" />
+    <Property Name="VolumeTank" Type="Int32" />
+    <Property Name="IDClient" Type="Int32" />
+    <NavigationProperty Name="Client" Relationship="gr672_pgvModel.FK_Car_Client" FromRole="Car" ToRole="Client" />
+    <NavigationProperty Name="Refueling" Relationship="gr672_pgvModel.FK_Refueling_Car" FromRole="Car" ToRole="Refueling" />
+  </EntityType>
+  <EntityType Name="Card">
+    <Key>
+      <PropertyRef Name="CardID" />
+    </Key>
+    <Property Name="CardID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="NumberCard" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
+    <Property Name="CardExpDate" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="true" />
+    <Property Name="Balance" Type="Decimal" Nullable="false" Precision="19" Scale="4" />
+    <Property Name="IDCardType" Type="Int32" Nullable="false" />
+    <Property Name="IDCardIssuer" Type="Int32" />
+    <Property Name="IDHolder" Type="Int32" Nullable="false" />
+    <NavigationProperty Name="CardIssuer" Relationship="gr672_pgvModel.FK_Card_CardIssuer" FromRole="Card" ToRole="CardIssuer" />
+    <NavigationProperty Name="CardType" Relationship="gr672_pgvModel.FK_Card_CardType" FromRole="Card" ToRole="CardType" />
+    <NavigationProperty Name="Client" Relationship="gr672_pgvModel.FK_Card_Client" FromRole="Card" ToRole="Client" />
+    <NavigationProperty Name="Payment" Relationship="gr672_pgvModel.FK_Payment_Card" FromRole="Card" ToRole="Payment" />
+  </EntityType>
+  <EntityType Name="CardIssuer">
+    <Key>
+      <PropertyRef Name="CardIssuerID" />
+    </Key>
+    <Property Name="CardIssuerID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="NameCardIssuer" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
+    <NavigationProperty Name="Card" Relationship="gr672_pgvModel.FK_Card_CardIssuer" FromRole="CardIssuer" ToRole="Card" />
+  </EntityType>
+  <EntityType Name="CardType">
+    <Key>
+      <PropertyRef Name="CardTypeID" />
+    </Key>
+    <Property Name="CardTypeID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="NameType" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
+    <NavigationProperty Name="Card" Relationship="gr672_pgvModel.FK_Card_CardType" FromRole="CardType" ToRole="Card" />
+  </EntityType>
+  <EntityType Name="Client">
+    <Key>
+      <PropertyRef Name="ClientID" />
+    </Key>
+    <Property Name="ClientID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="LastName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
+    <Property Name="Name" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
+    <NavigationProperty Name="Car" Relationship="gr672_pgvModel.FK_Car_Client" FromRole="Client" ToRole="Car" />
+    <NavigationProperty Name="Card" Relationship="gr672_pgvModel.FK_Card_Client" FromRole="Client" ToRole="Card" />
+  </EntityType>
+  <EntityType Name="DataOfCamera">
+    <Key>
+      <PropertyRef Name="DataOfCameraID" />
+    </Key>
+    <Property Name="DataOfCameraID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="Date" Type="DateTime" Nullable="false" Precision="3" />
+    <Property Name="Status" Type="Boolean" Nullable="false" />
+    <Property Name="CarNumber" Type="String" MaxLength="9" FixedLength="false" Unicode="true" />
+    <Property Name="NameImage" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
+    <NavigationProperty Name="Refueling" Relationship="gr672_pgvModel.FK_Refueling_DataOfCamera" FromRole="DataOfCamera" ToRole="Refueling" />
+  </EntityType>
   <EntityType Name="FuelType">
     <Key>
       <PropertyRef Name="FuelTypeID" />
@@ -20,6 +142,7 @@
     <Property Name="FuelTypeID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
     <Property Name="NameFuelType" Type="String" Nullable="false" MaxLength="2" FixedLength="false" Unicode="true" />
     <NavigationProperty Name="FuelTypeOnGasStation" Relationship="gr672_pgvModel.FK_FuelInGasStation_TypeOfFuel" FromRole="FuelType" ToRole="FuelTypeOnGasStation" />
+    <NavigationProperty Name="RefuelingGun" Relationship="gr672_pgvModel.FK_RefuelingGun_FuelType" FromRole="FuelType" ToRole="RefuelingGun" />
   </EntityType>
   <EntityType Name="FuelTypeOnGasStation">
     <Key>
@@ -40,7 +163,140 @@
     <Property Name="GasStationID" Type="Int32" Nullable="false" />
     <Property Name="Address" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
     <NavigationProperty Name="FuelTypeOnGasStation" Relationship="gr672_pgvModel.FK_FuelInGasStation_GasStation" FromRole="GasStation" ToRole="FuelTypeOnGasStation" />
+    <NavigationProperty Name="RefuelingColumn" Relationship="gr672_pgvModel.FK_RefuelingColumn_GasStation" FromRole="GasStation" ToRole="RefuelingColumn" />
+  </EntityType>
+  <EntityType Name="Payment">
+    <Key>
+      <PropertyRef Name="PaymentID" />
+    </Key>
+    <Property Name="PaymentID" Type="Int32" Nullable="false" />
+    <Property Name="IDRefueling" Type="Int32" Nullable="false" />
+    <Property Name="PriceRefueling" Type="Decimal" Nullable="false" Precision="19" Scale="4" />
+    <Property Name="Status" Type="Boolean" Nullable="false" />
+    <Property Name="TransactionCode" Type="String" Nullable="false" MaxLength="17" FixedLength="false" Unicode="true" />
+    <Property Name="IDCard" Type="Int32" Nullable="false" />
+    <NavigationProperty Name="Card" Relationship="gr672_pgvModel.FK_Payment_Card" FromRole="Payment" ToRole="Card" />
+    <NavigationProperty Name="Refueling" Relationship="gr672_pgvModel.FK_Payment_Refueling" FromRole="Payment" ToRole="Refueling" />
+  </EntityType>
+  <EntityType Name="Refueling">
+    <Key>
+      <PropertyRef Name="RefuelingID" />
+    </Key>
+    <Property Name="RefuelingID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="IDCar" Type="Int32" />
+    <Property Name="VolumeFuel" Type="Int32" Nullable="false" />
+    <Property Name="IDDataOfCamera" Type="Int32" />
+    <Property Name="KeySession" Type="String" Nullable="false" MaxLength="12" FixedLength="false" Unicode="true" />
+    <Property Name="IDRefulingGun" Type="Int32" Nullable="false" />
+    <NavigationProperty Name="Car" Relationship="gr672_pgvModel.FK_Refueling_Car" FromRole="Refueling" ToRole="Car" />
+    <NavigationProperty Name="DataOfCamera" Relationship="gr672_pgvModel.FK_Refueling_DataOfCamera" FromRole="Refueling" ToRole="DataOfCamera" />
+    <NavigationProperty Name="Payment" Relationship="gr672_pgvModel.FK_Payment_Refueling" FromRole="Refueling" ToRole="Payment" />
+    <NavigationProperty Name="RefuelingGun" Relationship="gr672_pgvModel.FK_Refueling_RefuelingGun" FromRole="Refueling" ToRole="RefuelingGun" />
+  </EntityType>
+  <EntityType Name="RefuelingColumn">
+    <Key>
+      <PropertyRef Name="RefuelingColumnID" />
+    </Key>
+    <Property Name="RefuelingColumnID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="IDGasStation" Type="Int32" Nullable="false" />
+    <NavigationProperty Name="GasStation" Relationship="gr672_pgvModel.FK_RefuelingColumn_GasStation" FromRole="RefuelingColumn" ToRole="GasStation" />
+    <NavigationProperty Name="RefuelingGun" Relationship="gr672_pgvModel.FK_RefuelingGun_RefuelingColumn" FromRole="RefuelingColumn" ToRole="RefuelingGun" />
+  </EntityType>
+  <EntityType Name="RefuelingGun">
+    <Key>
+      <PropertyRef Name="RefuelingGunID" />
+    </Key>
+    <Property Name="RefuelingGunID" Type="Int32" Nullable="false" />
+    <Property Name="IDRefuelingColumn" Type="Int32" Nullable="false" />
+    <Property Name="IDFuelType" Type="Int32" Nullable="false" />
+    <NavigationProperty Name="FuelType" Relationship="gr672_pgvModel.FK_RefuelingGun_FuelType" FromRole="RefuelingGun" ToRole="FuelType" />
+    <NavigationProperty Name="Refueling" Relationship="gr672_pgvModel.FK_Refueling_RefuelingGun" FromRole="RefuelingGun" ToRole="Refueling" />
+    <NavigationProperty Name="RefuelingColumn" Relationship="gr672_pgvModel.FK_RefuelingGun_RefuelingColumn" FromRole="RefuelingGun" ToRole="RefuelingColumn" />
   </EntityType>
+  <Association Name="FK_Car_Client">
+    <End Type="gr672_pgvModel.Client" Role="Client" Multiplicity="0..1" />
+    <End Type="gr672_pgvModel.Car" Role="Car" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Client">
+        <PropertyRef Name="ClientID" />
+      </Principal>
+      <Dependent Role="Car">
+        <PropertyRef Name="IDClient" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Refueling_Car">
+    <End Type="gr672_pgvModel.Car" Role="Car" Multiplicity="0..1" />
+    <End Type="gr672_pgvModel.Refueling" Role="Refueling" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Car">
+        <PropertyRef Name="CarID" />
+      </Principal>
+      <Dependent Role="Refueling">
+        <PropertyRef Name="IDCar" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Card_CardIssuer">
+    <End Type="gr672_pgvModel.CardIssuer" Role="CardIssuer" Multiplicity="0..1" />
+    <End Type="gr672_pgvModel.Card" Role="Card" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="CardIssuer">
+        <PropertyRef Name="CardIssuerID" />
+      </Principal>
+      <Dependent Role="Card">
+        <PropertyRef Name="IDCardIssuer" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Card_CardType">
+    <End Type="gr672_pgvModel.CardType" Role="CardType" Multiplicity="1" />
+    <End Type="gr672_pgvModel.Card" Role="Card" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="CardType">
+        <PropertyRef Name="CardTypeID" />
+      </Principal>
+      <Dependent Role="Card">
+        <PropertyRef Name="IDCardType" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Card_Client">
+    <End Type="gr672_pgvModel.Client" Role="Client" Multiplicity="1" />
+    <End Type="gr672_pgvModel.Card" Role="Card" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Client">
+        <PropertyRef Name="ClientID" />
+      </Principal>
+      <Dependent Role="Card">
+        <PropertyRef Name="IDHolder" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Payment_Card">
+    <End Type="gr672_pgvModel.Card" Role="Card" Multiplicity="1" />
+    <End Type="gr672_pgvModel.Payment" Role="Payment" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Card">
+        <PropertyRef Name="CardID" />
+      </Principal>
+      <Dependent Role="Payment">
+        <PropertyRef Name="IDCard" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Refueling_DataOfCamera">
+    <End Type="gr672_pgvModel.DataOfCamera" Role="DataOfCamera" Multiplicity="0..1" />
+    <End Type="gr672_pgvModel.Refueling" Role="Refueling" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="DataOfCamera">
+        <PropertyRef Name="DataOfCameraID" />
+      </Principal>
+      <Dependent Role="Refueling">
+        <PropertyRef Name="IDDataOfCamera" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
   <Association Name="FK_FuelInGasStation_TypeOfFuel">
     <End Type="gr672_pgvModel.FuelType" Role="FuelType" Multiplicity="1" />
     <End Type="gr672_pgvModel.FuelTypeOnGasStation" Role="FuelTypeOnGasStation" Multiplicity="*" />
@@ -53,6 +309,18 @@
       </Dependent>
     </ReferentialConstraint>
   </Association>
+  <Association Name="FK_RefuelingGun_FuelType">
+    <End Type="gr672_pgvModel.FuelType" Role="FuelType" Multiplicity="1" />
+    <End Type="gr672_pgvModel.RefuelingGun" Role="RefuelingGun" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="FuelType">
+        <PropertyRef Name="FuelTypeID" />
+      </Principal>
+      <Dependent Role="RefuelingGun">
+        <PropertyRef Name="IDFuelType" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
   <Association Name="FK_FuelInGasStation_GasStation">
     <End Type="gr672_pgvModel.GasStation" Role="GasStation" Multiplicity="1" />
     <End Type="gr672_pgvModel.FuelTypeOnGasStation" Role="FuelTypeOnGasStation" Multiplicity="*" />
@@ -65,4 +333,52 @@
       </Dependent>
     </ReferentialConstraint>
   </Association>
+  <Association Name="FK_RefuelingColumn_GasStation">
+    <End Type="gr672_pgvModel.GasStation" Role="GasStation" Multiplicity="1" />
+    <End Type="gr672_pgvModel.RefuelingColumn" Role="RefuelingColumn" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="GasStation">
+        <PropertyRef Name="GasStationID" />
+      </Principal>
+      <Dependent Role="RefuelingColumn">
+        <PropertyRef Name="IDGasStation" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Payment_Refueling">
+    <End Type="gr672_pgvModel.Refueling" Role="Refueling" Multiplicity="1" />
+    <End Type="gr672_pgvModel.Payment" Role="Payment" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Refueling">
+        <PropertyRef Name="RefuelingID" />
+      </Principal>
+      <Dependent Role="Payment">
+        <PropertyRef Name="IDRefueling" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Refueling_RefuelingGun">
+    <End Type="gr672_pgvModel.RefuelingGun" Role="RefuelingGun" Multiplicity="1" />
+    <End Type="gr672_pgvModel.Refueling" Role="Refueling" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="RefuelingGun">
+        <PropertyRef Name="RefuelingGunID" />
+      </Principal>
+      <Dependent Role="Refueling">
+        <PropertyRef Name="IDRefulingGun" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_RefuelingGun_RefuelingColumn">
+    <End Type="gr672_pgvModel.RefuelingColumn" Role="RefuelingColumn" Multiplicity="1" />
+    <End Type="gr672_pgvModel.RefuelingGun" Role="RefuelingGun" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="RefuelingColumn">
+        <PropertyRef Name="RefuelingColumnID" />
+      </Principal>
+      <Dependent Role="RefuelingGun">
+        <PropertyRef Name="IDRefuelingColumn" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
 </Schema>

+ 100 - 0
Server/obj/Debug/edmxResourcesToEmbed/GasStationModel.msl

@@ -1,6 +1,65 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
   <EntityContainerMapping StorageEntityContainer="Хранилище gr672_pgvModelContainer" CdmEntityContainer="gr672_pgvEntities">
+    <EntitySetMapping Name="Car">
+      <EntityTypeMapping TypeName="gr672_pgvModel.Car">
+        <MappingFragment StoreEntitySet="Car">
+          <ScalarProperty Name="IDClient" ColumnName="IDClient" />
+          <ScalarProperty Name="VolumeTank" ColumnName="VolumeTank" />
+          <ScalarProperty Name="CarNumber" ColumnName="CarNumber" />
+          <ScalarProperty Name="CarID" ColumnName="CarID" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Card">
+      <EntityTypeMapping TypeName="gr672_pgvModel.Card">
+        <MappingFragment StoreEntitySet="Card">
+          <ScalarProperty Name="IDHolder" ColumnName="IDHolder" />
+          <ScalarProperty Name="IDCardIssuer" ColumnName="IDCardIssuer" />
+          <ScalarProperty Name="IDCardType" ColumnName="IDCardType" />
+          <ScalarProperty Name="Balance" ColumnName="Balance" />
+          <ScalarProperty Name="CardExpDate" ColumnName="CardExpDate" />
+          <ScalarProperty Name="NumberCard" ColumnName="NumberCard" />
+          <ScalarProperty Name="CardID" ColumnName="CardID" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="CardIssuer">
+      <EntityTypeMapping TypeName="gr672_pgvModel.CardIssuer">
+        <MappingFragment StoreEntitySet="CardIssuer">
+          <ScalarProperty Name="NameCardIssuer" ColumnName="NameCardIssuer" />
+          <ScalarProperty Name="CardIssuerID" ColumnName="CardIssuerID" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="CardType">
+      <EntityTypeMapping TypeName="gr672_pgvModel.CardType">
+        <MappingFragment StoreEntitySet="CardType">
+          <ScalarProperty Name="NameType" ColumnName="NameType" />
+          <ScalarProperty Name="CardTypeID" ColumnName="CardTypeID" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Client">
+      <EntityTypeMapping TypeName="gr672_pgvModel.Client">
+        <MappingFragment StoreEntitySet="Client">
+          <ScalarProperty Name="Name" ColumnName="Name" />
+          <ScalarProperty Name="LastName" ColumnName="LastName" />
+          <ScalarProperty Name="ClientID" ColumnName="ClientID" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="DataOfCamera">
+      <EntityTypeMapping TypeName="gr672_pgvModel.DataOfCamera">
+        <MappingFragment StoreEntitySet="DataOfCamera">
+          <ScalarProperty Name="NameImage" ColumnName="NameImage" />
+          <ScalarProperty Name="CarNumber" ColumnName="CarNumber" />
+          <ScalarProperty Name="Status" ColumnName="Status" />
+          <ScalarProperty Name="Date" ColumnName="Date" />
+          <ScalarProperty Name="DataOfCameraID" ColumnName="DataOfCameraID" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
     <EntitySetMapping Name="FuelType">
       <EntityTypeMapping TypeName="gr672_pgvModel.FuelType">
         <MappingFragment StoreEntitySet="FuelType">
@@ -27,5 +86,46 @@
         </MappingFragment>
       </EntityTypeMapping>
     </EntitySetMapping>
+    <EntitySetMapping Name="Payment">
+      <EntityTypeMapping TypeName="gr672_pgvModel.Payment">
+        <MappingFragment StoreEntitySet="Payment">
+          <ScalarProperty Name="IDCard" ColumnName="IDCard" />
+          <ScalarProperty Name="TransactionCode" ColumnName="TransactionCode" />
+          <ScalarProperty Name="Status" ColumnName="Status" />
+          <ScalarProperty Name="PriceRefueling" ColumnName="PriceRefueling" />
+          <ScalarProperty Name="IDRefueling" ColumnName="IDRefueling" />
+          <ScalarProperty Name="PaymentID" ColumnName="PaymentID" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Refueling">
+      <EntityTypeMapping TypeName="gr672_pgvModel.Refueling">
+        <MappingFragment StoreEntitySet="Refueling">
+          <ScalarProperty Name="IDRefulingGun" ColumnName="IDRefulingGun" />
+          <ScalarProperty Name="KeySession" ColumnName="KeySession" />
+          <ScalarProperty Name="IDDataOfCamera" ColumnName="IDDataOfCamera" />
+          <ScalarProperty Name="VolumeFuel" ColumnName="VolumeFuel" />
+          <ScalarProperty Name="IDCar" ColumnName="IDCar" />
+          <ScalarProperty Name="RefuelingID" ColumnName="RefuelingID" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="RefuelingColumn">
+      <EntityTypeMapping TypeName="gr672_pgvModel.RefuelingColumn">
+        <MappingFragment StoreEntitySet="RefuelingColumn">
+          <ScalarProperty Name="IDGasStation" ColumnName="IDGasStation" />
+          <ScalarProperty Name="RefuelingColumnID" ColumnName="RefuelingColumnID" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="RefuelingGun">
+      <EntityTypeMapping TypeName="gr672_pgvModel.RefuelingGun">
+        <MappingFragment StoreEntitySet="RefuelingGun">
+          <ScalarProperty Name="IDFuelType" ColumnName="IDFuelType" />
+          <ScalarProperty Name="IDRefuelingColumn" ColumnName="IDRefuelingColumn" />
+          <ScalarProperty Name="RefuelingGunID" ColumnName="RefuelingGunID" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
   </EntityContainerMapping>
 </Mapping>

+ 292 - 0
Server/obj/Debug/edmxResourcesToEmbed/GasStationModel.ssdl

@@ -1,5 +1,58 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Schema Namespace="Хранилище gr672_pgvModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
+  <EntityType Name="Car">
+    <Key>
+      <PropertyRef Name="CarID" />
+    </Key>
+    <Property Name="CarID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="CarNumber" Type="nvarchar" MaxLength="9" Nullable="false" />
+    <Property Name="VolumeTank" Type="int" />
+    <Property Name="IDClient" Type="int" />
+  </EntityType>
+  <EntityType Name="Card">
+    <Key>
+      <PropertyRef Name="CardID" />
+    </Key>
+    <Property Name="CardID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="NumberCard" Type="nvarchar" MaxLength="20" Nullable="false" />
+    <Property Name="CardExpDate" Type="nvarchar" MaxLength="10" Nullable="false" />
+    <Property Name="Balance" Type="money" Nullable="false" />
+    <Property Name="IDCardType" Type="int" Nullable="false" />
+    <Property Name="IDCardIssuer" Type="int" />
+    <Property Name="IDHolder" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="CardIssuer">
+    <Key>
+      <PropertyRef Name="CardIssuerID" />
+    </Key>
+    <Property Name="CardIssuerID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="NameCardIssuer" Type="nvarchar" MaxLength="50" Nullable="false" />
+  </EntityType>
+  <EntityType Name="CardType">
+    <Key>
+      <PropertyRef Name="CardTypeID" />
+    </Key>
+    <Property Name="CardTypeID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="NameType" Type="nvarchar" MaxLength="50" Nullable="false" />
+  </EntityType>
+  <EntityType Name="Client">
+    <Key>
+      <PropertyRef Name="ClientID" />
+    </Key>
+    <Property Name="ClientID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="LastName" Type="nvarchar" MaxLength="50" Nullable="false" />
+    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
+  </EntityType>
+  <EntityType Name="DataOfCamera">
+    <Key>
+      <PropertyRef Name="DataOfCameraID" />
+    </Key>
+    <Property Name="DataOfCameraID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="Date" Type="datetime" Nullable="false" />
+    <Property Name="Status" Type="bit" Nullable="false" />
+    <Property Name="CarNumber" Type="nvarchar" MaxLength="9" />
+    <Property Name="NameImage" Type="nvarchar(max)" Nullable="false" />
+  </EntityType>
   <EntityType Name="FuelType">
     <Key>
       <PropertyRef Name="FuelTypeID" />
@@ -24,6 +77,91 @@
     <Property Name="GasStationID" Type="int" Nullable="false" />
     <Property Name="Address" Type="nvarchar(max)" Nullable="false" />
   </EntityType>
+  <EntityType Name="Payment">
+    <Key>
+      <PropertyRef Name="PaymentID" />
+    </Key>
+    <Property Name="PaymentID" Type="int" Nullable="false" />
+    <Property Name="IDRefueling" Type="int" Nullable="false" />
+    <Property Name="PriceRefueling" Type="money" Nullable="false" />
+    <Property Name="Status" Type="bit" Nullable="false" />
+    <Property Name="TransactionCode" Type="nvarchar" MaxLength="17" Nullable="false" />
+    <Property Name="IDCard" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="Refueling">
+    <Key>
+      <PropertyRef Name="RefuelingID" />
+    </Key>
+    <Property Name="RefuelingID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="IDCar" Type="int" />
+    <Property Name="VolumeFuel" Type="int" Nullable="false" />
+    <Property Name="IDDataOfCamera" Type="int" />
+    <Property Name="KeySession" Type="nvarchar" MaxLength="12" Nullable="false" />
+    <Property Name="IDRefulingGun" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="RefuelingColumn">
+    <Key>
+      <PropertyRef Name="RefuelingColumnID" />
+    </Key>
+    <Property Name="RefuelingColumnID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="IDGasStation" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="RefuelingGun">
+    <Key>
+      <PropertyRef Name="RefuelingGunID" />
+    </Key>
+    <Property Name="RefuelingGunID" Type="int" Nullable="false" />
+    <Property Name="IDRefuelingColumn" Type="int" Nullable="false" />
+    <Property Name="IDFuelType" Type="int" Nullable="false" />
+  </EntityType>
+  <Association Name="FK_Car_Client">
+    <End Role="Client" Type="Self.Client" Multiplicity="0..1" />
+    <End Role="Car" Type="Self.Car" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Client">
+        <PropertyRef Name="ClientID" />
+      </Principal>
+      <Dependent Role="Car">
+        <PropertyRef Name="IDClient" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Card_CardIssuer">
+    <End Role="CardIssuer" Type="Self.CardIssuer" Multiplicity="0..1" />
+    <End Role="Card" Type="Self.Card" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="CardIssuer">
+        <PropertyRef Name="CardIssuerID" />
+      </Principal>
+      <Dependent Role="Card">
+        <PropertyRef Name="IDCardIssuer" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Card_CardType">
+    <End Role="CardType" Type="Self.CardType" Multiplicity="1" />
+    <End Role="Card" Type="Self.Card" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="CardType">
+        <PropertyRef Name="CardTypeID" />
+      </Principal>
+      <Dependent Role="Card">
+        <PropertyRef Name="IDCardType" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Card_Client">
+    <End Role="Client" Type="Self.Client" Multiplicity="1" />
+    <End Role="Card" Type="Self.Card" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Client">
+        <PropertyRef Name="ClientID" />
+      </Principal>
+      <Dependent Role="Card">
+        <PropertyRef Name="IDHolder" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
   <Association Name="FK_FuelInGasStation_GasStation">
     <End Role="GasStation" Type="Self.GasStation" Multiplicity="1" />
     <End Role="FuelTypeOnGasStation" Type="Self.FuelTypeOnGasStation" Multiplicity="*" />
@@ -48,10 +186,132 @@
       </Dependent>
     </ReferentialConstraint>
   </Association>
+  <Association Name="FK_Payment_Card">
+    <End Role="Card" Type="Self.Card" Multiplicity="1" />
+    <End Role="Payment" Type="Self.Payment" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Card">
+        <PropertyRef Name="CardID" />
+      </Principal>
+      <Dependent Role="Payment">
+        <PropertyRef Name="IDCard" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Payment_Refueling">
+    <End Role="Refueling" Type="Self.Refueling" Multiplicity="1" />
+    <End Role="Payment" Type="Self.Payment" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Refueling">
+        <PropertyRef Name="RefuelingID" />
+      </Principal>
+      <Dependent Role="Payment">
+        <PropertyRef Name="IDRefueling" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Refueling_Car">
+    <End Role="Car" Type="Self.Car" Multiplicity="0..1" />
+    <End Role="Refueling" Type="Self.Refueling" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Car">
+        <PropertyRef Name="CarID" />
+      </Principal>
+      <Dependent Role="Refueling">
+        <PropertyRef Name="IDCar" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Refueling_DataOfCamera">
+    <End Role="DataOfCamera" Type="Self.DataOfCamera" Multiplicity="0..1" />
+    <End Role="Refueling" Type="Self.Refueling" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="DataOfCamera">
+        <PropertyRef Name="DataOfCameraID" />
+      </Principal>
+      <Dependent Role="Refueling">
+        <PropertyRef Name="IDDataOfCamera" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Refueling_RefuelingGun">
+    <End Role="RefuelingGun" Type="Self.RefuelingGun" Multiplicity="1" />
+    <End Role="Refueling" Type="Self.Refueling" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="RefuelingGun">
+        <PropertyRef Name="RefuelingGunID" />
+      </Principal>
+      <Dependent Role="Refueling">
+        <PropertyRef Name="IDRefulingGun" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_RefuelingColumn_GasStation">
+    <End Role="GasStation" Type="Self.GasStation" Multiplicity="1" />
+    <End Role="RefuelingColumn" Type="Self.RefuelingColumn" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="GasStation">
+        <PropertyRef Name="GasStationID" />
+      </Principal>
+      <Dependent Role="RefuelingColumn">
+        <PropertyRef Name="IDGasStation" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_RefuelingGun_FuelType">
+    <End Role="FuelType" Type="Self.FuelType" Multiplicity="1" />
+    <End Role="RefuelingGun" Type="Self.RefuelingGun" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="FuelType">
+        <PropertyRef Name="FuelTypeID" />
+      </Principal>
+      <Dependent Role="RefuelingGun">
+        <PropertyRef Name="IDFuelType" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_RefuelingGun_RefuelingColumn">
+    <End Role="RefuelingColumn" Type="Self.RefuelingColumn" Multiplicity="1" />
+    <End Role="RefuelingGun" Type="Self.RefuelingGun" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="RefuelingColumn">
+        <PropertyRef Name="RefuelingColumnID" />
+      </Principal>
+      <Dependent Role="RefuelingGun">
+        <PropertyRef Name="IDRefuelingColumn" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
   <EntityContainer Name="Хранилище gr672_pgvModelContainer">
+    <EntitySet Name="Car" EntityType="Self.Car" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Card" EntityType="Self.Card" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="CardIssuer" EntityType="Self.CardIssuer" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="CardType" EntityType="Self.CardType" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Client" EntityType="Self.Client" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="DataOfCamera" EntityType="Self.DataOfCamera" Schema="dbo" store:Type="Tables" />
     <EntitySet Name="FuelType" EntityType="Self.FuelType" Schema="dbo" store:Type="Tables" />
     <EntitySet Name="FuelTypeOnGasStation" EntityType="Self.FuelTypeOnGasStation" Schema="dbo" store:Type="Tables" />
     <EntitySet Name="GasStation" EntityType="Self.GasStation" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Payment" EntityType="Self.Payment" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Refueling" EntityType="Self.Refueling" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="RefuelingColumn" EntityType="Self.RefuelingColumn" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="RefuelingGun" EntityType="Self.RefuelingGun" Schema="dbo" store:Type="Tables" />
+    <AssociationSet Name="FK_Car_Client" Association="Self.FK_Car_Client">
+      <End Role="Client" EntitySet="Client" />
+      <End Role="Car" EntitySet="Car" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Card_CardIssuer" Association="Self.FK_Card_CardIssuer">
+      <End Role="CardIssuer" EntitySet="CardIssuer" />
+      <End Role="Card" EntitySet="Card" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Card_CardType" Association="Self.FK_Card_CardType">
+      <End Role="CardType" EntitySet="CardType" />
+      <End Role="Card" EntitySet="Card" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Card_Client" Association="Self.FK_Card_Client">
+      <End Role="Client" EntitySet="Client" />
+      <End Role="Card" EntitySet="Card" />
+    </AssociationSet>
     <AssociationSet Name="FK_FuelInGasStation_GasStation" Association="Self.FK_FuelInGasStation_GasStation">
       <End Role="GasStation" EntitySet="GasStation" />
       <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
@@ -60,5 +320,37 @@
       <End Role="FuelType" EntitySet="FuelType" />
       <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
     </AssociationSet>
+    <AssociationSet Name="FK_Payment_Card" Association="Self.FK_Payment_Card">
+      <End Role="Card" EntitySet="Card" />
+      <End Role="Payment" EntitySet="Payment" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Payment_Refueling" Association="Self.FK_Payment_Refueling">
+      <End Role="Refueling" EntitySet="Refueling" />
+      <End Role="Payment" EntitySet="Payment" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Refueling_Car" Association="Self.FK_Refueling_Car">
+      <End Role="Car" EntitySet="Car" />
+      <End Role="Refueling" EntitySet="Refueling" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Refueling_DataOfCamera" Association="Self.FK_Refueling_DataOfCamera">
+      <End Role="DataOfCamera" EntitySet="DataOfCamera" />
+      <End Role="Refueling" EntitySet="Refueling" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Refueling_RefuelingGun" Association="Self.FK_Refueling_RefuelingGun">
+      <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+      <End Role="Refueling" EntitySet="Refueling" />
+    </AssociationSet>
+    <AssociationSet Name="FK_RefuelingColumn_GasStation" Association="Self.FK_RefuelingColumn_GasStation">
+      <End Role="GasStation" EntitySet="GasStation" />
+      <End Role="RefuelingColumn" EntitySet="RefuelingColumn" />
+    </AssociationSet>
+    <AssociationSet Name="FK_RefuelingGun_FuelType" Association="Self.FK_RefuelingGun_FuelType">
+      <End Role="FuelType" EntitySet="FuelType" />
+      <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+    </AssociationSet>
+    <AssociationSet Name="FK_RefuelingGun_RefuelingColumn" Association="Self.FK_RefuelingGun_RefuelingColumn">
+      <End Role="RefuelingColumn" EntitySet="RefuelingColumn" />
+      <End Role="RefuelingGun" EntitySet="RefuelingGun" />
+    </AssociationSet>
   </EntityContainer>
 </Schema>