⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reports.aspx.cs

📁 民航订票系统,实现自助订票,方便快捷!请大家放心下载!
💻 CS
📖 第 1 页 / 共 2 页
字号:
			// sqlConnection1
			// 
			this.sqlConnection1.ConnectionString = "data source=NPANDEY-D185;initial catalog=Skyshark;integrated security=SSPI;persis" +
				"t security info=True;workstation id=NPANDEY-D185;packet size=4096";
			// 
			// sqlDataAdapter1
			// 
			this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1;
			this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1;
			this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
			this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
																									  new System.Data.Common.DataTableMapping("Table", "dtDepartedFlights", new System.Data.Common.DataColumnMapping[] {
																																																						   new System.Data.Common.DataColumnMapping("TicketNo", "TicketNo"),
																																																						   new System.Data.Common.DataColumnMapping("FltNo", "FltNo"),
																																																						   new System.Data.Common.DataColumnMapping("DateOfJourney", "DateOfJourney"),
																																																						   new System.Data.Common.DataColumnMapping("ClassOfRes", "ClassOfRes"),
																																																						   new System.Data.Common.DataColumnMapping("Name", "Name"),
																																																						   new System.Data.Common.DataColumnMapping("EMail", "EMail"),
																																																						   new System.Data.Common.DataColumnMapping("Fare", "Fare"),
																																																						   new System.Data.Common.DataColumnMapping("Status", "Status"),
																																																						   new System.Data.Common.DataColumnMapping("ReservedBy", "ReservedBy"),
																																																						   new System.Data.Common.DataColumnMapping("DateOfRes", "DateOfRes"),
																																																						   new System.Data.Common.DataColumnMapping("TicketConfirmed", "TicketConfirmed")})});
			this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
			// 
			// sqlSelectCommand2
			// 
			this.sqlSelectCommand2.CommandText = "SELECT FltNo, DateOfJourney, SUM(Fare) AS Revenue FROM dtDepartedFlights GROUP BY" +
				" DateOfJourney, FltNo";
			this.sqlSelectCommand2.Connection = this.sqlConnection1;
			// 
			// sqlInsertCommand2
			// 
			this.sqlInsertCommand2.CommandText = "INSERT INTO dtPassengerDetails(EMail, FareCollected, TotalTimesFlown) VALUES (@EM" +
				"ail, @FareCollected, @TotalTimesFlown); SELECT EMail, FareCollected, TotalTimesF" +
				"lown FROM dtPassengerDetails WHERE (EMail = @EMail)";
			this.sqlInsertCommand2.Connection = this.sqlConnection1;
			this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EMail", System.Data.SqlDbType.VarChar, 50, "EMail"));
			this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FareCollected", System.Data.SqlDbType.Int, 4, "FareCollected"));
			this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TotalTimesFlown", System.Data.SqlDbType.Int, 4, "TotalTimesFlown"));
			// 
			// sqlUpdateCommand2
			// 
			this.sqlUpdateCommand2.CommandText = @"UPDATE dtPassengerDetails SET EMail = @EMail, FareCollected = @FareCollected, TotalTimesFlown = @TotalTimesFlown WHERE (EMail = @Original_EMail) AND (FareCollected = @Original_FareCollected) AND (TotalTimesFlown = @Original_TotalTimesFlown); SELECT EMail, FareCollected, TotalTimesFlown FROM dtPassengerDetails WHERE (EMail = @EMail)";
			this.sqlUpdateCommand2.Connection = this.sqlConnection1;
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EMail", System.Data.SqlDbType.VarChar, 50, "EMail"));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FareCollected", System.Data.SqlDbType.Int, 4, "FareCollected"));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TotalTimesFlown", System.Data.SqlDbType.Int, 4, "TotalTimesFlown"));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EMail", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "EMail", System.Data.DataRowVersion.Original, null));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FareCollected", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "FareCollected", System.Data.DataRowVersion.Original, null));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TotalTimesFlown", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TotalTimesFlown", System.Data.DataRowVersion.Original, null));
			// 
			// sqlDeleteCommand2
			// 
			this.sqlDeleteCommand2.CommandText = "DELETE FROM dtPassengerDetails WHERE (EMail = @Original_EMail) AND (FareCollected" +
				" = @Original_FareCollected) AND (TotalTimesFlown = @Original_TotalTimesFlown)";
			this.sqlDeleteCommand2.Connection = this.sqlConnection1;
			this.sqlDeleteCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EMail", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "EMail", System.Data.DataRowVersion.Original, null));
			this.sqlDeleteCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FareCollected", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "FareCollected", System.Data.DataRowVersion.Original, null));
			this.sqlDeleteCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TotalTimesFlown", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TotalTimesFlown", System.Data.DataRowVersion.Original, null));
			// 
			// sqlDataAdapter2
			// 
			this.sqlDataAdapter2.DeleteCommand = this.sqlDeleteCommand2;
			this.sqlDataAdapter2.InsertCommand = this.sqlInsertCommand2;
			this.sqlDataAdapter2.SelectCommand = this.sqlSelectCommand2;
			this.sqlDataAdapter2.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
																									  new System.Data.Common.DataTableMapping("Table", "dtPassengerDetails", new System.Data.Common.DataColumnMapping[] {
																																																							new System.Data.Common.DataColumnMapping("EMail", "EMail"),
																																																							new System.Data.Common.DataColumnMapping("FareCollected", "FareCollected"),
																																																							new System.Data.Common.DataColumnMapping("TotalTimesFlown", "TotalTimesFlown")})});
			this.sqlDataAdapter2.UpdateCommand = this.sqlUpdateCommand2;
			// 
			// dataSet21
			// 
			this.dataSet21.DataSetName = "DataSet2";
			this.dataSet21.Locale = new System.Globalization.CultureInfo("en-US");
			this.dataSet21.Namespace = "http://www.tempuri.org/DataSet2.xsd";
			// 
			// sqlSelectCommand3
			// 
			this.sqlSelectCommand3.CommandText = "SELECT TOP 100 EMail, FareCollected, TotalTimesFlown FROM dtPassengerDetails ORDE" +
				"R BY TotalTimesFlown";
			this.sqlSelectCommand3.Connection = this.sqlConnection1;
			// 
			// sqlInsertCommand3
			// 
			this.sqlInsertCommand3.CommandText = "INSERT INTO dtPassengerDetails(EMail, FareCollected, TotalTimesFlown) VALUES (@EM" +
				"ail, @FareCollected, @TotalTimesFlown); SELECT EMail, FareCollected, TotalTimesF" +
				"lown FROM dtPassengerDetails WHERE (EMail = @EMail)";
			this.sqlInsertCommand3.Connection = this.sqlConnection1;
			this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EMail", System.Data.SqlDbType.VarChar, 50, "EMail"));
			this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FareCollected", System.Data.SqlDbType.Int, 4, "FareCollected"));
			this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TotalTimesFlown", System.Data.SqlDbType.Int, 4, "TotalTimesFlown"));
			// 
			// sqlUpdateCommand3
			// 
			this.sqlUpdateCommand3.CommandText = @"UPDATE dtPassengerDetails SET EMail = @EMail, FareCollected = @FareCollected, TotalTimesFlown = @TotalTimesFlown WHERE (EMail = @Original_EMail) AND (FareCollected = @Original_FareCollected) AND (TotalTimesFlown = @Original_TotalTimesFlown); SELECT EMail, FareCollected, TotalTimesFlown FROM dtPassengerDetails WHERE (EMail = @EMail)";
			this.sqlUpdateCommand3.Connection = this.sqlConnection1;
			this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EMail", System.Data.SqlDbType.VarChar, 50, "EMail"));
			this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FareCollected", System.Data.SqlDbType.Int, 4, "FareCollected"));
			this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TotalTimesFlown", System.Data.SqlDbType.Int, 4, "TotalTimesFlown"));
			this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EMail", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "EMail", System.Data.DataRowVersion.Original, null));
			this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FareCollected", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "FareCollected", System.Data.DataRowVersion.Original, null));
			this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TotalTimesFlown", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TotalTimesFlown", System.Data.DataRowVersion.Original, null));
			// 
			// sqlDeleteCommand3
			// 
			this.sqlDeleteCommand3.CommandText = "DELETE FROM dtPassengerDetails WHERE (EMail = @Original_EMail) AND (FareCollected" +
				" = @Original_FareCollected) AND (TotalTimesFlown = @Original_TotalTimesFlown)";
			this.sqlDeleteCommand3.Connection = this.sqlConnection1;
			this.sqlDeleteCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EMail", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "EMail", System.Data.DataRowVersion.Original, null));
			this.sqlDeleteCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FareCollected", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "FareCollected", System.Data.DataRowVersion.Original, null));
			this.sqlDeleteCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TotalTimesFlown", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TotalTimesFlown", System.Data.DataRowVersion.Original, null));
			// 
			// sqlDataAdapter3
			// 
			this.sqlDataAdapter3.DeleteCommand = this.sqlDeleteCommand3;
			this.sqlDataAdapter3.InsertCommand = this.sqlInsertCommand3;
			this.sqlDataAdapter3.SelectCommand = this.sqlSelectCommand3;
			this.sqlDataAdapter3.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
																									  new System.Data.Common.DataTableMapping("Table", "dtPassengerDetails", new System.Data.Common.DataColumnMapping[] {
																																																							new System.Data.Common.DataColumnMapping("EMail", "EMail"),
																																																							new System.Data.Common.DataColumnMapping("FareCollected", "FareCollected"),
																																																							new System.Data.Common.DataColumnMapping("TotalTimesFlown", "TotalTimesFlown")})});
			this.sqlDataAdapter3.UpdateCommand = this.sqlUpdateCommand3;
			this.Load += new System.EventHandler(this.Page_Load);
			((System.ComponentModel.ISupportInitialize)(this.dataSet21)).EndInit();

		}
		#endregion

		private void Button1_Click(object sender, System.EventArgs e)
		{
			dataSet21.Clear();
			DataGrid1.DataSource="";
			sqlConnection1.Open();
			sqlDataAdapter2.Fill(dataSet21,"Usage");
			DataView source=new DataView(dataSet21.Tables["Usage"]);
			DataGrid1.DataSource=source;
			DataGrid1.DataBind();
			sqlConnection1.Close();
		}

		private void Button3_Click(object sender, System.EventArgs e)
		{
			dataSet21.Clear();
			DataGrid1.DataSource="";
			sqlConnection1.Open();
			sqlDataAdapter3.Fill(dataSet21,"FreqFl");
			DataView source=new DataView(dataSet21.Tables["FreqFl"]);
			DataGrid1.DataSource=source;
			DataGrid1.DataBind();
			sqlConnection1.Close();
		}

		private void Button4_Click(object sender, System.EventArgs e)
		{
			dataSet21.Clear();
			DataGrid1.DataSource="";
			string month, date, year;
            month=lstMonth.SelectedItem.Text;
			year=lstYear.SelectedItem.Text;
			date=month + "/01/" + year;
			sqlConnection1.Open();
			sqlDataAdapter1.SelectCommand.Parameters[0].Value=date;
			sqlDataAdapter1.Fill(dataSet21,"Revenue");
			sqlConnection1.Close();
			DataView source=new DataView(dataSet21.Tables["Revenue"]);
			DataGrid1.DataSource=source;
			DataGrid1.DataBind();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -