📄 cpgl.aspx
字号:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Cpgl.aspx.cs" Inherits="WebForm_Cpgl" Title="添加车票" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<br />
<table style="width: 535px; height: 348px">
<tr>
<td style="width: 31px">
</td>
<td colspan="2" rowspan="2" style="width: 434px">
<asp:Panel ID="Panel1" runat="server" GroupingText="车票信息" Height="227px" Width="491px">
<br />
<table style="width: 475px; height: 91px">
<tr>
<td style="width: 73px; height: 26px;">
车次编号:</td>
<td style="width: 112px; height: 26px;">
<asp:TextBox ID="TextBox1" runat="server" Width="100px"></asp:TextBox></td>
<td style="width: 172px; height: 26px">
<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="TextBox1"
ErrorMessage="请输入四位车次字符" ValidationExpression="[a-z]\d{3}" Width="153px"></asp:RegularExpressionValidator></td>
<td style="width: 23px; height: 26px">
<asp:Button ID="Button1" runat="server" Text="添加" Width="36px" OnClick="Button1_Click" TabIndex="-1" /></td>
</tr>
<tr>
<td style="width: 73px; height: 20px;">
发车地点:</td>
<td style="width: 112px; height: 20px;">
<asp:TextBox ID="TextBox2" runat="server" Width="100px"></asp:TextBox></td>
<td style="width: 172px; height: 20px">
</td>
<td style="width: 23px; height: 20px">
<input id="Reset1" style="width: 35px" type="reset" value="清空" language="javascript" /></td>
</tr>
<tr>
<td style="width: 73px">
目的地点:</td>
<td style="width: 112px">
<asp:TextBox ID="TextBox3" runat="server" Width="100px"></asp:TextBox></td>
<td style="width: 172px">
</td>
<td style="width: 23px">
</td>
</tr>
<tr>
<td style="width: 73px; height: 23px">
票价:</td>
<td style="width: 112px; height: 23px">
<asp:TextBox ID="TextBox4" runat="server" Width="100px"></asp:TextBox></td>
<td style="width: 172px; height: 23px">
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="TextBox4"
ErrorMessage="请输入数字" ValidationExpression="\d+"></asp:RegularExpressionValidator></td>
<td style="height: 23px; width: 23px;">
</td>
</tr>
<tr>
<td style="width: 73px; height: 21px">
数量:</td>
<td style="width: 112px; height: 21px">
<asp:TextBox ID="TextBox5" runat="server" Width="100px"></asp:TextBox></td>
<td style="width: 172px; height: 21px">
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TextBox5"
ErrorMessage="请输入数字" ValidationExpression="\d+"></asp:RegularExpressionValidator></td>
<td style="height: 21px; width: 23px;">
</td>
</tr>
<tr>
<td style="width: 73px">
发车时间:</td>
<td style="width: 112px">
<asp:TextBox ID="TextBox6" runat="server" Width="100px"></asp:TextBox></td>
<td style="width: 172px">
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox6"
ErrorMessage="时间格式不对" Height="20px" ValidationExpression="\d{1,2}:\d{2}:\d{2}"
Width="109px"></asp:RegularExpressionValidator></td>
<td style="width: 23px">
</td>
</tr>
</table>
</asp:Panel>
<asp:Label ID="Label1" runat="server" ForeColor="Red"></asp:Label></td>
</tr>
<tr>
<td style="width: 31px; height: 159px">
</td>
</tr>
<tr>
<td style="width: 31px; height: 107px">
</td>
<td colspan="2" style="width: 434px; height: 107px">
<asp:Panel ID="Panel2" runat="server" GroupingText="备注" Height="86px" Width="490px">
<asp:TextBox ID="TextBox7" runat="server" Height="38px" TextMode="MultiLine" Width="449px"></asp:TextBox></asp:Panel>
</td>
</tr>
<tr>
<td style="width: 31px">
</td>
<td colspan="2" style="width: 434px">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [unbuy]" InsertCommand="INSERT INTO unbuy(车次编号, 发车地点, 目的地点, 票价, 数量, 发车时间, 备注) VALUES (@车次编号, @发车地点, @目的地点, @票价, @数量, @发车时间, @备注)">
<InsertParameters>
<asp:ControlParameter ControlID="TextBox1" Name="车次编号" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox2" Name="发车地点" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox3" Name="目的地点" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox4" Name="票价" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox5" Name="数量" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox6" Name="发车时间" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox7" Name="备注" PropertyName="Text" />
</InsertParameters>
</asp:SqlDataSource>
</td>
</tr>
</table>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -