您目前尚未登陆,请选择【登陆】或【注册
首页->新闻文章->破竹CMS4.0免安装版源码>>admin/PropertyDefinition/EditPropertyControl.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:破竹CMS4.0免安装版源码
普通视图
		            
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.CMS.PropertyDefinitions; 12using Pozhu.CMS.Web; 13 14public partial class admin_PropertyDefinition_EditPropertyControl : AdminPageBase 15{ 16 protected void Page_Load(object sender, EventArgs e) 17 { 18 if (!Page.IsPostBack) 19 { 20 if (Request.QueryString["action"].ToLower() == "edit") 21 { 22 int propertyControlyID = int.Parse(Request.QueryString["PropertyControlyID"]); 23 PropertyControl control = PropertyDefinitionControllerBase.GetPropertyControl(propertyControlyID); 24 tbFriendlyName.Text = control.FriendlyName; 25 tbControlClass.Text = control.ControlClass; 26 tbSettingControlSrc.Text = control.SettingControlSrc; 27 tbApplyType.Text = control.ApplyType.ToString(); 28 tbDescription.Text = control.Description; 29 } 30 } 31 } 32 protected void lbtnSave_Click(object sender, EventArgs e) 33 { 34 if (Request.QueryString["action"].ToLower() == "edit") 35 { 36 int propertyControlyID = int.Parse(Request.QueryString["PropertyControlyID"]); 37 PropertyControl control = PropertyDefinitionControllerBase.GetPropertyControl(propertyControlyID); 38 control.FriendlyName = tbFriendlyName.Text; 39 control.ControlClass = tbControlClass.Text; 40 control.SettingControlSrc = tbSettingControlSrc.Text; 41 control.ApplyType = Type.GetType(tbApplyType.Text); 42 control.Description = tbDescription.Text; 43 44 // 45 PropertyDefinitionControllerBase.UpdatePropertyControl(control); 46 } 47 else if(Request.QueryString["action"].ToLower() == "add") 48 { 49 PropertyControl control = new PropertyControl(); 50 control.FriendlyName = tbFriendlyName.Text; 51 control.ControlClass = tbControlClass.Text; 52 control.SettingControlSrc = tbSettingControlSrc.Text; 53 control.ApplyType = Type.GetType(tbApplyType.Text); 54 control.Description = tbDescription.Text; 55 control.SiteID = CurrentSite.SiteID; 56 57 // 58 PropertyDefinitionControllerBase.AddPropertyControl(control); 59 } 60 Response.Redirect("PropertyControls.aspx"); 61 } 62 protected void lbtnCancel_Click(object sender, EventArgs e) 63 { 64 Response.Redirect("PropertyControls.aspx"); 65 } 66} 67
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:破竹CMS4.0免安装版源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号