温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:破竹CMS4.0免安装版源码
当前文件:
PozhuCMS/admin/Scheduling/ViewSchedules.aspx.cs,打开代码结构图
PozhuCMS/admin/Scheduling/ViewSchedules.aspx.cs,打开代码结构图1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Collections; 5
using System.Web; 6
using System.Web.Security; 7
using System.Web.UI; 8
using System.Web.UI.WebControls; 9
using System.Web.UI.WebControls.WebParts; 10
using System.Web.UI.HtmlControls; 11
using Pozhu.Common.Utilities; 12
using Pozhu.Services.Scheduling; 13
using Pozhu.Services.Exceptions; 14
using Pozhu.CMS.Web; 15
16
public partial class admin_Scheduling_ViewSchedules : AdminPageBase 17
{ 18
/// <summary> 19
/// GetTimeLapse formats the time lapse as a string 20
/// </summary> 21
/// <remarks> 22
/// </remarks> 23
/// <history> 24
/// [cnurse] 9/28/2004 Updated to reflect design changes for Help, 508 support 25
/// and localisation 26
/// </history> 27
protected string GetTimeLapse(int TimeLapse, string TimeLapseMeasurement) 28
{ 29
if (TimeLapse != Null.NullInteger) 30
{ 31
string str = String.Empty; 32
string strPrefix = "Every"; 33
string strSec = "Second"; 34
string strMn = "Minute"; 35
string strHour = "Hour"; 36
string strDay = "Day"; 37
string strSecs = "Seconds"; 38
string strMns = "Minutes"; 39
string strHours = "Hours"; 40
string strDays = "Days"; 41
42
switch (TimeLapseMeasurement) 43
{ 44
case "s": 45
46
str = strPrefix + " " + TimeLapse.ToString() + " " + (TimeLapse > 1 ? strSecs : strSec).ToString(); 47
break; 48
case "m": 49
50
str = strPrefix + " " + TimeLapse.ToString() + " " + (TimeLapse > 1 ? strMns : strMn).ToString(); 51
break; 52
case "h": 53
54
str = strPrefix + " " + TimeLapse.ToString() + " " + (TimeLapse > 1 ? strHours : strHour).ToString(); 55
break; 56
case "d": 57
58
str = strPrefix + " " + TimeLapse.ToString() + " " + (TimeLapse > 1 ? strDays : strDay).ToString(); 59
break; 60
} 61
62
return str.ToString(); 63
} 64
else 65
{ 66
return "n/a"; 67
} 68
} 69
70
/// <summary> 71
/// Page_Load runs when the control is loaded. 72
/// </summary> 73
/// <returns></returns> 74
/// <remarks> 75
/// </remarks> 76
/// <history> 77
/// [cnurse] 9/28/2004 Updated to reflect design changes for Help, 508 support 78
/// and localisation 79
/// </history> 80
protected void Page_Load(Object sender, EventArgs e) 81
{ 82
try 83
{ 84
if (!Page.IsPostBack) 85
{ 86
ArrayList arrSchedule = SchedulingProvider.Instance().GetSchedule(); 87
88
89
rptSchedulings.DataSource = arrSchedule; 90
rptSchedulings.DataBind(); 91
} 92
} 93
catch (Exception exc) //Module failed to load 94
{ 95
Exceptions.LogException( exc); 96
} 97
} 98
} 99





}