$%@ Page Language="C#" %#
$%@ Import Namespace="System.Data" %#
$!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"#
$script runat="server"#
//TODO:
// Create an Object of the DataTable You need class for
// Assign Connection string name from Web.config
// Assign Data Set Name
// DataSet2.A_TABLECOLOMNDataTable dt = new DataSet1.A_TABLECOLOMNDataTable();
dsFinance.FI_CBRPMSTDataTable dt = new dsFinance.FI_CBRPMSTDataTable();
// DataTable dt = new DataTable();
public string TableName
{
get
{
String tblName = dt.TableName.Replace("DataTable", "");
tblName = "cls"+tblName.Replace("FI_", "")+"_CDO";
return tblName;
}
}
public string ConnectionStringName = "SampleConnectionString";
public string DataSetName = "CodeGenerator";
public StringBuilder param = new StringBuilder();
$/script#
$html xmlns="http://www.w3.org/1999/xhtml"#
$head id="Head1" runat="server"#
$title#Untitled Page$/title#
$/head#
$body#
$form id="form1" runat="server"#
$div#
$pre#
<%@ Register Src="../../Search/GridSearch.ascx" TagName="GridSearch" TagPrefix="uc1" %>
<table class="tableheader" cellpadding="0" cellspacing="0" >
<tr>
<td class="labeltitle">
<asp:Label ID="Label5" runat="server" CssClass="formtitle" Text="$% dt.TableName.ToString(); %#"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblstatus_msg" runat="server" CssClass="label">status</asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Panel ID="pnlGrid" runat="server">
<table class="tabledetails" cellpadding="0" cellspacing="0" >
<tr class="tdleft">
<td>
< gridsearch id="ctrlHeader" runat="server" grid_static_col="3"
tabledefid="14" /></td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td>
<asp:Panel ID="pnlTrans" runat="server">
<table id= "tblmain" cellpadding="0" cellspacing="0" class= "tabledetails" >
<tr >
<td colspan="4" >
<asp:ValidationSummary ID="ValidationSummary1" runat="server" CssClass="validationsummary" />
</td>
</tr>
$%foreach (DataColumn col in dt.Columns){ %#
<tr>
<td>
<asp:Label ID="lbl$%=col.ColumnName%#" runat="server" CssClass="label" Text="$%=col.ColumnName%#"></asp:Label >
</td>
</tr>
<tr>
<td>
<asp:TextBox ID="txt$%=col.ColumnName%#" runat="server" CssClass="textbox"></asp:TextBox >
<asp:RequiredFieldValidator ID="rfv$%=col.ColumnName%#" runat="server" ControlToValidate="txt$%=col.ColumnName%#"
CssClass="errorindication" ErrorMessage="Enter $%=col.ColumnName%#">*</asp:RequiredFieldValidator>
</td>
</tr> $%}%#
<tr>
<td>
<asp:Button ID="btnSave" runat="server" CssClass="button" Text="Save" ToolTip="save record(Alt+S)" onclick="btnSave_Click" />
<asp:Button ID="btnCancel" runat="server" AccessKey="x"
CausesValidation="false" CssClass="button"
Text="Cancel" ToolTip="cancel(Alt+X)" onclick="btnCancel_Click"/>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
$/pre#
$/div#
$/form#
$/body#
$/html#
2/21/11
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment