Browse Source

dividebyzero exception fixed

master
Milad Karbasizadeh 11 years ago
parent
commit
086e8d3b04
3 changed files with 4 additions and 6 deletions
  1. +2
    -2
      Sevomin.Models/DovominJob.cs
  2. +1
    -3
      Sevomin.WebFrontend/Global.asax.cs
  3. +1
    -1
      Sevomin.WebFrontend/Web.Release.config

+ 2
- 2
Sevomin.Models/DovominJob.cs View File

@ -88,9 +88,9 @@ namespace Sevomin.Models
if (jpv <= dpv)
sum += m;
else
sum += m * ((jpv.Value - dpv.Value) / jpv.Value);
sum += m * ((jpv.Value - dpv.Value) / (jpv.Value == 0 ? (decimal)0.000001 : jpv.Value));
}
this.Affinity = sum / count;
this.Affinity = sum / (count == 0 ? (decimal)0.000001 : count);
}
}
}

+ 1
- 3
Sevomin.WebFrontend/Global.asax.cs View File

@ -19,9 +19,7 @@ namespace Sevomin.WebFrontend
RouteConfig.RegisterRoutes(RouteTable.Routes);
TaskManager.Initialize(new SevominRegistry());
Application["ApplicationStart"] = DateTime.Now;
}
}
void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e)
{


+ 1
- 1
Sevomin.WebFrontend/Web.Release.config View File

@ -10,7 +10,7 @@
-->
<connectionStrings>
<add name="SevominConnectionString"
connectionString="Data Source=mssql01.anaxanet.com;Initial Catalog=sdojgdbf_sevomin;Persist Security Info=True;User ID=sdojgdbf_sevomin;Password=HKJ32asd0#@dsa;MultipleActiveResultSets=True;Pooling=False"
connectionString="Data Source=localhost;Initial Catalog=sdojgdbf_sevomin;Persist Security Info=True;User ID=sdojgdbf_sevomin;Password=HKJ32asd0#@dsa;MultipleActiveResultSets=True;Pooling=False"
providerName="System.Data.SqlClient"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>


Loading…
Cancel
Save