DT 的数据字典
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

313 lines
12 KiB

1 year ago
<%@ CodeTemplate Language="C#" ClassName="Project" TargetLanguage="C#" Debug="False" Description="" %>
<%@ Property Name="databaseName" Type="System.String" Default="Mis" Optional="True" Category="Context" Description="" %>
<%
DbEntity db = Template.GetDataBase(databaseName);
CopyDirectory("code\\webbase",databaseName+"\\WebBase");
CopyDirectory("code\\website",databaseName+"\\WebSite");
%>
<%-- TopMenus --%>
<%
OpenResponse(databaseName+"\\WebSite\\App_Code\\TopMenuEnums.cs");
%>
using System;
using System.Data;
using System.Configuration;
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;
/// <summary>
///
/// </summary>
public enum TopMenuEnums:int
{
<%
int iModule = 0;
int iAllModuleCount = db.ModuleNames.Count;
foreach(string moduleName in db.ModuleNames)
{
string line = "\t"+moduleName+"="+Convert.ToString(iModule+1);
iModule++;
if( iModule != iAllModuleCount)
line+=",";
Response.WriteLine(line);
}
%>
}
<%CloseResponse();%>
<%-- TopMenus --%>
<%
foreach(string moduleName in db.ModuleNames)
{
OpenResponse(databaseName+"\\WebSite\\"+moduleName+"\\Default.aspx.cs");
%>
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 <%=moduleName%>_Default : System.Web.UI.PageEx
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
TopMenuId = (int)TopMenuEnums.<%=moduleName%>;
}
}
}
<%
CloseResponse();
OpenResponse(databaseName+"\\WebSite\\"+moduleName+"\\Default.aspx");
%>
<%%@ Page Language="C#" MasterPageFile="~/Default.master" Theme="default" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="<%=moduleName%>_Default" Title="<%=moduleName%>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
<%
CloseResponse();
}
%>
<%-- Model Proect --%>
<%
OpenResponse(databaseName+"\\Model\\Model.csproj");
%>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Model</RootNamespace>
<AssemblyName>Model</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<%
foreach(Table tb in db.Tables)
{
Response.WriteLine("<Compile Include=\""+tb.ModuleName+"\\"+tb.PropertyName+".cs\" />");
}
%>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
<%CloseResponse();%>
<%--DAL Proect--%>
<%
OpenResponse(databaseName+"\\Dal\\Dal.csproj");
%>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2DC30195-858C-4237-B439-0C4E33D7B21D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Dal</RootNamespace>
<AssemblyName>Dal</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<%
foreach(Table tb in db.Tables)
{
Response.WriteLine("<Compile Include=\""+tb.ModuleName+"\\"+tb.PropertyName+".cs\" />");
}
%>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Model\Model.csproj">
<Project>{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}</Project>
<Name>Model</Name>
</ProjectReference>
<ProjectReference Include="..\WebBase\WebBase\WebBase.csproj">
<Project>{EC357989-25CA-4D96-AE37-099E1810F1FF}</Project>
<Name>WebBase</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
<%CloseResponse();%>
<%--SLN Proect--%>
<%
OpenResponse(databaseName+"\\Web.sln");
%>
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebBase", "WebBase\WebBase.csproj", "{EC357989-25CA-4D96-AE37-099E1810F1FF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dal", "Dal\Dal.csproj", "{2DC30195-858C-4237-B439-0C4E33D7B21D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Model", "Model\Model.csproj", "{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}"
EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "WebSite\", "WebSite\", "{06781350-4D69-46F5-99D6-A87015FFF5A7}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.VirtualPath = "/WebSite"
Debug.AspNetCompiler.PhysicalPath = "WebSite\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\WebSite\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/WebSite"
Release.AspNetCompiler.PhysicalPath = "WebSite\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\WebSite\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "2684"
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET = Debug|.NET
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Release|.NET = Release|.NET
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EC357989-25CA-4D96-AE37-099E1810F1FF}.Debug|.NET.ActiveCfg = Debug|Any CPU
{EC357989-25CA-4D96-AE37-099E1810F1FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC357989-25CA-4D96-AE37-099E1810F1FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC357989-25CA-4D96-AE37-099E1810F1FF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{EC357989-25CA-4D96-AE37-099E1810F1FF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{EC357989-25CA-4D96-AE37-099E1810F1FF}.Release|.NET.ActiveCfg = Release|Any CPU
{EC357989-25CA-4D96-AE37-099E1810F1FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC357989-25CA-4D96-AE37-099E1810F1FF}.Release|Any CPU.Build.0 = Release|Any CPU
{EC357989-25CA-4D96-AE37-099E1810F1FF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{EC357989-25CA-4D96-AE37-099E1810F1FF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{2DC30195-858C-4237-B439-0C4E33D7B21D}.Debug|.NET.ActiveCfg = Debug|Any CPU
{2DC30195-858C-4237-B439-0C4E33D7B21D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DC30195-858C-4237-B439-0C4E33D7B21D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DC30195-858C-4237-B439-0C4E33D7B21D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2DC30195-858C-4237-B439-0C4E33D7B21D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{2DC30195-858C-4237-B439-0C4E33D7B21D}.Release|.NET.ActiveCfg = Release|Any CPU
{2DC30195-858C-4237-B439-0C4E33D7B21D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DC30195-858C-4237-B439-0C4E33D7B21D}.Release|Any CPU.Build.0 = Release|Any CPU
{2DC30195-858C-4237-B439-0C4E33D7B21D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{2DC30195-858C-4237-B439-0C4E33D7B21D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}.Debug|.NET.ActiveCfg = Debug|Any CPU
{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}.Release|.NET.ActiveCfg = Release|Any CPU
{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}.Release|Any CPU.Build.0 = Release|Any CPU
{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0B17BB8B-DF72-486F-BD22-9A8942F25FE1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{06781350-4D69-46F5-99D6-A87015FFF5A7}.Debug|.NET.ActiveCfg = Debug|.NET
{06781350-4D69-46F5-99D6-A87015FFF5A7}.Debug|.NET.Build.0 = Debug|.NET
{06781350-4D69-46F5-99D6-A87015FFF5A7}.Debug|Any CPU.ActiveCfg = Debug|.NET
{06781350-4D69-46F5-99D6-A87015FFF5A7}.Debug|Mixed Platforms.ActiveCfg = Debug|.NET
{06781350-4D69-46F5-99D6-A87015FFF5A7}.Debug|Mixed Platforms.Build.0 = Debug|.NET
{06781350-4D69-46F5-99D6-A87015FFF5A7}.Release|.NET.ActiveCfg = Debug|.NET
{06781350-4D69-46F5-99D6-A87015FFF5A7}.Release|.NET.Build.0 = Debug|.NET
{06781350-4D69-46F5-99D6-A87015FFF5A7}.Release|Any CPU.ActiveCfg = Debug|.NET
{06781350-4D69-46F5-99D6-A87015FFF5A7}.Release|Mixed Platforms.ActiveCfg = Debug|.NET
{06781350-4D69-46F5-99D6-A87015FFF5A7}.Release|Mixed Platforms.Build.0 = Debug|.NET
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<%CloseResponse();%>