예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("ADManage"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         this.DropFixedPosition.Attributes.Add("onchange", "ChangePositonShow(this)");
         this.DropFloatPosition.Attributes.Add("onchange", "ChangePositonShow(this)");
         this.DropMovePosition.Attributes.Add("onchange", "ChangePositonShow(this)");
         this.DropPopPosition.Attributes.Add("onchange", "ChangePositonShow(this)");
         foreach (ListItem lit in this.radlZonetype.Items)
         {
             lit.Attributes.Add("onclick", "ShowZoenTypePanel()");
         }
         foreach (ListItem li2 in this.RBLDefaultSetting.Items)
         {
             li2.Attributes.Add("onclick", "ShowZoenTypePanel()");
         }
         this.DropAdZoneSize.Attributes.Add("onchange", "Zone_SelectSize(this)");
         string zoneid = base.Request.QueryString["ZoneId"];
         if (string.IsNullOrEmpty(zoneid))
         {
             this.TxtZoneJSName.Text = this.GetJSFileName();
             zoneid = "0";
             this.HdnZoneId.Value = zoneid;
             this.Label1.Text = "添加广告版位";
         }
         else
         {
             this.HdnZoneId.Value = zoneid;
             this.Label1.Text = "修改广告版位";
             adzone = B_ADZone.getAdzoneByZoneId(DataConverter.CLng(zoneid));
             this.TxtZoneName.Text = adzone.ZoneName;
             this.TxtZoneJSName.Text = adzone.ZoneJSName;
             this.TxtZoneIntro.Text = adzone.ZoneIntro;
             this.TxtZoneHeight.Text = adzone.ZoneHeight.ToString();
             this.TxtZoneWidth.Text = adzone.ZoneWidth.ToString();
             this.radlZonetype.SelectedValue = adzone.ZoneType.ToString();
             if (!adzone.DefaultSetting)
             {
                 this.RBLDefaultSetting.SelectedValue = "0";
             }
             else
             {
                 this.RBLDefaultSetting.SelectedValue = "1";
             }
             InitShowPanel(adzone.ZoneType);
             InitSetting(adzone.ZoneSetting, adzone.ZoneType);
             this.RadlShowType.SelectedValue = adzone.ShowType.ToString();
             if (adzone.Active)
                 this.ChkActive.Checked = true;
             else
                 this.ChkActive.Checked = false;
         }
     }
 }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     B_Admin badmin = new B_Admin();
     badmin.CheckMulitLogin();
     this.litUserName.Text = HttpContext.Current.Request.Cookies["ManageState"]["LoginName"].ToString();
     this.litDate.Text = DateTime.Now.ToShortDateString();
 }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("NodeEdit"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         string mParentID = base.Request.QueryString["ParentID"];
         int ParentID;
         if (string.IsNullOrEmpty(mParentID))
             ParentID = 0;
         else
             ParentID = DataConverter.CLng(mParentID);
         if (ParentID == 0)
             this.LblNodeName.Text = "根节点";
         else
         {
             M_Node node = this.bll.GetNode(ParentID);
             if (node.IsNull)
                 this.LblNodeName.Text = "根节点";
             else
                 this.LblNodeName.Text = node.NodeName;
         }
         this.HdnParentId.Value = ParentID.ToString();
         this.HdnDepth.Value = this.bll.GetDepth(ParentID).ToString();
         this.HdnOrderID.Value = this.bll.GetOrder(ParentID).ToString();
     }
 }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                B_Admin badmin = new B_Admin();
                badmin.CheckMulitLogin();
                if (!badmin.ChkPermissions("SpecCateManage"))
                {
                    function.WriteErrMsg("没有权限进行此项操作");
                }
                string id = base.Request.QueryString["id"];

                if (!string.IsNullOrEmpty(id))
                {
                    M_SpecCate speccate = this.bll.GetCate(DataConverter.CLng(id));
                    if (!speccate.IsNull)
                    {
                        this.TxtSpecCateName.Text = speccate.SpecCateName;
                        this.TxtSpecCateDir.Text = speccate.SpecCateDir;
                        this.TxtSpecCateDesc.Text = speccate.SpecCateDesc;
                        this.RBLOpenType.SelectedValue = DataConverter.CLng(speccate.OpenNew).ToString();
                        this.RBLFileExt.SelectedValue = speccate.FileExt.ToString();
                        this.TxtListTemplate.Text = speccate.ListTemplate;
                    }
                }
                else
                {
                    id = "0";
                }
                this.HdnSpecCateID.Value = id;
            }
        }
