<%@ CodeTemplate Language="C#" ClassName="MPageAspx" TargetLanguage="C#" Debug="False" Description="" %> <%@ Property Name="databaseProjectName" Type="System.String" Default="SpSampleDb" Optional="True" Category="Context" Description="" %> <%@ Property Name="moduleName" Type="System.String" Default="Manager" Optional="True" Category="Context" Description="" %> <%@ Property Name="folderName" Type="System.String" Default="System" Optional="True" Category="Context" Description="" %> <%@ Property Name="Theme" Type="System.String" Default="Default" Optional="True" Category="Context" Description="" %> <%@ Property Name="title" Type="System.String" Default="" Optional="True" Category="Context" Description="" %> <% DbEntity db = Template.GetDataBase(databaseProjectName); foreach(Table tb in db.Tables) { OpenResponse(databaseProjectName+"\\MWebSite\\"+tb.ModuleName+"\\"+tb.Name.ToLower()+".aspx"); Field pkField = null; foreach(Field fd in tb.Fields) { if( fd.IsPK ) pkField = fd; } %><%%@ Page Language="C#" AutoEventWireup="true" CodeFile="<%=tb.Name.ToLower()%>.aspx.cs" Inherits="<%=moduleName%>_<%=folderName%>_<%=tb.Name%>" %%> <%%@ Register Assembly="WebBase" Namespace="WebBase" TagPrefix="cc1" %%> "<%=tb.CnName%>"
<% Response.Write(@"<%=getLabtext("); Response.Write("\"backpri\""); Response.Write(@") % >"); %> <% Response.Write(@"<%=getLabtext("); Response.Write("\"homepage\""); Response.Write(@") % >"); %> <% Response.Write(@"<%=getLabtext("); Response.Write("\"PageName\""); Response.Write(@") % >"); %>
<% int i = 0; foreach(Field fd in tb.Fields) { if(fd.Identity.Enable == true || fd.LoadCodeProperty("Find") == "0") continue; string control = ""; i++; if(i%3==1) Response.WriteLine("\t\t\t\t"); //Response.WriteLine("\t\t\t\t\t"); //Response.WriteLine("\t\t\t\t\t"); Response.Write("\t\t\t\t\t"); if( fd.IsFK == false) { if( fd.NoteIsEnum == true) { control = "\r\n\t\t\t\t\t\r\n"; control+="\t\t\t\t\t\tALL\r\n"; foreach(string key in fd.NoteEnums.AllKeys) control+="\t\t\t\t\t\t"+key+"\r\n"; control+="\t\t\t\t\t\r\n"; } else { switch(fd.DataType.GroupName.ToUpper()) { case "NUMBER": case "STRING": control = ""; break; case "DATETIME": control = ""; break; case "BLOB": control = ""; break; } } } else { control = ""; } Response.WriteLine("\t\t\t\t\t"); if(i%3==0) Response.WriteLine("\t\t\t\t"); } %>
"+fd.CnName+": <#=getLabtext(\""+fd.PropertyName+"\")#>: "); Response.Write(@"<%=getLabtext("); Response.Write("\""+fd.MemberName+"\""); Response.Write(@") % >"); Response.WriteLine(": "+control+"
NO < %# Container.DataItemIndex + 1 %> <% foreach(Field fd in tb.Fields) { if( fd.LoadCodeProperty("List") == "0") continue; if( fd.IsFK == true) { Table parentT = tb.ParentTable(fd.Name); if( parentT != null) { if( parentT.Fields.Count >= 2) { Response.WriteLine("\t\t\t\t\t"); continue; } } } if( fd.IsPK) { Response.WriteLine("\t\t\t\t\t"); } else { if( fd.DataType.FullName=="Date") { Response.WriteLine("\t\t\t\t\t"); Response.WriteLine("\t\t\t\t\t\t"+fd.CnName+""); Response.WriteLine("\t\t\t\t\t\t"); Response.WriteLine("\t\t\t\t\t\t\t"); Response.WriteLine("\t\t\t\t\t\t\t"); Response.WriteLine("\t\t\t\t\t\t"); Response.WriteLine("\t\t\t\t\t"); } else Response.WriteLine("\t\t\t\t\t"); } } %>
<%-- Edit --%> <% int iLable = 0; i = 0; foreach(Field fd in tb.Fields) { if( fd.LoadCodeProperty("Edit") == "0") continue; if( fd.Identity.Enable == false) { iLable++; i++; string control = ""; if( fd.IsFK == false) { if( fd.NoteIsEnum == true) { control = "\r\n\t\t\t\t\t\r\n"; foreach(string key in fd.NoteEnums.AllKeys) { control+="\t\t\t\t\t\t"+key+"\r\n"; } control+="\t\t\t\t\t\r\n"; } else { switch(fd.DataType.GroupName.ToUpper()) { case "NUMBER": control = ""; break; case "STRING": if( fd.DataType.Precision>=500 || fd.DataType.Scale>=500) control = ""; else control = ""; break; case "DATETIME": control = ""; break; case "BLOB": control = ""; break; } } } else { control = ""; } if(i%2==1) Response.WriteLine("\t\t"); //Response.WriteLine("\t\t\t"); Response.Write("\t\t\t\t\t"); Response.WriteLine("\t\t\t"); if(i%2==0) Response.WriteLine("\t\t"); } } %>
"+fd.CnName+": "); Response.Write(@"<%=getLabtext("); Response.Write("\""+fd.MemberName+"\""); Response.Write(@") % >"); Response.WriteLine(": "+control+"
<% CloseResponse(); } %>