温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:人才网初学者工具包源码
当前文件路径:JobSiteStarterKit/Admin/EducationLevelsManager.aspx.cs

1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Web; 5
using System.Web.Security; 6
using System.Web.UI; 7
using System.Web.UI.WebControls; 8
using System.Web.UI.WebControls.WebParts; 9
using System.Web.UI.HtmlControls; 10
11
public partial class EducationLevelsManager_aspx : Page 12
{ 13
protected void Page_Load(object sender, EventArgs e) 14
{ 15
if (!Roles.IsUserInRole(ConfigurationManager.AppSettings["adminrolename"])) 16
{ 17
Response.Redirect("~/customerrorpages/NotAuthorized.aspx"); 18
} 19
20
if (DetailsView1.Rows.Count < 1) 21
{ 22
DetailsView1.DefaultMode = DetailsViewMode.Insert; 23
} 24
else 25
{ 26
DetailsView1.DefaultMode = DetailsViewMode.ReadOnly; 27
} 28
29
} 30
31
} 32





}
}