资源简介

《ASP.NET 2.0仓储管理系统开发案例解析 》源文件

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender EventArgs e)
    {
    }

    protected void menuMain_MenuItemDataBound(object sender MenuEventArgs e)
    {
        string target = ((SiteMapNode)e.Item.DataItem)[“target“];
        if (target != null && target.Length > 0)
            e.Item.Target = target;

        if (menuMain.SelectedItem == null)
        {
            if (IsNodeAncestor((SiteMapNode)e.Item.DataItem SiteMap.CurrentNode))
                e.Item.Selected = true;
        }
    }

    /// 
    /// Determines if a  is the ancestor of a second one.
    /// 

    /// The  in question.
    ///  which may or may not be 
    /// the ‘s child.
    /// true if the two nodes are related false otherwise.
    private bool IsNodeAncestor(SiteMapNode ancestor SiteMapNode child)
    {
        bool result = false;

        if (ancestor.ChildNodes != null && ancestor.ChildNodes.Contains(child))
            return true;
        else
        {
            if (child.ParentNode != null && ancestor != child.RootNode)
            {
                return IsNodeAncestor(ancestor child.ParentNode);
            }
        }

        return result;
    }


    protected void defaultlogo_click(object sender ImageClickEventArgs e)
    {
        Response.Redirect(“Login.aspx“);
    }

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       6843  2007-01-28 22:39  WMS\App_Code\SecurityPage.cs

     文件      10803  2007-01-28 22:39  WMS\App_Code\SqlSiteMapProvider.cs

     文件       5242  2007-01-28 22:39  WMS\App_Code\TreeGenerator.cs

     文件        214  2007-01-28 22:39  WMS\App_Code\vssver2.scc

     目录          0  2007-02-04 23:14  WMS\App_Code

     目录          0  2007-02-04 23:14  WMS\App_Data

     文件        777  2005-09-23 07:28  WMS\App_GlobalResources\AppConfigCommon.resx

     文件       9562  2006-02-17 21:11  WMS\App_GlobalResources\GlobalResources.resx

    ..A.S..       142  2006-03-03 14:30  WMS\App_GlobalResources\vssver2.scc

     目录          0  2007-02-06 14:46  WMS\App_GlobalResources

     文件      16740  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\default.css

     文件       8123  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\default.skin

     文件      12662  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\bar.JPG

     文件      23110  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\blue.ani

     文件        768  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\bullet.JPG

     文件        155  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\catbg.gif

     文件        361  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\close.gif

     文件        474  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\go.gif

     文件        157  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\headerbg.gif

     文件        612  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\list.gif

     文件       2835  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\logo.JPG

     文件       5290  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\logoNew.gif

     文件        556  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\menuItem.gif

     文件      10691  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\menuItem.jpg

     文件      16582  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\mouse.cur

     文件        193  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\seperator.gif

     文件      53820  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\SideS.gif

     文件      28672  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\Images\Thumbs.db

     目录          0  2007-02-04 23:14  WMS\App_Themes\WinXP_Blue\Images

     文件        127  2007-01-28 22:39  WMS\App_Themes\WinXP_Blue\vssver2.scc

............此处省略248个文件信息

评论

共有 条评论