modernsky2003

WEB 创建自定义控件

MENU。ASCX
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="menu.ascx.cs" Inherits="menu" %>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color: #799ae1; height: 100%;">
    <tr>
        <td align="center" valign="top" style="height: 500px">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 158px">
                <tr>
                    <td style="height: 38px">
                        <img src="Images/title.gif" /></td>
                </tr>
                <tr>
                    <td align="center" rowspan="3" style="border-right: white 1px solid; background: #d6dff7;
                        overflow: hidden; border-left: white 1px solid; border-bottom: white 1px solid; height: 278px;">
                         <p>
                                    <br />
                                    <a href="users.aspx">用户信息</a></p>
                                <p>
                                    <a href="customer.aspx">客户信息</a></p>
                                <p>
                                    <a href="product.aspx">产品信息</a></p>
                                <p>
                                    <a href="customer_sale.aspx">客户销售统计</a></p>
                                <p>
                                    <a href="contract_stat.aspx">销售统计</a></p>
                                <p>
                                    <a href="contract.aspx">合同管理</a></p>
                                <p>
                                    <a href="updatepwd.aspx">修改密码</a><br />
                                </p>
                    </td></tr>

            </table>
            <table border="0" cellpadding="0" cellspacing="0" style="width: 158px">
                          <tr><td style="font-size: 9pt; background-image: url(Images/5.gif); height: 25px" align="left">
                              &nbsp;版本信息</td></tr>
                <tr>
                    <td align="center" style="border-right: white 1px solid; background: #d6dff7;
                        overflow: hidden; border-left: white 1px solid; border-bottom: white 1px solid; font-size: 9pt;">
                        瀛嘉科技版权所有</td>
                </tr>
            </table>
        </td>
    </tr>
</table>

customer_sale.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="customer_sale.aspx.cs" Inherits="customer_sale" %>
<%@ Register Src="menu.ascx" TagName="menu" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>客户销售情况</title>
</head>
<body style="margin-top: 0px; margin-left: 0px; margin-right: 0px;  font-family:宋体; font-size:14px; text-align: center;">

    <form id="form1" runat="server">
    <div>
        <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; heihgt: 100%">
            <tr>
                <td style="width: 176px; height: 14px" valign="top">
                    <uc1:menu ID="Menu1" runat="server" />
                </td>
                <td style="height: 14px; width: 777px;" valign="top">
                    <table id="Table1" border="1" cellpadding="1" cellspacing="1" style="width: 98%;
                        height: 219px">
                        <tr>
                            <td colspan="1" style="height: 36px; background-color: #cccccc">
                                <p>
                                    <strong>客户销售情况</strong></p>
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 151px" valign="top">
                                <asp:DataGrid ID="Dgd_sale" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                    DataKeyField="ID" OnCancelCommand="DataGrid_cancel" OnDeleteCommand="DataGrid_delete"
                                    OnEditCommand="DataGrid_edit" OnPageIndexChanged="DataGrid_Page" OnUpdateCommand="DataGrid_update"
                                    PageSize="3" Width="100%">
                                    <Columns>
                                        <asp:BoundColumn DataField="ID" HeaderText="编号"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Custom_id" HeaderText="客户编号"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Custom_name" HeaderText="客户名称" ReadOnly="True"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Product_id" HeaderText="产品编号"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Product_name" HeaderText=" 产品名称" ReadOnly="True"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Product_sale" HeaderText="销售数量"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Product_price" HeaderText="单价"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Product_date" HeaderText="销售月份"></asp:BoundColumn>
                                        <asp:EditCommandColumn ButtonType="LinkButton" CancelText="取消" EditText="编辑" UpdateText="更新">
                                        </asp:EditCommandColumn>
                                        <asp:ButtonColumn CommandName="Delete" Text="删除"></asp:ButtonColumn>
                                    </Columns>
                                    <PagerStyle HorizontalAlign="Right" NextPageText="下一页" PrevPageText="上一页" />
                                </asp:DataGrid><br />
                                <em></em><a href="addsale.aspx">录入客户新销售情况</a>
                                <br />
                                <asp:Label ID="Lbl_note" runat="server"></asp:Label>
                                <br />
                                <br />
                                <table id="Table2" border="0" cellpadding="1" cellspacing="1" style="height: 176px"
                                    width="100%">
                                    <tr>
                                        <td>
                                            <p>
                                                统计:</p>
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="Ddl_stat" runat="server" Width="116px">
                                                <asp:ListItem Value="0">月销售统计</asp:ListItem>
                                                <asp:ListItem Value="1">年销售统计</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 258px">
                                            客户名称:</td>
                                        <td>
                                            <asp:DropDownList ID="Ddl_customer" runat="server">
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr>
                                        <td align="right" style="width: 258px">
                                            产品名称:</td>
                                        <td>
                                            <asp:DropDownList ID="Ddl_product" runat="server">
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr>
                                        <td align="right" style="width: 258px">
                                            日期:</td>
                                        <td>
                                            <asp:TextBox ID="Tbx_date" runat="server" Width="128px"></asp:TextBox><font size="2">如:1999-2</font></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 258px">
                                        </td>
                                        <td>
                                            <asp:Button ID="Btn_ok" runat="server" OnClick="Btn_ok_Click" Text="确定" /></td>
                                    </tr>
                                </table>
                                <asp:Label ID="Lbl_amount" runat="server"></asp:Label><br />
                                <asp:Label ID="Lbl_price" runat="server"></asp:Label><br />
                                <span style="color: #ff0000">说明:本页用于统计客户销售本单位产品情况信息</span></td>
                        </tr>
                        <tr>
                            <td colspan="1" style="background-color: #cccccc">
                                <asp:Button ID="Btn_exit" runat="server" OnClick="Btn_exit_Click" Text="退出" /></td>
                        </tr>
                    </table>
                                   
                </td>
            </tr>
        </table>
   
    </div>
    </form>
</body>
</html>




posted on 2008-01-28 14:34  hekeneng  阅读(237)  评论(0编辑  收藏  举报

导航