?? 機房管理.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
namespace 機房計費系統
{
/// <summary>
/// 機房管理 的摘要說明。
/// </summary>
public class 機房管理 : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.DataGrid dataGrid4;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
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.SqlConnection sqlConnection1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter2;
private System.Data.SqlClient.SqlCommand sqlSelectCommand2;
private System.Data.SqlClient.SqlCommand sqlInsertCommand2;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand2;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand2;
private DataSet sds=new DataSet();
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Label label12;
DateTime timeSj;
private System.Data.SqlClient.SqlConnection sqlConnection2;
/// <summary>
/// 必需的設計器變量。
/// </summary>
private System.ComponentModel.Container components = null;
public 機房管理()
{
//
// 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()
{
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.button7 = new System.Windows.Forms.Button();
this.dataGrid4 = new System.Windows.Forms.DataGrid();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label4 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.textBox5 = new System.Windows.Forms.TextBox();
this.button5 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.textBox3 = new System.Windows.Forms.TextBox();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.textBox6 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDataAdapter2 = 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.button2 = new System.Windows.Forms.Button();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.label12 = new System.Windows.Forms.Label();
this.sqlConnection2 = new System.Data.SqlClient.SqlConnection();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid4)).BeginInit();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox5.SuspendLayout();
this.SuspendLayout();
//
// groupBox3
//
this.groupBox3.Controls.Add(this.button7);
this.groupBox3.Controls.Add(this.dataGrid4);
this.groupBox3.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.groupBox3.Location = new System.Drawing.Point(32, 192);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(328, 208);
this.groupBox3.TabIndex = 13;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "機房信息";
//
// button7
//
this.button7.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button7.Location = new System.Drawing.Point(224, 160);
this.button7.Name = "button7";
this.button7.TabIndex = 2;
this.button7.Text = "提交修改";
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// dataGrid4
//
this.dataGrid4.DataMember = "";
this.dataGrid4.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.dataGrid4.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid4.Location = new System.Drawing.Point(16, 24);
this.dataGrid4.Name = "dataGrid4";
this.dataGrid4.Size = new System.Drawing.Size(296, 128);
this.dataGrid4.TabIndex = 0;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.comboBox1);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.textBox5);
this.groupBox2.Controls.Add(this.button5);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.textBox3);
this.groupBox2.Controls.Add(this.dateTimePicker1);
this.groupBox2.Controls.Add(this.groupBox4);
this.groupBox2.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.groupBox2.Location = new System.Drawing.Point(384, 192);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(280, 152);
this.groupBox2.TabIndex = 12;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "意外情況集體下機";
//
// label4
//
this.label4.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label4.Location = new System.Drawing.Point(120, 120);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(40, 23);
this.label4.TabIndex = 11;
this.label4.Text = "機房";
this.label4.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.comboBox1.Location = new System.Drawing.Point(24, 120);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(80, 24);
this.comboBox1.TabIndex = 7;
//
// label2
//
this.label2.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label2.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.label2.Location = new System.Drawing.Point(216, 80);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(40, 24);
this.label2.TabIndex = 9;
this.label2.Text = "分";
this.label2.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
//
// textBox5
//
this.textBox5.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.textBox5.Location = new System.Drawing.Point(144, 80);
this.textBox5.MaxLength = 2;
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(56, 26);
this.textBox5.TabIndex = 6;
this.textBox5.Text = "";
//
// button5
//
this.button5.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button5.Location = new System.Drawing.Point(184, 120);
this.button5.Name = "button5";
this.button5.TabIndex = 8;
this.button5.Text = "下機";
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// label1
//
this.label1.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label1.Location = new System.Drawing.Point(96, 80);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 24);
this.label1.TabIndex = 6;
this.label1.Text = "點";
this.label1.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
//
// textBox3
//
this.textBox3.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.textBox3.Location = new System.Drawing.Point(24, 80);
this.textBox3.MaxLength = 2;
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(64, 26);
this.textBox3.TabIndex = 5;
this.textBox3.Text = "";
//
// dateTimePicker1
//
this.dateTimePicker1.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.dateTimePicker1.Location = new System.Drawing.Point(24, 32);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(224, 26);
this.dateTimePicker1.TabIndex = 4;
//
// groupBox4
//
this.groupBox4.Location = new System.Drawing.Point(40, 176);
this.groupBox4.Name = "groupBox4";
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -