public static DateTime GetServerDateTime(this System.Data.Linq.DataContext dc) { Njit.Sql.ServerHelper serverHelper; if ((dc.Connection.State & ConnectionState.Open) == ConnectionState.Open && dc.Transaction != null) { serverHelper = new Njit.Sql.ServerHelper(dc.Connection, dc.Transaction); } else { serverHelper = new Njit.Sql.ServerHelper(dc.Connection.ConnectionString); } return(serverHelper.GetServerDateTime()); }
public static string GetServerTime(this System.Data.Linq.DataContext dc) { Njit.Sql.ServerHelper serverHelper; if ((dc.Connection.State & ConnectionState.Open) == ConnectionState.Open && dc.Transaction != null) { serverHelper = new Njit.Sql.ServerHelper(dc.Connection, dc.Transaction); } else { serverHelper = new Njit.Sql.ServerHelper(dc.Connection.ConnectionString); } return(Njit.Common.PersianCalendar.GetTime(serverHelper.GetServerDateTime(), ":", true)); }
public static DateTime GetServerDateTime(this IDbConnection connection) { Njit.Sql.ServerHelper serverHelper = new Njit.Sql.ServerHelper(connection.ConnectionString); return(serverHelper.GetServerDateTime()); }
public static string GetServerTime(this IDbConnection connection) { Njit.Sql.ServerHelper serverHelper = new Njit.Sql.ServerHelper(connection.ConnectionString); return(Njit.Common.PersianCalendar.GetTime(serverHelper.GetServerDateTime(), ":", true)); }
public static string GetServerIpAddress(this IDbConnection connection) { Njit.Sql.ServerHelper serverHelper = new Njit.Sql.ServerHelper(connection.ConnectionString); return(serverHelper.GetServerIpAddress()); }
public static bool ServerIsLocal(this IDbConnection connection) { Njit.Sql.ServerHelper serverHelper = new Njit.Sql.ServerHelper(connection.ConnectionString); return(serverHelper.ServerIsLocal()); }