📄 tuantiyuding.aspx
字号:
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data"%>
<%@ Page language="c#" CodeBehind="tuantiyuding.aspx.cs" AutoEventWireup="false" Inherits="software.tuantiyuding" %>
<HTML>
<HEAD>
<TITLE>CustRA</TITLE>
</HEAD>
<body bgColor="#339933" text="#ffffff">
<SCRIPT runat="server">
private void submit_button2(object sender, System.EventArgs e)
{
Response.Redirect("WebForm2.aspx");
}
void Submit_Click(Object sender,EventArgs e){
SqlConnection Conn;
Conn =new SqlConnection("server=HWADEE-1G30;database=HTserverData;uid=sa;pwd=''");
Conn.Open();
string downlist1=DropDownList1.SelectedItem.Value;
string downlist2=DropDownList2.SelectedItem.Value;
string StrSql="insert into CustRA(CustRAName,CustRANo,BookTime,BookDaysSum,RoSums) values('"+TextBox1.Text+"','"+TextBox2.Text+"','"+ TextBox3.Text+"','"+downlist1+"','"+downlist2+"')";
SqlCommand Comm = new SqlCommand(StrSql, Conn);
try {
Comm.ExecuteNonQuery();
Message.Text="登记成功!";
}
catch (SqlException) {
Message.Text="登记失败!";
}
Conn.Close();
}</SCRIPT>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<META content="C#" name="CODE_LANGUAGE">
<META content="JavaScript" name="vs_defaultClientScript">
<META content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<FORM id="Form1" method="post" runat="server">
<P><FONT face="宋体"></FONT></P>
<DIV style="DISPLAY: inline; Z-INDEX: 101; LEFT: 224px; WIDTH: 176px; POSITION: absolute; TOP: 8px; HEIGHT: 32px"
ms_positioning="FlowLayout"> <STRONG><FONT size="5">
团队预定</FONT></STRONG></DIV>
<FONT face="宋体">
</FONT>
<BR>
<BR>
<BR>
团队名称
<asp:textbox id="TextBox1" style="Z-INDEX: 102; LEFT: 80px; POSITION: absolute; TOP: 64px" runat="server"
Height="26px" Width="152px" name="TextBox1"></asp:textbox><BR>
<asp:textbox id="TextBox2" style="Z-INDEX: 103; LEFT: 80px; POSITION: absolute; TOP: 104px" runat="server"
Height="25px" Width="152px" name="TextBox2"></asp:textbox><BR>
团队编号
<BR>
<BR>
预定时间
<asp:textbox id="TextBox3" style="Z-INDEX: 104; LEFT: 80px; POSITION: absolute; TOP: 144px" runat="server"
Height="24px" Width="152px" name="TextBox3"></asp:textbox>
<asp:Label id="Label1" runat="server" Width="152px" Height="24px">形式如:2006-8-1</asp:Label><BR>
<BR>
预定天数
<asp:dropdownlist id="DropDownList1" style="Z-INDEX: 105; LEFT: 80px; POSITION: absolute; TOP: 184px"
runat="server" Height="32px" Width="64px" name="DropDownList1">
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">3</asp:ListItem>
<asp:ListItem Value="4">4</asp:ListItem>
<asp:ListItem Value="5">5</asp:ListItem>
<asp:ListItem Value="6">6</asp:ListItem>
<asp:ListItem Value="7">7</asp:ListItem>
<asp:ListItem Value="8">8</asp:ListItem>
<asp:ListItem Value="9">9</asp:ListItem>
<asp:ListItem Value="10">10</asp:ListItem>
<asp:ListItem Value="11">11</asp:ListItem>
<asp:ListItem Value="12">12</asp:ListItem>
<asp:ListItem Value="13">13</asp:ListItem>
<asp:ListItem Value="14">14</asp:ListItem>
<asp:ListItem Value="15">15</asp:ListItem>
<asp:ListItem Value="16">16</asp:ListItem>
<asp:ListItem Value="17">17</asp:ListItem>
<asp:ListItem Value="19">19</asp:ListItem>
<asp:ListItem Value="20">20</asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:dropdownlist><BR>
<BR>
房间数量
<asp:dropdownlist id="DropDownList2" runat="server" Height="32px" Width="96px" name="DropDownList2">
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">3</asp:ListItem>
<asp:ListItem Value="4">4</asp:ListItem>
<asp:ListItem Value="5">5</asp:ListItem>
<asp:ListItem Value="6">6</asp:ListItem>
<asp:ListItem Value="7">7</asp:ListItem>
<asp:ListItem Value="8">8</asp:ListItem>
<asp:ListItem Value="9">9</asp:ListItem>
<asp:ListItem Value="10">10</asp:ListItem>
<asp:ListItem Value="11">11</asp:ListItem>
<asp:ListItem Value="12">12</asp:ListItem>
<asp:ListItem Value="13">13</asp:ListItem>
<asp:ListItem Value="14">14</asp:ListItem>
<asp:ListItem Value="15">15</asp:ListItem>
<asp:ListItem Value="16">16</asp:ListItem>
<asp:ListItem Value="17">17</asp:ListItem>
<asp:ListItem Value="18">18</asp:ListItem>
<asp:ListItem Value="19">19</asp:ListItem>
<asp:ListItem Value="20">20</asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:dropdownlist><br>
<br>
<P></P>
<P><FONT face="宋体">
<asp:Label ID="Message" Runat="server" Width="89px"></asp:Label>
<asp:button id="Button1" onclick="Submit_Click" runat="server" Height="48px" Width="152px" Font-Size="Large"
Text="提交" name="Submit"></asp:button></FONT></P>
<P><FONT face="宋体">
</P>
<P>
<asp:Button id="Button2" OnClick="submit_button2" runat="server" Width="74px" Height="32px"
Text="返回"></asp:Button></P>
</FONT>
</FORM>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -