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

📄 viewitem.cs

📁 分布试数据库系统的管理员程序
💻 CS
📖 第 1 页 / 共 3 页
字号:
			this.btExit.Location = new System.Drawing.Point(296, 32);
			this.btExit.Name = "btExit";
			this.btExit.TabIndex = 4;
			this.btExit.Text = "退出";
			this.btExit.Click += new System.EventHandler(this.btExit_Click);
			// 
			// sqlConnection_Staff
			// 
			this.sqlConnection_Staff.ConnectionString = "workstation id=7B1EE60547FB453;packet size=4096;user id=sa;integrated security=SS" +
				"PI;initial catalog=Center;persist security info=False";
			// 
			// sqlDataAdapter_Staff
			// 
			this.sqlDataAdapter_Staff.InsertCommand = this.sqlInsertCommand1;
			this.sqlDataAdapter_Staff.SelectCommand = this.sqlSelectCommand1;
			this.sqlDataAdapter_Staff.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
																										   new System.Data.Common.DataTableMapping("Table", "Staff", new System.Data.Common.DataColumnMapping[] {
																																																					new System.Data.Common.DataColumnMapping("员工ID", "员工ID"),
																																																					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("所在分店", "所在分店")})});
			// 
			// sqlInsertCommand1
			// 
			this.sqlInsertCommand1.CommandText = @"INSERT INTO Staff(staffid, staffname, gender, staffkind, salary, staffphone, branchid) VALUES (@staffid, @staffname, @gender, @staffkind, @salary, @staffphone, @branchid); SELECT staffid AS 员工ID, staffname AS 姓名, gender AS 性别, staffkind AS 职称, salary AS 工资, staffphone AS 联系电话, branchid AS 所在分店 FROM Staff WHERE (staffid = @员工ID)";
			this.sqlInsertCommand1.Connection = this.sqlConnection_Staff;
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@staffid", System.Data.SqlDbType.VarChar, 10, "员工ID"));
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@staffname", System.Data.SqlDbType.VarChar, 50, "姓名"));
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@gender", System.Data.SqlDbType.VarChar, 2, "性别"));
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@staffkind", System.Data.SqlDbType.VarChar, 50, "职称"));
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@salary", System.Data.SqlDbType.VarChar, 10, "工资"));
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@staffphone", System.Data.SqlDbType.VarChar, 50, "联系电话"));
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@branchid", System.Data.SqlDbType.VarChar, 10, "所在分店"));
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@员工ID", System.Data.SqlDbType.VarChar, 10, "员工ID"));
			// 
			// sqlSelectCommand1
			// 
			this.sqlSelectCommand1.CommandText = "SELECT staffid AS 员工ID, staffname AS 姓名, gender AS 性别, staffkind AS 职称, salary AS" +
				" 工资, staffphone AS 联系电话, branchid AS 所在分店 FROM Staff";
			this.sqlSelectCommand1.Connection = this.sqlConnection_Staff;
			// 
			// dataGrid_View
			// 
			this.dataGrid_View.AlternatingBackColor = System.Drawing.Color.White;
			this.dataGrid_View.BackColor = System.Drawing.Color.White;
			this.dataGrid_View.BackgroundColor = System.Drawing.Color.Ivory;
			this.dataGrid_View.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.dataGrid_View.CaptionBackColor = System.Drawing.Color.DarkSlateBlue;
			this.dataGrid_View.CaptionForeColor = System.Drawing.Color.Lavender;
			this.dataGrid_View.DataMember = "";
			this.dataGrid_View.FlatMode = true;
			this.dataGrid_View.Font = new System.Drawing.Font("Tahoma", 8F);
			this.dataGrid_View.ForeColor = System.Drawing.Color.Black;
			this.dataGrid_View.GridLineColor = System.Drawing.Color.Wheat;
			this.dataGrid_View.HeaderBackColor = System.Drawing.Color.CadetBlue;
			this.dataGrid_View.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.dataGrid_View.HeaderForeColor = System.Drawing.Color.Black;
			this.dataGrid_View.LinkColor = System.Drawing.Color.DarkSlateBlue;
			this.dataGrid_View.Location = new System.Drawing.Point(24, 152);
			this.dataGrid_View.Name = "dataGrid_View";
			this.dataGrid_View.ParentRowsBackColor = System.Drawing.Color.Ivory;
			this.dataGrid_View.ParentRowsForeColor = System.Drawing.Color.Black;
			this.dataGrid_View.SelectionBackColor = System.Drawing.Color.Wheat;
			this.dataGrid_View.SelectionForeColor = System.Drawing.Color.DarkSlateBlue;
			this.dataGrid_View.Size = new System.Drawing.Size(488, 136);
			this.dataGrid_View.TabIndex = 5;
			// 
			// groupBox1
			// 
			this.groupBox1.BackColor = System.Drawing.Color.Transparent;
			this.groupBox1.Controls.Add(this.bViewAll);
			this.groupBox1.Controls.Add(this.btExit);
			this.groupBox1.Controls.Add(this.bView);
			this.groupBox1.Location = new System.Drawing.Point(64, 296);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(424, 72);
			this.groupBox1.TabIndex = 8;
			this.groupBox1.TabStop = false;
			// 
			// sqlDataAdapter_Comm
			// 
			this.sqlDataAdapter_Comm.DeleteCommand = this.sqlDeleteCommand1;
			this.sqlDataAdapter_Comm.InsertCommand = this.sqlInsertCommand2;
			this.sqlDataAdapter_Comm.SelectCommand = this.sqlSelectCommand2;
			this.sqlDataAdapter_Comm.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
																										  new System.Data.Common.DataTableMapping("Table", "Commodity", new System.Data.Common.DataColumnMapping[] {
																																																					   new System.Data.Common.DataColumnMapping("商品ID", "商品ID"),
																																																					   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.sqlDataAdapter_Comm.UpdateCommand = this.sqlUpdateCommand1;
			// 
			// dataSetView
			// 
			this.dataSetView.DataSetName = "NewDataSet";
			this.dataSetView.Locale = new System.Globalization.CultureInfo("zh-CN");
			// 
			// sqlDataAdapter_Vip
			// 
			this.sqlDataAdapter_Vip.DeleteCommand = this.sqlDeleteCommand2;
			this.sqlDataAdapter_Vip.InsertCommand = this.sqlInsertCommand3;
			this.sqlDataAdapter_Vip.SelectCommand = this.sqlSelectCommand3;
			this.sqlDataAdapter_Vip.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
																										 new System.Data.Common.DataTableMapping("Table", "Vip", new System.Data.Common.DataColumnMapping[] {
																																																				new System.Data.Common.DataColumnMapping("会员ID", "会员ID"),
																																																				new System.Data.Common.DataColumnMapping("姓名", "姓名"),
																																																				new System.Data.Common.DataColumnMapping("联系电话", "联系电话"),
																																																				new System.Data.Common.DataColumnMapping("折扣", "折扣"),
																																																				new System.Data.Common.DataColumnMapping("积分", "积分")})});
			this.sqlDataAdapter_Vip.UpdateCommand = this.sqlUpdateCommand2;
			// 
			// sqlSelectCommand3
			// 
			this.sqlSelectCommand3.CommandText = "SELECT vipid AS 会员ID, vipname AS 姓名, vipphone AS 联系电话, discount AS 折扣, consume AS" +
				" 积分 FROM Vip";
			this.sqlSelectCommand3.Connection = this.sqlConnection_Staff;
			// 
			// sqlInsertCommand3
			// 
			this.sqlInsertCommand3.CommandText = "INSERT INTO Vip(vipid, vipname, vipphone, discount, consume) VALUES (@vipid, @vip" +
				"name, @vipphone, @discount, @consume); SELECT vipid AS 会员ID, vipname AS 姓名, vipp" +
				"hone AS 联系电话, discount AS 折扣, consume AS 积分 FROM Vip WHERE (vipid = @会员ID)";
			this.sqlInsertCommand3.Connection = this.sqlConnection_Staff;
			this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@vipid", System.Data.SqlDbType.VarChar, 10, "会员ID"));
			this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@vipname", System.Data.SqlDbType.VarChar, 50, "姓名"));
			this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@vipphone", System.Data.SqlDbType.VarChar, 50, "联系电话"));
			this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@discount", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(8)), ((System.Byte)(2)), "折扣", System.Data.DataRowVersion.Current, null));
			this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@consume", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(8)), ((System.Byte)(2)), "积分", System.Data.DataRowVersion.Current, null));
			this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@会员ID", System.Data.SqlDbType.VarChar, 10, "会员ID"));
			// 
			// sqlUpdateCommand2
			// 
			this.sqlUpdateCommand2.CommandText = @"UPDATE Vip SET vipid = @vipid, vipname = @vipname, vipphone = @vipphone, discount = @discount, consume = @consume WHERE (vipid = @Original_会员ID) AND (consume = @Original_积分) AND (discount = @Original_折扣) AND (vipname = @Original_姓名) AND (vipphone = @Original_联系电话 OR @Original_联系电话 IS NULL AND vipphone IS NULL); SELECT vipid AS 会员ID, vipname AS 姓名, vipphone AS 联系电话, discount AS 折扣, consume AS 积分 FROM Vip WHERE (vipid = @会员ID)";
			this.sqlUpdateCommand2.Connection = this.sqlConnection_Staff;
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@vipid", System.Data.SqlDbType.VarChar, 10, "会员ID"));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@vipname", System.Data.SqlDbType.VarChar, 50, "姓名"));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@vipphone", System.Data.SqlDbType.VarChar, 50, "联系电话"));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@discount", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(8)), ((System.Byte)(2)), "折扣", System.Data.DataRowVersion.Current, null));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@consume", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(8)), ((System.Byte)(2)), "积分", System.Data.DataRowVersion.Current, null));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_会员ID", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "会员ID", System.Data.DataRowVersion.Original, null));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_积分", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(8)), ((System.Byte)(2)), "积分", System.Data.DataRowVersion.Original, null));
			this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_折扣", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(8)), ((System.Byte)(2)), "折扣", System.Data.DataRowVersion.Original, null));
			this.sqlUpdateCommand2.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.sqlUpdateCommand2.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.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@会员ID", System.Data.SqlDbType.VarChar, 10, "会员ID"));
			// 
			// sqlDeleteCommand2
			// 

⌨️ 快捷键说明

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