public int MaximumID() { SPQuery query = new SPQuery(); query.Query = ""; query.RowLimit = 1; SPListItemCollection items = SPContext.Current.Site.RootWeb.Lists["ListName"].GetItems(query); int maxId = Convert.ToInt32(items[0]["ID"]); return maxId; }
Date.toISOFormat = function (date, ignoreTime) { /// <summary>Date object static method to format a date to date ISO string - YYYY-MM-DDThh:mm:ssZ</summary> /// <param name="date" type="Date" mayBeNull="false" optional="false"></param> /// <param name="ignoreTime" type="Boolean" mayBeNull="false" optional="true"></param> /// <returns type="String">A string representing ISO format for specied date</returns> // If not specified, time is ignored var ignoreTime = ignoreTime || {}; function pad(number) { // Add leading 0 if number is less then 10 (enclosed method) var r = String(number); if (r.length ==...
Comments