Javascript UnixTimeToDateTime converter

function UnixTimeToDateTime(UNIX_timestamp) { 
  var a = new Date(UNIX_timestamp * 1000);
  var d = new Date(a.getTime() + 180  * 60000); //180 if you need add minutes to your date
  var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
  var year = d.getFullYear();
  var month = months[d.getMonth()];
  var date = d.getDate();
  var hour = d.getHours();
  var min = d.getMinutes();
  var sec = d.getSeconds();
  var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;
  return time;
}

http://www.onlineconversion.com/unix_time.htm

c# Wrapper for two different versions of business objects

<configuration>
  <configSections>
    <section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration" />
  </configSections>
  <unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
    <container>

      <register type="YourApplication.BusinessObjectClass" mapTo="<ProvidedDll1>.<Namespace>.BusinessObjectClass" />

       <!-- For second business class just change the mapping to -->

      <register type="YourApplication.BusinessObjectClass" mapTo="<ProvidedDll2>.<Namespace>.BusinessObjectClass" />

    </container>
  </unity>
</configuration>

http://stackoverflow.com/questions/29987234/c-sharp-wrapper-for-two-different-versions-of-business-objects

Unobtrusive validation doesn't work with Ajax.BeginForm

You need to add those 2 files in you Partial View even if it is already in the Shared/_Layout.cshtml:

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")" type="text/javascript"></script>

Or place this in your Partial:

<script type="text/javascript" language=javascript>
    $.validator.unobtrusive.parse(document);
</script>

http://stackoverflow.com/questions/8927933/unobtrusive-validation-doesnt-work-with-ajax-beginform

SQL SERVER – How to implement conditional where clause

USE AdventureWorks2012
GO
--DROP PROCEDURE Usp_sample
--GO
CREATE PROCEDURE Usp_sample
@City nvarchar(30),
@CountryRegionName nvarchar(50)
AS
 
SELECT *
FROM
HumanResources.vEmployee
WHERE (1=(CASE WHEN @City IS NULL THEN 1 ELSE 0 END) Or [City]=@City)
AND (1=(CASE WHEN @CountryRegionName IS NULL THEN 1 ELSE 0 END)
Or [CountryRegionName]=@CountryRegionName)
GO