您目前尚未登陆,请选择【登陆】或【注册
首页->新闻文章->破竹CMS4.0免安装版源码>>admin/Scheduling/ViewSchedules.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:破竹CMS4.0免安装版源码
当前文件:文件类型 PozhuCMS/admin/Scheduling/ViewSchedules.aspx.cs打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11using Pozhu.Common.Utilities; 12using Pozhu.Services.Scheduling; 13using Pozhu.Services.Exceptions; 14using Pozhu.CMS.Web; 15 16public 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
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:破竹CMS4.0免安装版源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号