예제 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         string templateDir = SiteConfig.SiteOption.TemplateDir;
         string str2 = base.Request.QueryString["FilesDir"];
         string str3 = "";
         if (!string.IsNullOrEmpty(str2))
         {
             str3 = str2.Replace("/", @"\");
         }
         string str4 = "";
         if (!string.IsNullOrEmpty(templateDir))
         {
             str4 = templateDir.Replace("/", @"\");
         }
         this.HdnFileText.Value = str2;
         DirectoryInfo info = new DirectoryInfo(base.Request.PhysicalApplicationPath + str4 + str3);
         if (info.Exists)
         {
             this.BindData(str4 + str3);
         }
     }
 }
예제 #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("UserGroup"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         string id = base.Request.QueryString["id"];
         if (!string.IsNullOrEmpty(id))
         {
             this.HdnGroupID.Value = id;
         }
         else
         {
             this.HdnGroupID.Value = "0";
             id = "0";
         }
         if (id != "0")
         {
             M_Group info = this.bll.GetByID(DataConverter.CLng(id));
             this.TxtGroupName.Text = info.GroupName;
             this.TxtDescription.Text = info.Description;
             this.RBLReg.SelectedValue = DataConverter.CLng(info.RegSelect).ToString();
         }
     }
 }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                B_Admin badmin = new B_Admin();
                badmin.CheckMulitLogin();
                if (!badmin.ChkPermissions("ContentSpec"))
                {
                    function.WriteErrMsg("没有权限进行此项操作");
                }

                if (string.IsNullOrEmpty(base.Request.QueryString["InfoIDs"]))
                {
                    function.WriteErrMsg("没有选定要添加到其他专题的内容ID!");
                }
                else
                {
                    this.TxtGeneralID.Text = base.Request.QueryString["InfoIDs"].Trim();
                }
                this.LstSpec.DataSource = this.bspec.GetSpecAll();
                this.LstSpec.DataTextField = "SpecName";
                this.LstSpec.DataValueField = "SpecID";
                this.LstSpec.DataBind();
            }
        }
예제 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                B_Admin badmin = new B_Admin();
                badmin.CheckMulitLogin();
                if (!badmin.ChkPermissions("LabelManage"))
                {
                    function.WriteErrMsg("没有权限进行此项操作");
                }
                string LabelCateList = this.bll.LabelCateList();
                string[] CateArr = LabelCateList.Split(new char[] { ',' });
                string labellist = "";
                for (int i = 0; i < CateArr.Length; i++)
                {
                    if (!string.IsNullOrEmpty(CateArr[i]))
                        labellist = labellist + "<a href=\"LabelManage.aspx?Cate=" + CateArr[i] + "\">" + CateArr[i] + "</a>&nbsp;|&nbsp;";
                }
                this.lblLabel.Text = labellist;
                string LabelCate = this.Request.QueryString["Cate"];
                int CurrentPage;
                if (string.IsNullOrEmpty(this.Request.QueryString["p"]))
                {
                    CurrentPage = 1;
                }
                else
                    CurrentPage = DataConverter.CLng(this.Request.QueryString["p"]);

                int CountPerPage = 20;
                this.repFile.DataSource = this.bll.LabelList(LabelCate, CountPerPage, CurrentPage);
                this.repFile.DataBind();
                int RecordCount = this.bll.GetLabelListCount(LabelCate);
                this.pager1.InnerHtml = function.ShowPage(RecordCount, CountPerPage, CurrentPage, true, "个");
            }
        }
