?? booksubscribe.cs
字號:
this.tBtnEdit.ImageIndex = 5;
this.tBtnEdit.Text = "修改";
this.tBtnEdit.ToolTipText = "修改";
//
// tBtnDelete
//
this.tBtnDelete.ImageIndex = 6;
this.tBtnDelete.Text = "刪除";
this.tBtnDelete.ToolTipText = "刪除";
//
// tBtnSubmit
//
this.tBtnSubmit.ImageIndex = 7;
this.tBtnSubmit.Text = "提交";
this.tBtnSubmit.ToolTipText = "提交";
//
// tBtnCancel
//
this.tBtnCancel.ImageIndex = 8;
this.tBtnCancel.Text = "取消";
this.tBtnCancel.ToolTipText = "取消";
//
// tBtnQuit
//
this.tBtnQuit.ImageIndex = 9;
this.tBtnQuit.Text = "退出";
this.tBtnQuit.ToolTipText = "退出";
//
// dataGrid1
//
this.dataGrid1.CaptionVisible = false;
this.dataGrid1.DataMember = "圖書征訂";
this.dataGrid1.DataSource = this.dataSet11;
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(0, 104);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.ReadOnly = true;
this.dataGrid1.Size = new System.Drawing.Size(616, 216);
this.dataGrid1.TabIndex = 42;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.checkBox1);
this.groupBox2.Controls.Add(this.cmb1);
this.groupBox2.Controls.Add(this.txt3);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.txt4);
this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.txt5);
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.txt6);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Controls.Add(this.txt7);
this.groupBox2.Controls.Add(this.label8);
this.groupBox2.Controls.Add(this.label9);
this.groupBox2.Controls.Add(this.txt8);
this.groupBox2.Controls.Add(this.txt9);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.txt10);
this.groupBox2.Location = new System.Drawing.Point(0, 318);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(616, 176);
this.groupBox2.TabIndex = 43;
this.groupBox2.TabStop = false;
//
// checkBox1
//
this.checkBox1.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.dataSet11, "圖書征訂.是否驗收"));
this.checkBox1.Enabled = false;
this.checkBox1.Location = new System.Drawing.Point(192, 142);
this.checkBox1.Name = "checkBox1";
this.checkBox1.TabIndex = 4;
this.checkBox1.Text = "是否驗收";
//
// cmb1
//
this.cmb1.Enabled = false;
this.cmb1.ItemHeight = 12;
this.cmb1.Location = new System.Drawing.Point(336, 40);
this.cmb1.Name = "cmb1";
this.cmb1.Size = new System.Drawing.Size(192, 20);
this.cmb1.TabIndex = 3;
this.cmb1.DropDown += new System.EventHandler(this.cmb1_DropDown);
//
// label4
//
this.label4.Location = new System.Drawing.Point(184, 24);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(64, 16);
this.label4.TabIndex = 1;
this.label4.Text = "圖書編號";
//
// txt4
//
this.txt4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "圖書征訂.圖書編號"));
this.txt4.Location = new System.Drawing.Point(184, 40);
this.txt4.Name = "txt4";
this.txt4.ReadOnly = true;
this.txt4.Size = new System.Drawing.Size(120, 21);
this.txt4.TabIndex = 2;
this.txt4.Text = "";
this.txt4.TextChanged += new System.EventHandler(this.txt4_TextChanged);
//
// label5
//
this.label5.Location = new System.Drawing.Point(336, 24);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(72, 16);
this.label5.TabIndex = 1;
this.label5.Text = "圖書名稱";
//
// txt5
//
this.txt5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "圖書征訂.訂購者"));
this.txt5.Location = new System.Drawing.Point(48, 96);
this.txt5.Name = "txt5";
this.txt5.ReadOnly = true;
this.txt5.TabIndex = 2;
this.txt5.Text = "";
//
// label6
//
this.label6.Location = new System.Drawing.Point(48, 80);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(48, 16);
this.label6.TabIndex = 1;
this.label6.Text = "訂購者";
//
// txt6
//
this.txt6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "圖書征訂.操作員"));
this.txt6.Location = new System.Drawing.Point(176, 96);
this.txt6.Name = "txt6";
this.txt6.ReadOnly = true;
this.txt6.TabIndex = 2;
this.txt6.Text = "";
//
// label7
//
this.label7.Location = new System.Drawing.Point(176, 80);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(56, 16);
this.label7.TabIndex = 1;
this.label7.Text = "操作員";
//
// txt7
//
this.txt7.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "圖書征訂.訂購數量"));
this.txt7.Location = new System.Drawing.Point(304, 96);
this.txt7.Name = "txt7";
this.txt7.ReadOnly = true;
this.txt7.TabIndex = 2;
this.txt7.Text = "";
//
// label8
//
this.label8.Location = new System.Drawing.Point(304, 80);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(72, 16);
this.label8.TabIndex = 1;
this.label8.Text = "訂購數量";
//
// label9
//
this.label9.Location = new System.Drawing.Point(432, 80);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(80, 16);
this.label9.TabIndex = 1;
this.label9.Text = "訂購單價";
//
// txt8
//
this.txt8.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "圖書征訂.訂購單價"));
this.txt8.Location = new System.Drawing.Point(430, 96);
this.txt8.Name = "txt8";
this.txt8.ReadOnly = true;
this.txt8.TabIndex = 2;
this.txt8.Text = "";
//
// txt9
//
this.txt9.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "圖書征訂.訂購日期"));
this.txt9.Location = new System.Drawing.Point(48, 144);
this.txt9.Name = "txt9";
this.txt9.ReadOnly = true;
this.txt9.TabIndex = 2;
this.txt9.Text = "";
//
// label11
//
this.label11.Location = new System.Drawing.Point(48, 128);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(72, 16);
this.label11.TabIndex = 1;
this.label11.Text = "訂購日期";
//
// label12
//
this.label12.Location = new System.Drawing.Point(336, 128);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(128, 16);
this.label12.TabIndex = 1;
this.label12.Text = "訂購者聯系方式";
//
// txt10
//
this.txt10.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "圖書征訂.訂購者聯系方式"));
this.txt10.Location = new System.Drawing.Point(336, 144);
this.txt10.Name = "txt10";
this.txt10.ReadOnly = true;
this.txt10.Size = new System.Drawing.Size(192, 21);
this.txt10.TabIndex = 2;
this.txt10.Text = "";
//
// btnSusbribe
//
this.btnSusbribe.Location = new System.Drawing.Point(451, 4);
this.btnSusbribe.Name = "btnSusbribe";
this.btnSusbribe.Size = new System.Drawing.Size(141, 35);
this.btnSusbribe.TabIndex = 44;
this.btnSusbribe.Text = "提交征訂(驗收)";
this.btnSusbribe.Click += new System.EventHandler(this.btnSusbribe_Click);
//
// da1
//
this.da1.DeleteCommand = this.sqlDeleteCommand1;
this.da1.InsertCommand = this.sqlInsertCommand1;
this.da1.SelectCommand = this.sqlSelectCommand1;
this.da1.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("訂購者", "訂購者"),
new System.Data.Common.DataColumnMapping("訂購者聯系方式", "訂購者聯系方式"),
new System.Data.Common.DataColumnMapping("訂購數量", "訂購數量"),
new System.Data.Common.DataColumnMapping("訂購單價", "訂購單價"),
new System.Data.Common.DataColumnMapping("訂購日期", "訂購日期"),
new System.Data.Common.DataColumnMapping("是否驗收", "是否驗收"),
new System.Data.Common.DataColumnMapping("驗收日期", "驗收日期"),
new System.Data.Common.DataColumnMapping("操作員", "操作員")})});
this.da1.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = @"DELETE FROM 圖書征訂 WHERE (征訂編號 = @Original_征訂編號) AND (圖書編號 = @Original_圖書編號) AND (操作員 = @Original_操作員 OR @Original_操作員 IS NULL AND 操作員 IS NULL) AND (是否驗收 = @Original_是否驗收 OR @Original_是否驗收 IS NULL AND 是否驗收 IS NULL) AND (訂購單價 = @Original_訂購單價 OR @Original_訂購單價 IS NULL AND 訂購單價 IS NULL) AND (訂購數量 = @Original_訂購數量 OR @Original_訂購數量 IS NULL AND 訂購數量 IS NULL) AND (訂購日期 = @Original_訂購日期 OR @Original_訂購日期 IS NULL AND 訂購日期 IS NULL) AND (訂購者 = @Original_訂購者 OR @Original_訂購者 IS NULL AND 訂購者 IS NULL) AND (訂購者聯系方式 = @Original_訂購者聯系方式 OR @Original_訂購者聯系方式 IS NULL AND 訂購者聯系方式 IS NULL) 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, 50, 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.VarChar, 50, 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.VarChar, 20, 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.Bit, 1, 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));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_訂購數量", System.Data.SqlDbType.Int, 4, 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.DateTime, 4, 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.VarChar, 100, 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.VarChar, 100, 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.DateTime, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "驗收日期", System.Data.DataRowVersion.Original, null));
//
// sqlConnection1
//
this.sqlConnection1.ConnectionString = "workstation id=localhost;Integrated Security=SSPI;Database=libbook;";
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = "INSERT INTO 圖書征訂(征訂編號, 圖書編號, 訂購者, 訂購者聯系方式, 訂購數量, 訂購單價, 訂購日期, 是否驗收, 驗收日期, 操作員) VAL" +
"UES (@征訂編號, @圖書編號, @訂購者, @訂購者聯系方式, @訂購數量, @訂購單價, @訂購日期, @是否驗收, @驗收日期, @操作員); SEL" +
"ECT 征訂編號, 圖書編號, 訂購者, 訂購者聯系方式, 訂購數量, 訂購單價, 訂購日期, 是否驗收, 驗收日期, 操作員 FROM 圖書征訂 WHERE " +
"(征訂編號 = @征訂編號)";
this.sqlInsertCommand1.Connection = this.sqlConnection1;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@征訂編號", System.Data.SqlDbType.VarChar, 50, "征訂編號"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@圖書編號", System.Data.SqlDbType.VarChar, 50, "圖書編號"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@訂購者", System.Data.SqlDbType.VarChar, 100, "訂購者"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@訂購者聯系方式", System.Data.SqlDbType.VarChar, 100, "訂購者聯系方式"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@訂購數量", System.Data.SqlDbType.Int, 4, "訂購數量"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@訂購單價", System.Data.SqlDbType.Money, 8, "訂購單價"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@訂購日期", System.Data.SqlDbType.DateTime, 4, "訂購日期"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@是否驗收", System.Data.SqlDbType.Bit, 1, "是否驗收"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@驗收日期", System.Data.SqlDbType.DateTime, 4, "驗收日期"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@操作員", System.Data.SqlDbType.VarChar, 20, "操作員"));
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT 征訂編號, 圖書編號, 訂購者, 訂購者聯系方式, 訂購數量, 訂購單價, 訂購日期, 是否驗收, 驗收日期, 操作員 FROM 圖書征訂 WHER" +
"E (是否驗收 = \'0\') AND (征訂編號 LIKE @Param3) AND (圖書編號 LIKE @Param4)";
this.sqlSelectCommand1.Connection = this.sqlConnection1;
this.sqlSelectCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Param3", System.Data.SqlDbType.VarChar, 50, "征訂編號"));
this.sqlSelectCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Param4", System.Data.SqlDbType.VarChar, 50, "圖書編號"));
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = @"UPDATE 圖書征訂 SET 征訂編號 = @征訂編號, 圖書編號 = @圖書編號, 訂購者 = @訂購者, 訂購者聯系方式 = @訂購者聯系方式, 訂購數量 = @訂購數量, 訂購單價 = @訂購單價, 訂購日期 = @訂購日期, 是否驗收 = @是否驗收, 驗收日期 = @驗收日期, 操作員 = @操作員 WHERE (征訂編號 = @Original_征訂編號) AND (圖書編號 = @Original_圖書編號) AND (操作員 = @Original_操作員 OR @Original_操作員 IS NULL AND 操作員 IS NULL) AND (是否驗收 = @Original_是否驗收 OR @Original_是否驗收 IS NULL AND 是否驗收 IS NULL) AND (訂購單價 = @Original_訂購單價 OR @Original_訂購單價 IS NULL AND 訂購單價 IS NULL) AND (訂購數量 = @Original_訂購數量 OR @Original_訂購數量 IS NULL AND 訂購數量 IS NULL) AND (訂購日期 = @Original_訂購日期 OR @Original_訂購日期 IS NULL AND 訂購日期 IS NULL) AND (訂購者 = @Original_訂購者 OR @Original_訂購者 IS NULL AND 訂購者 IS NULL) AND (訂購者聯系方式 = @Original_訂購者聯系方式 OR @Original_訂購者聯系方式 IS NULL AND 訂購者聯系方式 IS NULL) AND (驗收日期 = @Original_驗收日期 OR @Original_驗收日期 IS NULL AND 驗收日期 IS NULL); SELECT 征訂編號, 圖書編號, 訂購者, 訂購者聯系方式, 訂購數量, 訂購單價, 訂購日期, 是否驗收, 驗收日期, 操作員 FROM 圖書征訂 WHERE (征訂編號 = @征訂編號)";
this.sqlUpdateCommand1.Connection = this.sqlConnection1;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -