Browse Source

Univate.2 > Additions to buy Timeshare

master
George Williams 4 years ago
parent
commit
d6c55d23aa

+ 3
- 1
UnivateProperties_API/Containers/Timeshare/WeekDto.cs View File

74
             Region = new RegionDto() { RegionCode = split[24].Trim() };
74
             Region = new RegionDto() { RegionCode = split[24].Trim() };
75
             IsTender = true;
75
             IsTender = true;
76
             ReferedByAgent = false;
76
             ReferedByAgent = false;
77
+            WeekType = ""; //TODO: Need to see how the data will come through from consoft. 
77
         }
78
         }
78
 
79
 
79
         public WeekDto(TimeshareWeek week)
80
         public WeekDto(TimeshareWeek week)
102
             SellPrice = week.SellPrice;
103
             SellPrice = week.SellPrice;
103
             IsTender = false;
104
             IsTender = false;
104
             ReferedByAgent = week.ReferedByAgent;
105
             ReferedByAgent = week.ReferedByAgent;
106
+            WeekType = week.WeekType.ToString();
105
         }
107
         }
106
 
108
 
107
         public int Id { get; set; }
109
         public int Id { get; set; }
126
         public double SellPrice { get; set; }
128
         public double SellPrice { get; set; }
127
         public bool IsTender { get; set; }
129
         public bool IsTender { get; set; }
128
         public bool ReferedByAgent { get; set; }
130
         public bool ReferedByAgent { get; set; }
129
-
131
+        public string WeekType { get; set; }
130
         public string Display => $"{Resort.Display}  ({ArrivalDate.ToShortDateString()} - {DepartureDate.ToShortDateString()})";
132
         public string Display => $"{Resort.Display}  ({ArrivalDate.ToShortDateString()} - {DepartureDate.ToShortDateString()})";
131
         public string WeekUni => $"{Resort.ResortCode}-{UnitNumber}-{WeekNumber}";
133
         public string WeekUni => $"{Resort.ResortCode}-{UnitNumber}-{WeekNumber}";
132
     }    
134
     }    

+ 8
- 0
UnivateProperties_API/Enums.cs View File

25
         Property,
25
         Property,
26
         Bid
26
         Bid
27
     }
27
     }
28
+
29
+    public enum WeekType
30
+    {
31
+        Flexi,
32
+        Fixed,
33
+        Module,
34
+        Syndicate
35
+    }
28
 }
36
 }

+ 1563
- 0
UnivateProperties_API/Migrations/20200904080501_WeekType added for weeks.Designer.cs
File diff suppressed because it is too large
View File


+ 23
- 0
UnivateProperties_API/Migrations/20200904080501_WeekType added for weeks.cs View File

1
+using Microsoft.EntityFrameworkCore.Migrations;
2
+
3
+namespace UnivateProperties_API.Migrations
4
+{
5
+    public partial class WeekTypeaddedforweeks : Migration
6
+    {
7
+        protected override void Up(MigrationBuilder migrationBuilder)
8
+        {
9
+            migrationBuilder.AddColumn<int>(
10
+                name: "WeekType",
11
+                table: "Weeks",
12
+                nullable: false,
13
+                defaultValue: 0);
14
+        }
15
+
16
+        protected override void Down(MigrationBuilder migrationBuilder)
17
+        {
18
+            migrationBuilder.DropColumn(
19
+                name: "WeekType",
20
+                table: "Weeks");
21
+        }
22
+    }
23
+}

+ 2
- 0
UnivateProperties_API/Migrations/DataContextModelSnapshot.cs View File

1023
 
1023
 
1024
                     b.Property<bool>("WeekPlacedForRental");
1024
                     b.Property<bool>("WeekPlacedForRental");
1025
 
1025
 
1026
+                    b.Property<int>("WeekType");
1027
+
1026
                     b.HasKey("Id");
1028
                     b.HasKey("Id");
1027
 
1029
 
1028
                     b.HasIndex("AgencyId");
1030
                     b.HasIndex("AgencyId");

+ 1
- 0
UnivateProperties_API/Model/Properties/Property.cs View File

34
         public string PostalCode { get; set; }
34
         public string PostalCode { get; set; }
35
         public string PropertCoords { get; set; }  
35
         public string PropertCoords { get; set; }  
36
         public string AddressURL { get; set; }
36
         public string AddressURL { get; set; }
37
+        public string PropertyRef { get; set; }
37
         public bool Published { get; set; }
38
         public bool Published { get; set; }
38
         public DateTime DatePublished { get; set; }
39
         public DateTime DatePublished { get; set; }
39
         public string VirtualTour { get; set; }
40
         public string VirtualTour { get; set; }

+ 2
- 0
UnivateProperties_API/Model/Timeshare/TimeshareWeek.cs View File

94
 
94
 
95
         [ForeignKey("Status")]
95
         [ForeignKey("Status")]
96
         public int StatusId { get; set; }
96
         public int StatusId { get; set; }
97
+
98
+        public WeekType WeekType { get; set; }
97
         #endregion
99
         #endregion
98
 
100
 
99
         #region Navigation
101
         #region Navigation

+ 1
- 1
UnivateProperties_API/appsettings.json View File

9
   },
9
   },
10
   "AllowedHosts": "*",
10
   "AllowedHosts": "*",
11
   "ConnectionStrings": {
11
   "ConnectionStrings": {
12
-    "DefaultConnection": "Data Source=192.168.0.219;Initial Catalog=UniVateDemo;Persist Security Info=True;User Id=Provision;Password=What123!;Pooling=false;",
12
+    "DefaultConnection": "Data Source=localhost;Initial Catalog=UniVateDemo;Persist Security Info=True;User Id=Provision;Password=What123!;Pooling=false;",
13
     "TenderConnection": "http://www.unipoint-consoft.co.za/nph-srep.exe?cluvavail_test.sch&CLUB=LPA&RESORT=ALL&SUMMARY=N&HEAD=N"
13
     "TenderConnection": "http://www.unipoint-consoft.co.za/nph-srep.exe?cluvavail_test.sch&CLUB=LPA&RESORT=ALL&SUMMARY=N&HEAD=N"
14
   }
14
   }
15
 }
15
 }

Loading…
Cancel
Save