ASP.NET 餐饮管理系统制作

页面介绍




以上是餐饮管理系统制作图片介绍,接下来是代码部分。
menu.aspx ~ 4KB    

双击代码全选

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

<pre class="brush:js;toolbar:false;"><%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"

CodeFile="menu.aspx.cs" Inherits="menu" Title="无标题页" %>

     

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <form id="form1" runat="server">

< style="height: 300px">

     

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"

        DataSourceID="SqlDataSource1" Height="299px"

        Width="544px" AllowPaging="True" PageSize="4">

        <PagerSettings FirstPageText="首页" LastPageText="末页"

            Mode="NextPreviousFirstLast" NextPageText="下一页"

PreviousPageText="上一页" />

        <Columns>

            <asp:BoundField DataField="menuID" HeaderText="序号" InsertVisible="False"

                ReadOnly="True" SortExpression="menuID" />

            <asp:BoundField DataField="menuName" HeaderText="菜名"

                SortExpression="menuName" />

            <asp:ImageField DataImageUrlField="menuPhoto" HeaderText="图片"

                 ControlStyle-Height="30px"

                 ControlStyle-Width="70px"

                SortExpression="menuPhoto" >

<ControlStyle Height="30px" Width="70px"></ControlStyle>

            </asp:ImageField>

            <asp:BoundField DataField="menuCooker" HeaderText="厨师"

                SortExpression="menuCooker" />

            <asp:BoundField DataField="menuStyle" HeaderText="菜系"

                SortExpression="menuStyle" />

            <asp:BoundField DataField="menuPrice" HeaderText="价格"

                SortExpression="menuPrice" />

            <asp:BoundField DataField="menuDate" HeaderText="创菜日期"

                SortExpression="menuDate" />

        </Columns>

    </asp:GridView>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server"

        ConnectionString="<%$ ConnectionStrings:ConnStr %>"

        SelectCommand="SELECT [menuID], [menuName], [menuPhoto], [menuCooker],

[menuStyle], [menuPrice], [menuDate] FROM [Menus]">

    </asp:SqlDataSource>

     

</>

    </form>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">

    < style=" height:300px ">

        

       

     <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource2">

     <HeaderTemplate >

        <table border="1" style="width: 104%; height: 36px">

        <tr>

        <td>图片</td>

        <td>菜名</td>

        <td>原价格</td>

        <td>优惠价格</td>

        </tr>         

        </HeaderTemplate>

         <ItemTemplate>

                 <tr>

                     <td style="width: 90px">

                         <asp:Image ID="Image1" runat="server" Height="88px"

                             ImageUrl='<%# Eval("menuPhoto") %>' Width="88px" />

                     </td>

                     <td style="width: 40px">

                         <asp:Label ID="Label1" runat="server"

Text='<%# Eval("menuName") %>'></asp:Label>

                     </td>

                     <td style="width: 50px">

                         <asp:Label ID="Label2" runat="server"

Text='<%# Eval("menuPrice") %>'></asp:Label>

                     </td>

                     <td style="width: 50px">

                         <asp:Label ID="Label3" runat="server"

Text='<%# Eval("menuNewPrice") %>'></asp:Label>

                     </td>

                 </tr>

         </ItemTemplate>

         <FooterTemplate></table></FooterTemplate>   

     </asp:DataList>

     <asp:SqlDataSource ID="SqlDataSource2" runat="server"

         ConnectionString="<%$ ConnectionStrings:ConnStr %>"

               

            SelectCommand="SELECT [menuName], [menuPhoto],

[menuNewPrice], [menuPrice] FROM [Menus] WHERE ([menuNewPrice] IS NOT NULL)">

     </asp:SqlDataSource>

        

       

 </>

</asp:Content></pre><p>

</p>

  <div style=" display:block; width:100%; padding-top:15px; margin:0px auto; height:90px; overflow:hidden; text-align:center;"><script src="/2011/ads/tech_content_end_468x60.js"></script><script type="text/javascript"><!--

google_ad_client = "pub-5977682010997732";

/* 468x60,  09-9-9 */

google_ad_slot = "4048873275";

google_ad_width = 468;

google_ad_height = 60;

//-->

</script>

<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script><ins style="display:inline-table;border:none;height:60px;margin:0;padding:0;position:relative;visibility:visible;width:468px"><ins id="aswift_1_anchor" style="display:block;border:none;height:60px;margin:0;padding:0;position:relative;visibility:visible;width:468px"><iframe allowtransparency="true" hspace="0" marginwidth="0" marginheight="0" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){i+='.call';setTimeout(h,0)}else if(h.match){i+='.nav';w.location.replace(h)}s.log&&s.log.push(i)}" vspace="0" id="aswift_1" name="aswift_1" style="left:0;position:absolute;top:0;" frameborder="0" height="60" scrolling="no" width="468"></iframe></ins></ins>

</div>

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

Grow your business fast with

Suku