Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TourDataManager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill
TourDataManager
Commits
7e6a3c71
Commit
7e6a3c71
authored
Oct 10, 2018
by
Kirill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
?
parent
1ab47d25
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
2 deletions
+75
-2
Db.cs
TourDataManager/Db.cs
+19
-2
Estate.cs
TourDataManager/Entities/Estate.cs
+21
-0
Tour.cs
TourDataManager/Entities/Tour.cs
+33
-0
TourDataManager.csproj
TourDataManager/TourDataManager.csproj
+2
-0
No files found.
TourDataManager/Db.cs
View file @
7e6a3c71
using
System
;
using
System
;
using
System.IO
;
using
System.IO
;
using
SQLite
;
using
SQLite
;
using
TourDataManager.Entities
;
namespace
TourDataManager
{
namespace
TourDataManager
{
...
@@ -28,8 +29,24 @@ namespace TourDataManager {
...
@@ -28,8 +29,24 @@ namespace TourDataManager {
var
databasePath
=
Path
.
Combine
(
rootPath
,
"sandbox.sqlite"
);
var
databasePath
=
Path
.
Combine
(
rootPath
,
"sandbox.sqlite"
);
var
db
=
new
SQLiteConnection
(
databasePath
);
var
db
=
new
SQLiteConnection
(
databasePath
);
db
.
CreateTable
<
Stock
>();
db
.
Execute
(
"PRAGMA foreign_keys=ON"
);
db
.
CreateTable
<
Valuation
>();
for
(
int
i
=
0
;
i
<
10
;
i
++){
db
.
Insert
(
new
Estate
{
Id
=
i
,
Title
=
$"Estate
{
i
}
"
,
Created
=
"Vchera"
,
TourCount
=
i
*
2
});
}
for
(
int
i
=
0
;
i
<
2
;
i
++){
db
.
Insert
(
new
Tour
{
Id
=
i
,
Title
=
$"Tour
{
i
}
"
,
Created
=
"1 year ago"
,
State
=
0
,
Type
=
"aws"
,
EstateId
=
3
});
}
}
}
}
}
...
...
TourDataManager/Entities/Estate.cs
0 → 100644
View file @
7e6a3c71
using
SQLite
;
namespace
TourDataManager.Entities
{
public
class
Estate
{
/// Идентификатор объекта недвижимости
[
PrimaryKey
]
public
long
Id
{
get
;
set
;
}
[
NotNull
]
public
string
Title
{
get
;
set
;
}
[
NotNull
]
public
int
TourCount
{
get
;
set
;
}
//cnt_tours
public
string
Preview
{
get
;
set
;
}
[
NotNull
]
public
string
Created
{
get
;
set
;
}
}
}
\ No newline at end of file
TourDataManager/Entities/Tour.cs
0 → 100644
View file @
7e6a3c71
using
SQLite
;
namespace
TourDataManager.Entities
{
public
class
Tour
{
[
PrimaryKey
]
public
long
Id
{
get
;
set
;
}
[
NotNull
]
public
string
Title
{
get
;
set
;
}
public
string
Preview
{
get
;
set
;
}
public
string
Screen
{
get
;
set
;
}
[
NotNull
]
public
int
EstateId
{
get
;
set
;
}
[
NotNull
]
public
string
Created
{
get
;
set
;
}
[
NotNull
]
public
string
Updated
{
get
;
set
;
}
[
NotNull
]
public
string
Type
{
get
;
set
;
}
/// Состояние тура
[
NotNull
]
public
int
State
{
get
;
set
;
}
}
}
\ No newline at end of file
TourDataManager/TourDataManager.csproj
View file @
7e6a3c71
...
@@ -116,6 +116,8 @@
...
@@ -116,6 +116,8 @@
<Compile
Include=
"CookieStorage.cs"
/>
<Compile
Include=
"CookieStorage.cs"
/>
<Compile
Include=
"Db.cs"
/>
<Compile
Include=
"Db.cs"
/>
<Compile
Include=
"Debug.cs"
/>
<Compile
Include=
"Debug.cs"
/>
<Compile
Include=
"Entities\Estate.cs"
/>
<Compile
Include=
"Entities\Tour.cs"
/>
<Compile
Include=
"IAuthenticator.cs"
/>
<Compile
Include=
"IAuthenticator.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"TourDataManager.cs"
/>
<Compile
Include=
"TourDataManager.cs"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment