?? 機房管理.cs
字號:
this.groupBox4.Size = new System.Drawing.Size(200, 40);
this.groupBox4.TabIndex = 16;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "groupBox4";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.label11);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.textBox6);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.textBox4);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.textBox2);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(32, 24);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(632, 144);
this.groupBox1.TabIndex = 14;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "充值優惠政策";
//
// button1
//
this.button1.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button1.Location = new System.Drawing.Point(536, 112);
this.button1.Name = "button1";
this.button1.TabIndex = 12;
this.button1.Text = "提交修改";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label11
//
this.label11.Location = new System.Drawing.Point(528, 40);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(40, 23);
this.label11.TabIndex = 11;
this.label11.Text = "%";
//
// label10
//
this.label10.Location = new System.Drawing.Point(528, 88);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(40, 23);
this.label10.TabIndex = 10;
this.label10.Text = "%";
//
// label9
//
this.label9.Location = new System.Drawing.Point(248, 80);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(40, 23);
this.label9.TabIndex = 9;
this.label9.Text = "元";
//
// label8
//
this.label8.Location = new System.Drawing.Point(248, 40);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(40, 23);
this.label8.TabIndex = 8;
this.label8.Text = "元";
//
// textBox6
//
this.textBox6.Location = new System.Drawing.Point(416, 80);
this.textBox6.MaxLength = 4;
this.textBox6.Name = "textBox6";
this.textBox6.TabIndex = 7;
this.textBox6.Text = "textBox6";
//
// label7
//
this.label7.Location = new System.Drawing.Point(312, 80);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(80, 23);
this.label7.TabIndex = 6;
this.label7.Text = "優惠比例";
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(416, 32);
this.textBox4.MaxLength = 4;
this.textBox4.Name = "textBox4";
this.textBox4.TabIndex = 5;
this.textBox4.Text = "textBox4";
//
// label6
//
this.label6.Location = new System.Drawing.Point(312, 32);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(80, 23);
this.label6.TabIndex = 4;
this.label6.Text = "優惠比例";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(128, 80);
this.textBox2.MaxLength = 3;
this.textBox2.Name = "textBox2";
this.textBox2.TabIndex = 3;
this.textBox2.Text = "textBox2";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(128, 32);
this.textBox1.MaxLength = 3;
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 2;
this.textBox1.Text = "textBox1";
//
// label5
//
this.label5.Location = new System.Drawing.Point(32, 32);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(72, 23);
this.label5.TabIndex = 1;
this.label5.Text = "優惠限1";
//
// label3
//
this.label3.Location = new System.Drawing.Point(32, 80);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(72, 23);
this.label3.TabIndex = 0;
this.label3.Text = "優惠限2";
//
// 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", "系統表", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("機房", "機房"),
new System.Data.Common.DataColumnMapping("定價", "定價")})});
this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = "DELETE FROM 系統表 WHERE (機房 = @Original_機房) AND (定價 = @Original_定價 OR @Original_定價 " +
"IS NULL AND 定價 IS NULL)";
this.sqlDeleteCommand1.Connection = this.sqlConnection1;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_機房", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "機房", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_定價", System.Data.SqlDbType.Money, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "定價", System.Data.DataRowVersion.Original, null));
//
// sqlConnection1
//
this.sqlConnection1.ConnectionString = "workstation id=XU;packet size=4096;integrated security=SSPI;data source=XU;persis" +
"t security info=False;initial catalog=jifei";
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = "INSERT INTO 系統表(機房, 定價) VALUES (@機房, @定價); SELECT 機房, 定價 FROM 系統表 WHERE (機房 = @機房" +
")";
this.sqlInsertCommand1.Connection = this.sqlConnection1;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@機房", System.Data.SqlDbType.VarChar, 10, "機房"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@定價", System.Data.SqlDbType.Money, 8, "定價"));
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT 機房, 定價 FROM 系統表";
this.sqlSelectCommand1.Connection = this.sqlConnection1;
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = "UPDATE 系統表 SET 機房 = @機房, 定價 = @定價 WHERE (機房 = @Original_機房) AND (定價 = @Original_定" +
"價 OR @Original_定價 IS NULL AND 定價 IS NULL); SELECT 機房, 定價 FROM 系統表 WHERE (機房 = @機" +
"房)";
this.sqlUpdateCommand1.Connection = this.sqlConnection1;
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@機房", System.Data.SqlDbType.VarChar, 10, "機房"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@定價", System.Data.SqlDbType.Money, 8, "定價"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_機房", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "機房", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_定價", System.Data.SqlDbType.Money, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "定價", 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", "系統表", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("機房", "機房"),
new System.Data.Common.DataColumnMapping("定價", "定價"),
new System.Data.Common.DataColumnMapping("機器數", "機器數")})});
this.sqlDataAdapter2.UpdateCommand = this.sqlUpdateCommand2;
//
// sqlDeleteCommand2
//
this.sqlDeleteCommand2.CommandText = "DELETE FROM 系統表 WHERE (機房 = @Original_機房) AND (定價 = @Original_定價 OR @Original_定價 " +
"IS NULL AND 定價 IS NULL) AND (機器數 = @Original_機器數 OR @Original_機器數 IS NULL AND 機器" +
"數 IS NULL)";
this.sqlDeleteCommand2.Connection = this.sqlConnection1;
this.sqlDeleteCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_機房", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "機房", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_定價", System.Data.SqlDbType.Money, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "定價", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_機器數", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "機器數", System.Data.DataRowVersion.Original, null));
//
// sqlInsertCommand2
//
this.sqlInsertCommand2.CommandText = "INSERT INTO 系統表(機房, 定價, 機器數) VALUES (@機房, @定價, @機器數); SELECT 機房, 定價, 機器數 FROM 系統表" +
" WHERE (機房 = @機房)";
this.sqlInsertCommand2.Connection = this.sqlConnection1;
this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@機房", System.Data.SqlDbType.VarChar, 10, "機房"));
this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@定價", System.Data.SqlDbType.Money, 8, "定價"));
this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@機器數", System.Data.SqlDbType.VarChar, 10, "機器數"));
//
// sqlSelectCommand2
//
this.sqlSelectCommand2.CommandText = "SELECT 機房, 定價, 機器數 FROM 系統表";
this.sqlSelectCommand2.Connection = this.sqlConnection1;
//
// sqlUpdateCommand2
//
this.sqlUpdateCommand2.CommandText = "UPDATE 系統表 SET 機房 = @機房, 定價 = @定價, 機器數 = @機器數 WHERE (機房 = @Original_機房) AND (定價 =" +
" @Original_定價 OR @Original_定價 IS NULL AND 定價 IS NULL) AND (機器數 = @Original_機器數 O" +
"R @Original_機器數 IS NULL AND 機器數 IS NULL); SELECT 機房, 定價, 機器數 FROM 系統表 WHERE (機房 " +
"= @機房)";
this.sqlUpdateCommand2.Connection = this.sqlConnection1;
this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@機房", System.Data.SqlDbType.VarChar, 10, "機房"));
this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@定價", System.Data.SqlDbType.Money, 8, "定價"));
this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@機器數", System.Data.SqlDbType.VarChar, 10, "機器數"));
this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_機房", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "機房", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_定價", System.Data.SqlDbType.Money, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "定價", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_機器數", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "機器數", System.Data.DataRowVersion.Original, null));
//
// button2
//
this.button2.Location = new System.Drawing.Point(184, 16);
this.button2.Name = "button2";
this.button2.TabIndex = 15;
this.button2.Text = "系統歸零";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// groupBox5
//
this.groupBox5.Controls.Add(this.label12);
this.groupBox5.Controls.Add(this.button2);
this.groupBox5.Location = new System.Drawing.Point(384, 352);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(280, 48);
this.groupBox5.TabIndex = 16;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "系統重設";
//
// label12
//
this.label12.ForeColor = System.Drawing.SystemColors.ControlText;
this.label12.Location = new System.Drawing.Point(16, 16);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(144, 23);
this.label12.TabIndex = 16;
this.label12.Text = "清除歷史上機、收費記錄";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// sqlConnection2
//
this.sqlConnection2.ConnectionString = "workstation id=XU;packet size=4096;integrated security=SSPI;data source=XU;persis" +
"t security info=False;initial catalog=jifei";
//
// 機房管理
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(692, 416);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.MaximizeBox = false;
this.Name = "機房管理";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "機房管理";
this.Load += new System.EventHandler(this.機房管理_Load);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -