private string GetPatientCode(long PID) { string sPatientCode = ""; DateTime dateTime = new SubSonic.InlineQuery().ExecuteScalar<DateTime>("select getdate()"); string Year = dateTime.Year.ToString().Substring(2, 2); string sEnd = PID.ToString(); sEnd = sEnd.PadLeft(6, '0'); sPatientCode = Year + sEnd; return sPatientCode; }
public DateTime GetSysDateTime() { DataTable dataTable = new DataTable(); DateTime dt = new DateTime(); dt = DateTime.Now; //dataTable = SPs.GetSYSDateTime().GetDataSet().Tables[0]; DateTime dateTime = new SubSonic.InlineQuery().ExecuteScalar <DateTime>("select getdate()"); return(dateTime); }
public static DateTime GetSysDateTime() { try { DataTable dataTable = new DataTable(); DateTime dt = new DateTime(); dt = DateTime.Now; DateTime dateTime = new SubSonic.InlineQuery().ExecuteScalar <DateTime>("select getdate()"); return(dateTime); } catch { return(DateTime.Now); } }
public static DateTime GetSysDateTime() { DataTable dataTable = new DataTable(); DateTime dt = new DateTime(); dt = DateTime.Now; //dataTable = SPs.GetSYSDateTime().GetDataSet().Tables[0]; DateTime dateTime = new SubSonic.InlineQuery().ExecuteScalar<DateTime>("select getdate()"); return dateTime; }
public static DateTime GetSysDateTime() { try { DataTable dataTable = new DataTable(); DateTime dt = new DateTime(); dt = DateTime.Now; DateTime dateTime = new SubSonic.InlineQuery().ExecuteScalar<DateTime>("select getdate()"); return dateTime; } catch { return DateTime.Now; } }