public JsonResult EntranceListDateAll() { JsonResult m_json = new JsonResult(); try { int iClassID = Pv.Pint(Request["ClassID"]); DateTime dtmDate = Pv.PDate(Request["Tarih"]); RetCode oRet = Util.DB.RunTable("EntranceListDateAll", iClassID, dtmDate); DataTable dtRooms = oRet.ToTable; m_json.Data = new { recordCount = dtRooms.Rows.Count, success = true, failure = false, error = "", data = Util.GetJsonData(dtRooms) }; m_json.JsonRequestBehavior = JsonRequestBehavior.AllowGet; } catch (Exception eX) { Util.WriteLog(eX); } return(m_json); }
public static DateTime GetServerTime() { DateTime dtDate = DateTime.Now; try { RetCode oRet = DB.RunOne(System.Data.CommandType.Text, "SELECT GETDATE()"); if (oRet.iRet == Back.Ok) { dtDate = Pv.PDate(oRet.oReturn, DateTime.Now); } //dtDate = Convert.ToDateTime(Database.ExecuteScalar("SELECT GETDATE()").ToString()); } catch (Exception exc) { WriteLog(exc); } return(dtDate); }