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

📄 profit.cs

📁 分布试数据库系统的管理员程序
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using RemotingClass;
using System.Runtime.Remoting.Channels.Tcp;
using System.Runtime.Remoting.Channels;


namespace Login
{
	/// <summary>
	/// Profit 的摘要说明。
	/// </summary>
	public class Profit : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button bExit;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.DateTimePicker dateTimePicker1;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.TextBox tbGain;
		private System.Windows.Forms.GroupBox groupBox3;
		private System.Windows.Forms.Button bComputeOY;
		private System.Windows.Forms.Button bComputeOD;
		private System.Windows.Forms.Button bComputeOM;
		private System.Data.SqlClient.SqlConnection sqlConnection_Compute;
		private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter_Vendition;
		private System.Data.DataSet dataSet_Vendition;
		
		private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
		private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
		private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
		private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
		private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter_Branch;
		private System.Data.SqlClient.SqlCommand sqlSelectCommand2;
		private System.Data.SqlClient.SqlCommand sqlInsertCommand2;
		private System.Data.SqlClient.SqlCommand sqlUpdateCommand2;
		private System.Data.SqlClient.SqlCommand sqlDeleteCommand2;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Profit()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Profit));
			this.bExit = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.tbGain = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.bComputeOY = new System.Windows.Forms.Button();
			this.bComputeOD = new System.Windows.Forms.Button();
			this.bComputeOM = new System.Windows.Forms.Button();
			this.sqlConnection_Compute = new System.Data.SqlClient.SqlConnection();
			this.sqlDataAdapter_Vendition = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
			this.dataSet_Vendition = new System.Data.DataSet();
			this.sqlDataAdapter_Branch = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlDeleteCommand2 = new System.Data.SqlClient.SqlCommand();
			this.sqlInsertCommand2 = new System.Data.SqlClient.SqlCommand();
			this.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand();
			this.sqlUpdateCommand2 = new System.Data.SqlClient.SqlCommand();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.groupBox3.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dataSet_Vendition)).BeginInit();
			this.SuspendLayout();
			// 
			// bExit
			// 
			this.bExit.Location = new System.Drawing.Point(24, 160);
			this.bExit.Name = "bExit";
			this.bExit.TabIndex = 0;
			this.bExit.Text = "退出";
			this.bExit.Click += new System.EventHandler(this.bExit_Click);
			// 
			// groupBox1
			// 
			this.groupBox1.BackColor = System.Drawing.Color.Transparent;
			this.groupBox1.Controls.Add(this.dateTimePicker1);
			this.groupBox1.Location = new System.Drawing.Point(152, 32);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(280, 64);
			this.groupBox1.TabIndex = 1;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "选择日期:";
			// 
			// dateTimePicker1
			// 
			this.dateTimePicker1.Location = new System.Drawing.Point(48, 24);
			this.dateTimePicker1.Name = "dateTimePicker1";
			this.dateTimePicker1.TabIndex = 0;
			// 
			// groupBox2
			// 
			this.groupBox2.BackColor = System.Drawing.Color.Transparent;
			this.groupBox2.Controls.Add(this.tbGain);
			this.groupBox2.Controls.Add(this.label2);
			this.groupBox2.Location = new System.Drawing.Point(128, 200);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(232, 208);
			this.groupBox2.TabIndex = 2;
			this.groupBox2.TabStop = false;
			// 
			// tbGain
			// 
			this.tbGain.Location = new System.Drawing.Point(80, 104);
			this.tbGain.Name = "tbGain";
			this.tbGain.TabIndex = 4;
			this.tbGain.Text = "";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(24, 56);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(48, 23);
			this.label2.TabIndex = 1;
			this.label2.Text = "销售额:";
			// 
			// groupBox3
			// 
			this.groupBox3.BackColor = System.Drawing.Color.Transparent;
			this.groupBox3.Controls.Add(this.bComputeOY);
			this.groupBox3.Controls.Add(this.bComputeOD);
			this.groupBox3.Controls.Add(this.bComputeOM);
			this.groupBox3.Controls.Add(this.bExit);
			this.groupBox3.Location = new System.Drawing.Point(408, 200);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(120, 208);
			this.groupBox3.TabIndex = 3;
			this.groupBox3.TabStop = false;
			// 
			// bComputeOY
			// 
			this.bComputeOY.Location = new System.Drawing.Point(24, 120);
			this.bComputeOY.Name = "bComputeOY";
			this.bComputeOY.TabIndex = 2;
			this.bComputeOY.Text = "年汇总";
			this.bComputeOY.Click += new System.EventHandler(this.bComputeOY_Click);
			// 
			// bComputeOD
			// 
			this.bComputeOD.Location = new System.Drawing.Point(24, 24);
			this.bComputeOD.Name = "bComputeOD";
			this.bComputeOD.TabIndex = 0;
			this.bComputeOD.Text = "日汇总";
			this.bComputeOD.Click += new System.EventHandler(this.bComputeOD_Click);
			// 
			// bComputeOM
			// 
			this.bComputeOM.Location = new System.Drawing.Point(24, 72);
			this.bComputeOM.Name = "bComputeOM";
			this.bComputeOM.TabIndex = 1;
			this.bComputeOM.Text = "月汇总";
			this.bComputeOM.Click += new System.EventHandler(this.bComputeOM_Click);
			// 
			// sqlConnection_Compute
			// 
			this.sqlConnection_Compute.ConnectionString = "workstation id=7B1EE60547FB453;packet size=4096;user id=sa;integrated security=SS" +
				"PI;initial catalog=Center;persist security info=False";
			// 
			// sqlDataAdapter_Vendition
			// 
			this.sqlDataAdapter_Vendition.DeleteCommand = this.sqlDeleteCommand1;
			this.sqlDataAdapter_Vendition.InsertCommand = this.sqlInsertCommand1;
			this.sqlDataAdapter_Vendition.SelectCommand = this.sqlSelectCommand1;
			this.sqlDataAdapter_Vendition.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
																											   new System.Data.Common.DataTableMapping("Table", "Sale", new System.Data.Common.DataColumnMapping[] {
																																																					   new System.Data.Common.DataColumnMapping("saleid", "saleid"),
																																																					   new System.Data.Common.DataColumnMapping("branchid", "branchid"),
																																																					   new System.Data.Common.DataColumnMapping("ctime", "ctime"),
																																																					   new System.Data.Common.DataColumnMapping("gain", "gain")})});
			this.sqlDataAdapter_Vendition.UpdateCommand = this.sqlUpdateCommand1;
			// 
			// sqlDeleteCommand1
			// 
			this.sqlDeleteCommand1.CommandText = "DELETE FROM Sale WHERE (saleid = @Original_saleid) AND (branchid = @Original_bran" +
				"chid) AND (ctime = @Original_ctime) AND (gain = @Original_gain)";

⌨️ 快捷键说明

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