예제 #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("UserModel"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         string id = base.Request.QueryString["ModelID"];
         if (!string.IsNullOrEmpty(id))
         {
             this.HdnModelId.Value = id;
         }
         else
         {
             this.HdnModelId.Value = "0";
             id = "0";
         }
         if (id != "0")
         {
             M_ModelInfo info = this.bll.GetModelById(DataConverter.CLng(id));
             this.TxtModelName.Text = info.ModelName;
             this.LblTablePrefix.Text = "";
             this.LblTablePrefix.Visible = false;
             this.TxtTableName.Text = info.TableName;
             this.TxtDescription.Text = info.Description;
             this.TxtTableName.Enabled = false;
         }
     }
 }
예제 #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         bind();
     }
 }
예제 #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     B_Admin badmin = new B_Admin();
     badmin.CheckMulitLogin();
     if (!badmin.ChkPermissions("LabelImport"))
     {
         function.WriteErrMsg("没有权限进行此项操作");
     }
 }
예제 #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     B_Admin badmin = new B_Admin();
     badmin.CheckMulitLogin();
     M_AdminInfo info = B_Admin.GetAdminByAdminName(HttpContext.Current.Request.Cookies["ManageState"]["LoginName"]);
     if (!info.EnableModifyPassword)
     {
         function.WriteErrMsg("您的帐户不允许修改密码!");
     }
 }
예제 #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.Page.IsPostBack)
        {
            B_Admin badmin = new B_Admin();
            badmin.CheckMulitLogin();
            if (!badmin.ChkPermissions("SpecManage"))
            {
                function.WriteErrMsg("没有权限进行此项操作");
            }
            string act = base.Request.QueryString["Action"];
            string id = "0";
            if (string.IsNullOrEmpty(act))
            {
                function.WriteErrMsg("缺少编辑模式!");
            }
            else
            {
                if (act == "Add")
                {
                    id = base.Request.QueryString["CateID"];
                    if (string.IsNullOrEmpty(id))
                    {
                        function.WriteErrMsg("没有指定专题类别ID!");
                    }
                    this.HdnCateID.Value = id;
                    this.HdnSpecID.Value = "0";

                }
                if (act == "Modify")
                {
                    id = base.Request.QueryString["SpecID"];
                    if (string.IsNullOrEmpty(id))
                    {
                        function.WriteErrMsg("没有指定要修改的专题ID!");
                    }
                    M_Spec info = this.bll.GetSpec(DataConverter.CLng(id));
                    if (!info.IsNull)
                    {
                        this.HdnCateID.Value = info.SpecCate.ToString();
                        this.HdnSpecID.Value = info.SpecID.ToString();
                        this.TxtSpecName.Text = info.SpecName;
                        this.TxtSpecDir.Text = info.SpecDir;
                        this.TxtSpecDesc.Text = info.SpecDesc;
                        this.RBLOpenType.SelectedValue = DataConverter.CLng(info.OpenNew).ToString();
                        this.RBLFileExt.SelectedValue = info.ListFileExt.ToString();
                        this.RBLListFileRule.SelectedValue = info.ListFileRule.ToString();
                        this.TxtListTemplate.Text = info.ListTemplate;
                    }
                }
                M_SpecCate cate = this.bspeccate.GetCate(DataConverter.CLng(id));
                this.lblCate.Text = cate.SpecCateName;
            }
        }
    }
예제 #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     B_Admin badmin = new B_Admin();
     badmin.CheckMulitLogin();
     if (!badmin.ChkPermissions("NodeManage"))
     {
         function.WriteErrMsg("没有权限进行此项操作");
     }
     int NodeID = DataConverter.CLng(base.Request.QueryString["NodeID"]);
     this.bll.DelNode(NodeID);
     Response.Redirect("NodeManage.aspx");
 }
예제 #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                B_Admin badmin = new B_Admin();
                badmin.CheckMulitLogin();
                if (!badmin.ChkPermissions("ADManage"))
                {
                    function.WriteErrMsg("没有权限进行此项操作");
                }
                DataTable dt = new DataTable("JSTemplate");
                DataColumn myDataColumn;
                DataRow myDataRow;

                myDataColumn = new DataColumn();
                myDataColumn.DataType = System.Type.GetType("System.Int32");
                myDataColumn.ColumnName = "JSTemplateID";
                dt.Columns.Add(myDataColumn);

                myDataColumn = new DataColumn();
                myDataColumn.DataType = System.Type.GetType("System.String");
                myDataColumn.ColumnName = "JSTemplateName";
                dt.Columns.Add(myDataColumn);

                myDataColumn = new DataColumn();
                myDataColumn.DataType = System.Type.GetType("System.String");
                myDataColumn.ColumnName = "JSTemplatePath";
                dt.Columns.Add(myDataColumn);

                myDataColumn = new DataColumn();
                myDataColumn.DataType = System.Type.GetType("System.String");
                myDataColumn.ColumnName = "JSTemplateSize";
                dt.Columns.Add(myDataColumn);

                int num = 5;
                B_ADZoneJs adjs = new B_ADZoneJs();
                string[] fileSize = adjs.GetFileSize();
                string[] tname=new string[]{"矩形横幅","弹出窗口","随屏移动","固定位置","漂浮移动","文字代码"};
                for (int i = 0; i <= num; i++)
                {
                    myDataRow = dt.NewRow();
                    myDataRow["JSTemplateID"] = i;
                    myDataRow["JSTemplateName"] = tname[i];
                    myDataRow["JSTemplatePath"] = VirtualPathUtility.AppendTrailingSlash(SiteConfig.SiteOption.AdvertisementDir) + "ADTemplate/" + adjs.GetTemplateName(i);
                    myDataRow["JSTemplateSize"] = fileSize[i];
                    dt.Rows.Add(myDataRow);
                }

                this.GridView1.DataSource = dt;
                this.GridView1.DataBind();
            }
        }
예제 #16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("UserGroup"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         GdvBind();
     }
 }
예제 #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("ModelManage"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         DataBaseList();
     }
 }
예제 #18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("EmailManage"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         this.TxtSenderName.Text = SiteConfig.SiteInfo.Webmaster;
         this.TxtSenderEmail.Text = SiteConfig.SiteInfo.WebmasterEmail;
     }
 }
예제 #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("SpecManage"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         this.LstSpec.DataSource = this.bll.GetSpecAll();
         this.LstSpec.DataBind();
     }
 }
예제 #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                B_Admin badmin = new B_Admin();
                badmin.CheckMulitLogin();
                if (!badmin.ChkPermissions("CssEdit"))
                {
                    function.WriteErrMsg("没有权限进行此项操作");
                }
                string strPath = base.Request.QueryString["filepath"];
                string TemplateDir = "/Skin";
                if (string.IsNullOrEmpty(strPath))
                {
                    strPath = "";
                    this.ShowPath = "/";
                }
                else
                {
                    this.ShowPath = strPath;
                }
                strPath = base.Request.PhysicalApplicationPath + TemplateDir + strPath;
                strPath = strPath.Replace("/", @"\");

                this.FilePath = strPath;
                string FileExp = Path.GetExtension(this.FilePath);
                if (!string.IsNullOrEmpty(FileExp))
                {
                    this.FileName = Path.GetFileName(this.FilePath);
                    this.lblFielName.Text = this.FileName;
                    this.TxtFilename.Text = this.FileName;
                    this.TxtFilename.Visible = false;
                    this.textContent.Text = FileSystemObject.ReadFile(this.FilePath);
                    this.ShowPath = this.ShowPath.Replace(this.FileName, "");
                    this.Hdnmethod.Value = "append";
                }
                else
                {
                    this.FileName = "";
                    this.TxtFilename.Text = "";
                    this.TxtFilename.Visible = true;
                    this.lblFielName.Text = "";
                    this.lblFielName.Visible = false;
                    this.Hdnmethod.Value = "add";
                }
                this.HdnFilePath.Value = this.FilePath;
                this.HdnShowPath.Value = this.ShowPath;
            }
        }
예제 #21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("ADManage"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         int num = DataConverter.CLng(base.Request.QueryString["ZoneType"]);
         this.HdnZoneType.Value = num.ToString();
         this.TxtADTemplate.Text = new B_ADZoneJs().GetADZoneJSTemplateContent(num);
     }
 }
예제 #22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     B_Admin badmin = new B_Admin();
     badmin.CheckMulitLogin();
     this.m_UserInput = base.Request.QueryString["OpenerText"];
     this.PageSize = 20;
     if (string.IsNullOrEmpty(base.Request.QueryString["p"]))
     {
         this.CurrentPageIndex = 1;
     }
     else
     {
         this.CurrentPageIndex = DataConverter.CLng(base.Request.QueryString["p"]);
     }
     this.CheckKeyword();
 }
예제 #23
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("NodeEdit"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         string mNodeID = base.Request.QueryString["NodeID"];
         if (string.IsNullOrEmpty(mNodeID))
         {
             AdminPage.WriteErrMsg("没有指定要编辑的节点ID");
         }
         M_Node node = this.bll.GetNode(DataConverter.CLng(mNodeID));
         if (node.IsNull)
         {
             AdminPage.WriteErrMsg("指定要编辑的节点不存在");
         }
         else
         {
             if (node.ParentID == 0)
                 this.LblNodeName.Text = "根节点";
             else
             {
                 M_Node node1 = this.bll.GetNode(node.ParentID);
                 this.LblNodeName.Text = node1.NodeName;
             }
             this.HdnNodeID.Value = mNodeID;
             this.HdnDepth.Value = node.Depth.ToString();
             this.HdnParentId.Value = node.ParentID.ToString();
             this.HdnOrderID.Value = node.OrderID.ToString();
             this.TxtNodeName.Text = node.NodeName;
             this.TxtNodeDir.Text = node.NodeDir;
             this.TxtNodePicUrl.Text = node.NodePic;
             this.TxtTips.Text = node.Tips;
             this.TxtMetaKeywords.Text = node.Meta_Keywords;
             this.TxtMetaDescription.Text = node.Meta_Description;
             this.RBLOpenType.SelectedValue = DataConverter.CLng(node.OpenNew).ToString();
             this.TxtTemplate.Text = node.ListTemplateFile;
             this.RBLListEx.SelectedValue = node.ListPageHtmlEx.ToString();
         }
     }
 }
예제 #24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ViewState["MsgID"] = Request.QueryString["id"].ToString();
     if (!Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("MessManage"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         M_Message messInfo = B_Message.GetMessByID(DataConverter.CLng(ViewState["MsgID"].ToString()));
         this.LblSender.Text = messInfo.Sender.ToString();
         this.LblIncept.Text = messInfo.Incept.ToString();
         this.LblSendTime.Text = messInfo.PostDate.ToString();
         this.LblTitle.Text = messInfo.Title;
         this.LblContent.Text = messInfo.Content;
     }
 }
예제 #25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("UserModelField"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         string mid = base.Request.QueryString["ModelID"];
         if (string.IsNullOrEmpty(mid))
         {
             function.WriteErrMsg("没有指定模块ID");
         }
         this.ViewState["ModelID"] = mid;
         DataBindList();
     }
 }
예제 #26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     B_Admin badmin = new B_Admin();
     badmin.CheckMulitLogin();
     if (!badmin.ChkPermissions("NodeManage"))
     {
         function.WriteErrMsg("没有权限进行此项操作");
     }
     string pid = base.Request.QueryString["ParentID"];
     if (string.IsNullOrEmpty(pid))
     {
         pid = "0";
     }
     this.ViewState["ParentID"] = pid;
     if (!this.Page.IsPostBack)
     {
         DataBindList();
     }
 }
예제 #27
0
 protected void Page_Load(object sender, EventArgs e)
 {
     B_Admin badmin = new B_Admin();
     badmin.CheckMulitLogin();
     if (!badmin.ChkPermissions("ContentEdit"))
     {
         function.WriteErrMsg("没有权限进行此项操作");
     }
     TreeNode tmpNd;
     tmpNd = new TreeNode();
     tmpNd.Value = "0";
     tmpNd.Text = "网站专题";
     tmpNd.NavigateUrl = "";
     tmpNd.Target = "";
     tvNav.Nodes.Add(tmpNd);
     B_SpecCate bll = new B_SpecCate();
     bll.InitTreeNode(tmpNd.ChildNodes);
     tvNav.ExpandAll();
 }
예제 #28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("ModelEdit"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         foreach (DataRow row in FileSystemObject.GetDirectoryInfos(HttpContext.Current.Server.MapPath("~/Images/ModelIcon/"), FsoMethod.File).Rows)
         {
             this.DrpItemIcon.Items.Add(new ListItem(row["name"].ToString(), row["name"].ToString()));
         }
         this.DrpItemIcon.Attributes.Add("onchange", "ChangeImgItemIcon(this.value);ChangeTxtItemIcon(this.value);");
         this.TxtItemIcon.Attributes.Add("onchange", "ChangeImgItemIcon(this.value);");
         string id = base.Request.QueryString["ModelID"];
         if (!string.IsNullOrEmpty(id))
         {
             this.HdnModelId.Value = id;
             this.LNav.Text = "修改内容模型";
             this.LTitle.Text = "修改内容模型";
             M_ModelInfo info = this.bll.GetModelById(int.Parse(id));
             this.TxtModelName.Text = info.ModelName;
             this.LblTablePrefix.Visible = false;
             this.TxtTableName.Text = info.TableName;
             this.TxtTableName.Enabled = false;
             this.TxtItemName.Text = info.ItemName;
             this.TxtItemUnit.Text = info.ItemUnit;
             string selectValue = string.IsNullOrEmpty(info.ItemIcon) ? "Default.gif" : info.ItemIcon;
             this.ImgItemIcon.ImageUrl = "~/Images/ModelIcon/" + selectValue;
             this.DrpItemIcon.SelectedValue = selectValue;
             this.TxtItemIcon.Text = info.ItemIcon;
             this.TxtDescription.Text = info.Description;
         }
         else
         {
             this.HdnModelId.Value = "0";
         }
     }
 }
예제 #29
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("ADManage"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         M_Adzone adZoneById = B_ADZone.getAdzoneByZoneId(DataConverter.CLng(base.Request.QueryString["ZoneId"]));
         if ((adZoneById.IsNull) || string.IsNullOrEmpty(adZoneById.ZoneJSName))
         {
             this.TxtZoneCode.Text = "版位调用代码不存在!";
         }
         else
         {
             this.TxtZoneCode.Text = "<script type=\"text/javascript\" src=\"{$AdDir/}/" + adZoneById.ZoneJSName + "\"></script>";
         }
     }
 }
예제 #30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("ContentMange"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         string id = base.Request.QueryString["id"];
         if (string.IsNullOrEmpty(id))
             function.WriteErrMsg("没有指定要移动的内容ID", "../Content/ContentManage.aspx");
         else
             this.TxtContentID.Text = id.Trim();
         this.DDLNode.DataSource = this.bnode.GetNodeListContain(0);
         this.DDLNode.DataTextField = "NodeName";
         this.DDLNode.DataValueField = "NodeID";
         this.DDLNode.DataBind();
     }
 }