<script>
$(document).ready(function () {
$('#calendar').fullCalendar({
buttonText: { today: '今天', prev: '上個月', next: '下個月',month:'月',agendaWeek:'週',agendaDay:'日',list:'明細' },
header: { left: 'prev,next', center: 'title', right: ' month,agendaWeek,agendaDay,today,list' },
events: "/Handler.ashx"
});
});
</script>
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
context.Response.Expires = -1;
IList<CalendarDTO> tasksList = new List<CalendarDTO>();
tasksList.Add(new CalendarDTO
{
id = 1,
title = "Google search",
start = "2017-09-25T12:18Z",
end = "2017-09-25T18:18Z",
url = "www.google.com"
});
System.Web.Script.Serialization.JavaScriptSerializer oSerializer =
new System.Web.Script.Serialization.JavaScriptSerializer();
string sJSON = oSerializer.Serialize(tasksList);
context.Response.Write(sJSON);
}
private long ToUnixTimespan(DateTime date)
{
TimeSpan tspan = date.ToUniversalTime().Subtract(
new DateTime(1970, 1, 1, 0, 0, 0));
return (long)Math.Truncate(tspan.TotalSeconds);
}
public bool IsReusable
{
get
{
return false;
}
}
public class CalendarDTO
{
public int id { get; set; }
public string title { get; set; }
public string start { get; set; }
public string end { get; set; }
public string url { get; set; }
}
https://www.tad0616.net/modules/tad_book3/html.php?tbdsn=774
select to_timestamp('1985-02-07T00:00:00.000Z', 'YYYY-MM-DD"T"HH24:MI:SS.ff3"Z"')
from dual;
http://big5.webasp.net/article/19/18829.htm
SQL> SELECT CAST(date1 AS TIMESTAMP) "Date" FROM t;
Date
'2017-09-26'
http://compilerok.blogspot.tw/2014/09/aspnet-ashxsession.html
http://compilerok.blogspot.tw/2014/09/aspnet-ashxsession.html
沒有留言:
張貼留言