浏览代码

Fix on timeshare weeks.

master
GJWilliams87 4 年前
父节点
当前提交
6b1e54efc2
共有 2 个文件被更改,包括 6 次插入5 次删除
  1. 2
    1
      UnivateProperties_API/Containers/Timeshare/WeekDto.cs
  2. 4
    4
      UnivateProperties_API/Startup.cs

+ 2
- 1
UnivateProperties_API/Containers/Timeshare/WeekDto.cs 查看文件

62
             bool currentYear = split[9].Trim() == "Y";
62
             bool currentYear = split[9].Trim() == "Y";
63
             string amt = split[5].Trim();
63
             string amt = split[5].Trim();
64
             amt = amt.Replace('.', ',');
64
             amt = amt.Replace('.', ',');
65
-            LevyAmount = Convert.ToDouble(amt);
65
+            if (double.TryParse(amt, out double dAmt))
66
+                LevyAmount = dAmt;
66
             DateTime tempDate = MyCommon.GetDateFromString(currentYear ? split[6].Trim() : split[13].Trim());
67
             DateTime tempDate = MyCommon.GetDateFromString(currentYear ? split[6].Trim() : split[13].Trim());
67
             if(tempDate != DateTime.MinValue)
68
             if(tempDate != DateTime.MinValue)
68
             {
69
             {

+ 4
- 4
UnivateProperties_API/Startup.cs 查看文件

181
         public void Configure(IApplicationBuilder app, IHostingEnvironment env)
181
         public void Configure(IApplicationBuilder app, IHostingEnvironment env)
182
         {
182
         {
183
             UpdateDatabase(app);
183
             UpdateDatabase(app);
184
-            if (env.IsDevelopment())
185
-            {
186
-                app.UseDeveloperExceptionPage();
187
-            }
184
+            //if (env.IsDevelopment())
185
+            //{
186
+            app.UseDeveloperExceptionPage();
187
+            //}
188
             app.UseCors(x => x                
188
             app.UseCors(x => x                
189
                 .AllowAnyOrigin()
189
                 .AllowAnyOrigin()
190
                 .AllowAnyMethod()
190
                 .AllowAnyMethod()

正在加载...
取消
保存