$%@ 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
//public aspnetdb.ModulePermissionDataTable dt = new aspnetdb.ModulePermissionDataTable();
//dsProduction.TBL_PRODUCTION_PROCESS_DETAIL_MACHINEDataTable dt = new dsProduction.TBL_PRODUCTION_PROCESS_DETAIL_MACHINEDataTable();
DataSet1.BusinessPartCommissionMasterDataTable dt = new DataSet1.BusinessPartCommissionMasterDataTable();
//CodeGenerator.TBL_ITEMPROPERTIESDataTable dt = new CodeGenerator.TBL_ITEMPROPERTIESDataTable();
public string TableName
{
get
{
String tblName = dt.TableName.Replace("DataTable", "");
tblName = "cls"+tblName.Replace("TBL_", "")+"_CDO";
return tblName;
}
}
public string ConnectionStringName = "sdmsConnectionString";
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#
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
/*
COMPANY NAME : DILIGENT INFOSYS, AHMEDABAD
PROJECT NAME : SALES AND DESTRUCTION MANAGEMENT SYSTEM
CREATE BY : MAULIK, MITESH, ANKIT, PARUL, TEJAS
CREATE DATE : $%= DateTime.Now %#
PURPOSE : FOR $%= dt.TableName%#
MODIFY BY :
MODIFY DATE :
MODIFY PURPOSE :
*/
namespace SDMClasslibrary.CDO.Master
{
public class $%=TableName%#
{
<asp:GridView ID="gvHeader" runat="server" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" AllowPaging="True" PageSize="5"#
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<Columns>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Select"
Text="Select"> </asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Delete"
Text="Delete"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
$%
foreach (DataColumn col1 in dt.Columns)
{
%#
<asp:BoundField DataField="$%=col1.ColumnName%#" HeaderText="" />
$%
}
%#
</Columns>
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
</asp:GridView#
<table>
$%
foreach (DataColumn col in dt.Columns)
{
%#
<tr>
<td>
<asp:Label ID="lbl$%=col.ColumnName%#" runat="server" Text="$%=col.ColumnName%#" CssClass="lbl"> </asp:Label>
</td>
<td>
<asp:TextBox ID="txt$%=col.ColumnName%#" runat="server" Text="$%=col.ColumnName%#" CssClass="txt"> </asp:TextBox>
</td>
</tr>
$%
}
%#
<td colspan=2 >
<asp:Button ID="btnSave" runat="server" Text="Save" CssClass="btn"> </asp:Button>
<asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="btn"> </asp:Button>
</td>
</tr>
</table>
}
}
$/pre#
$/div#
$/form#
$/body#
$/html#
2/21/11
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment