Exemple #1
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     this.label1 = new System.Windows.Forms.Label();
     this.StoresComboBox = new System.Windows.Forms.ComboBox();
     this.dataGrid1 = new System.Windows.Forms.DataGrid();
     this.StoreSalesDataSet1 = new PopulatingAndUpdateingDataSets.StoreSalesDataSet();
     this.UpdateButton = new System.Windows.Forms.Button();
     this.SalesSQLDataAdapter = new System.Data.SqlClient.SqlDataAdapter();
     this.SalesSQLDeleteCommand = new System.Data.SqlClient.SqlCommand();
     this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
     this.SalesSQLInsertCommand = new System.Data.SqlClient.SqlCommand();
     this.SalesSQLSelectCommand = new System.Data.SqlClient.SqlCommand();
     this.SalesSQLUpdateCommand = new System.Data.SqlClient.SqlCommand();
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.StoreSalesDataSet1)).BeginInit();
     this.SuspendLayout();
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.Location = new System.Drawing.Point(28, 16);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(43, 13);
     this.label1.TabIndex = 0;
     this.label1.Text = "Stores";
     //
     // StoresComboBox
     //
     this.StoresComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.StoresComboBox.Location = new System.Drawing.Point(28, 32);
     this.StoresComboBox.Name = "StoresComboBox";
     this.StoresComboBox.Size = new System.Drawing.Size(148, 21);
     this.StoresComboBox.TabIndex = 1;
     //
     // dataGrid1
     //
     this.dataGrid1.DataMember = "sales";
     this.dataGrid1.DataSource = this.StoreSalesDataSet1;
     this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
     this.dataGrid1.Location = new System.Drawing.Point(28, 64);
     this.dataGrid1.Name = "dataGrid1";
     this.dataGrid1.Size = new System.Drawing.Size(488, 176);
     this.dataGrid1.TabIndex = 2;
     //
     // StoreSalesDataSet1
     //
     this.StoreSalesDataSet1.DataSetName = "StoreSalesDataSet";
     this.StoreSalesDataSet1.Locale = new System.Globalization.CultureInfo("en-US");
     this.StoreSalesDataSet1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
     //
     // UpdateButton
     //
     this.UpdateButton.Location = new System.Drawing.Point(441, 256);
     this.UpdateButton.Name = "UpdateButton";
     this.UpdateButton.Size = new System.Drawing.Size(75, 23);
     this.UpdateButton.TabIndex = 3;
     this.UpdateButton.Text = "Update";
     this.UpdateButton.Click += new System.EventHandler(this.UpdateButton_Click);
     //
     // SalesSQLDataAdapter
     //
     this.SalesSQLDataAdapter.DeleteCommand = this.SalesSQLDeleteCommand;
     this.SalesSQLDataAdapter.InsertCommand = this.SalesSQLInsertCommand;
     this.SalesSQLDataAdapter.SelectCommand = this.SalesSQLSelectCommand;
     this.SalesSQLDataAdapter.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
     new System.Data.Common.DataTableMapping("Table", "sales", new System.Data.Common.DataColumnMapping[] {
                 new System.Data.Common.DataColumnMapping("stor_id", "stor_id"),
                 new System.Data.Common.DataColumnMapping("ord_num", "ord_num"),
                 new System.Data.Common.DataColumnMapping("qty", "qty"),
                 new System.Data.Common.DataColumnMapping("ord_date", "ord_date"),
                 new System.Data.Common.DataColumnMapping("payterms", "payterms"),
                 new System.Data.Common.DataColumnMapping("title_id", "title_id")})});
     this.SalesSQLDataAdapter.UpdateCommand = this.SalesSQLUpdateCommand;
     //
     // SalesSQLDeleteCommand
     //
     this.SalesSQLDeleteCommand.CommandText = resources.GetString("SalesSQLDeleteCommand.CommandText");
     this.SalesSQLDeleteCommand.Connection = this.sqlConnection1;
     this.SalesSQLDeleteCommand.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] {
     new System.Data.SqlClient.SqlParameter("@Original_ord_num", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ord_num", System.Data.DataRowVersion.Original, null),
     new System.Data.SqlClient.SqlParameter("@Original_stor_id", System.Data.SqlDbType.VarChar, 4, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "stor_id", System.Data.DataRowVersion.Original, null),
     new System.Data.SqlClient.SqlParameter("@Original_title_id", System.Data.SqlDbType.VarChar, 6, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "title_id", System.Data.DataRowVersion.Original, null),
     new System.Data.SqlClient.SqlParameter("@Original_ord_date", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ord_date", System.Data.DataRowVersion.Original, null),
     new System.Data.SqlClient.SqlParameter("@Original_payterms", System.Data.SqlDbType.VarChar, 12, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "payterms", System.Data.DataRowVersion.Original, null),
     new System.Data.SqlClient.SqlParameter("@Original_qty", System.Data.SqlDbType.SmallInt, 2, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "qty", System.Data.DataRowVersion.Original, null)});
     //
     // sqlConnection1
     //
     this.sqlConnection1.ConnectionString = "Data Source=(LocalDB)\\v11.0;AttachDbFilename=C:\\Users\\NikLubz\\Source\\Repos\\School" +
     "Work\\3350Y\\Lab11\\Databases\\pubs.mdf;Integrated Security=True;Connect Timeout=30";
     this.sqlConnection1.FireInfoMessageEventOnUserErrors = false;
     //
     // SalesSQLInsertCommand
     //
     this.SalesSQLInsertCommand.CommandText = resources.GetString("SalesSQLInsertCommand.CommandText");
     this.SalesSQLInsertCommand.Connection = this.sqlConnection1;
     this.SalesSQLInsertCommand.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] {
     new System.Data.SqlClient.SqlParameter("@stor_id", System.Data.SqlDbType.VarChar, 4, "stor_id"),
     new System.Data.SqlClient.SqlParameter("@ord_num", System.Data.SqlDbType.VarChar, 20, "ord_num"),
     new System.Data.SqlClient.SqlParameter("@qty", System.Data.SqlDbType.SmallInt, 2, "qty"),
     new System.Data.SqlClient.SqlParameter("@ord_date", System.Data.SqlDbType.DateTime, 8, "ord_date"),
     new System.Data.SqlClient.SqlParameter("@payterms", System.Data.SqlDbType.VarChar, 12, "payterms"),
     new System.Data.SqlClient.SqlParameter("@title_id", System.Data.SqlDbType.VarChar, 6, "title_id")});
     //
     // SalesSQLSelectCommand
     //
     this.SalesSQLSelectCommand.CommandText = "SELECT stor_id, ord_num, qty, ord_date, payterms, title_id FROM sales WHERE (stor" +
     "_id = @stor_id)";
     this.SalesSQLSelectCommand.Connection = this.sqlConnection1;
     this.SalesSQLSelectCommand.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] {
     new System.Data.SqlClient.SqlParameter("@stor_id", System.Data.SqlDbType.VarChar, 4, "stor_id")});
     //
     // SalesSQLUpdateCommand
     //
     this.SalesSQLUpdateCommand.CommandText = resources.GetString("SalesSQLUpdateCommand.CommandText");
     this.SalesSQLUpdateCommand.Connection = this.sqlConnection1;
     this.SalesSQLUpdateCommand.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] {
     new System.Data.SqlClient.SqlParameter("@Param1", System.Data.SqlDbType.VarChar, 4, "stor_id"),
     new System.Data.SqlClient.SqlParameter("@ord_num", System.Data.SqlDbType.VarChar, 20, "ord_num"),
     new System.Data.SqlClient.SqlParameter("@qty", System.Data.SqlDbType.SmallInt, 2, "qty"),
     new System.Data.SqlClient.SqlParameter("@ord_date", System.Data.SqlDbType.DateTime, 8, "ord_date"),
     new System.Data.SqlClient.SqlParameter("@payterms", System.Data.SqlDbType.VarChar, 12, "payterms"),
     new System.Data.SqlClient.SqlParameter("@title_id", System.Data.SqlDbType.VarChar, 6, "title_id"),
     new System.Data.SqlClient.SqlParameter("@Original_ord_num", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ord_num", System.Data.DataRowVersion.Original, null),
     new System.Data.SqlClient.SqlParameter("@Original_stor_id", System.Data.SqlDbType.VarChar, 4, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "stor_id", System.Data.DataRowVersion.Original, null),
     new System.Data.SqlClient.SqlParameter("@Original_title_id", System.Data.SqlDbType.VarChar, 6, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "title_id", System.Data.DataRowVersion.Original, null),
     new System.Data.SqlClient.SqlParameter("@Original_ord_date", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ord_date", System.Data.DataRowVersion.Original, null),
     new System.Data.SqlClient.SqlParameter("@Original_payterms", System.Data.SqlDbType.VarChar, 12, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "payterms", System.Data.DataRowVersion.Original, null),
     new System.Data.SqlClient.SqlParameter("@Original_qty", System.Data.SqlDbType.SmallInt, 2, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "qty", System.Data.DataRowVersion.Original, null),
     new System.Data.SqlClient.SqlParameter("@stor_id", System.Data.SqlDbType.VarChar, 4, "stor_id")});
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(544, 294);
     this.Controls.Add(this.UpdateButton);
     this.Controls.Add(this.dataGrid1);
     this.Controls.Add(this.StoresComboBox);
     this.Controls.Add(this.label1);
     this.Name = "Form1";
     this.Text = "Store Orders";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.StoreSalesDataSet1)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Exemple #2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     this.label1 = new System.Windows.Forms.Label();
     this.StoresComboBox = new System.Windows.Forms.ComboBox();
     this.dataGrid1 = new System.Windows.Forms.DataGrid();
     this.StoreSalesDataSet1 = new PopulatingAndUpdateingDataSets.StoreSalesDataSet();
     this.SalesSQLDataAdapter = new System.Data.SqlClient.SqlDataAdapter();
     this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
     this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
     this.groupBox1 = new System.Windows.Forms.GroupBox();
     this.StateLabel = new System.Windows.Forms.Label();
     this.CityLabel = new System.Windows.Forms.Label();
     this.CompanyNameLabel = new System.Windows.Forms.Label();
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.StoreSalesDataSet1)).BeginInit();
     this.groupBox1.SuspendLayout();
     this.SuspendLayout();
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.Location = new System.Drawing.Point(28, 16);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(43, 13);
     this.label1.TabIndex = 0;
     this.label1.Text = "Stores";
     //
     // StoresComboBox
     //
     this.StoresComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.StoresComboBox.Location = new System.Drawing.Point(28, 32);
     this.StoresComboBox.Name = "StoresComboBox";
     this.StoresComboBox.Size = new System.Drawing.Size(148, 21);
     this.StoresComboBox.TabIndex = 1;
     //
     // dataGrid1
     //
     this.dataGrid1.DataMember = "sales";
     this.dataGrid1.DataSource = this.StoreSalesDataSet1;
     this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
     this.dataGrid1.Location = new System.Drawing.Point(28, 64);
     this.dataGrid1.Name = "dataGrid1";
     this.dataGrid1.Size = new System.Drawing.Size(488, 176);
     this.dataGrid1.TabIndex = 2;
     //
     // StoreSalesDataSet1
     //
     this.StoreSalesDataSet1.DataSetName = "StoreSalesDataSet";
     this.StoreSalesDataSet1.Locale = new System.Globalization.CultureInfo("en-US");
     this.StoreSalesDataSet1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
     //
     // SalesSQLDataAdapter
     //
     this.SalesSQLDataAdapter.SelectCommand = this.sqlSelectCommand1;
     this.SalesSQLDataAdapter.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
     new System.Data.Common.DataTableMapping("Table", "sales", new System.Data.Common.DataColumnMapping[] {
                 new System.Data.Common.DataColumnMapping("stor_id", "stor_id"),
                 new System.Data.Common.DataColumnMapping("ord_num", "ord_num"),
                 new System.Data.Common.DataColumnMapping("qty", "qty"),
                 new System.Data.Common.DataColumnMapping("ord_date", "ord_date"),
                 new System.Data.Common.DataColumnMapping("payterms", "payterms"),
                 new System.Data.Common.DataColumnMapping("title_id", "title_id"),
                 new System.Data.Common.DataColumnMapping("Expr1", "Expr1"),
                 new System.Data.Common.DataColumnMapping("stor_name", "stor_name"),
                 new System.Data.Common.DataColumnMapping("city", "city"),
                 new System.Data.Common.DataColumnMapping("state", "state")})});
     //
     // sqlSelectCommand1
     //
     this.sqlSelectCommand1.CommandText = resources.GetString("sqlSelectCommand1.CommandText");
     this.sqlSelectCommand1.Connection = this.sqlConnection1;
     this.sqlSelectCommand1.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] {
     new System.Data.SqlClient.SqlParameter("@stor_id", System.Data.SqlDbType.VarChar, 4, "stor_id")});
     //
     // sqlConnection1
     //
     this.sqlConnection1.ConnectionString = "Data Source=(LocalDB)\\v11.0;AttachDbFilename=C:\\Users\\NikLubz\\Source\\Repos\\School" +
     "Work\\3350Y\\Lab11\\Databases\\pubs.mdf;Integrated Security=True;Connect Timeout=30";
     this.sqlConnection1.FireInfoMessageEventOnUserErrors = false;
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.StateLabel);
     this.groupBox1.Controls.Add(this.CityLabel);
     this.groupBox1.Controls.Add(this.CompanyNameLabel);
     this.groupBox1.Location = new System.Drawing.Point(32, 256);
     this.groupBox1.Name = "groupBox1";
     this.groupBox1.Size = new System.Drawing.Size(232, 72);
     this.groupBox1.TabIndex = 3;
     this.groupBox1.TabStop = false;
     this.groupBox1.Text = "Company Information";
     //
     // StateLabel
     //
     this.StateLabel.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.StoreSalesDataSet1, "sales.state", true));
     this.StateLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.StateLabel.Location = new System.Drawing.Point(96, 48);
     this.StateLabel.Name = "StateLabel";
     this.StateLabel.Size = new System.Drawing.Size(32, 13);
     this.StateLabel.TabIndex = 2;
     this.StateLabel.Text = "State";
     //
     // CityLabel
     //
     this.CityLabel.AutoSize = true;
     this.CityLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.CityLabel.Location = new System.Drawing.Point(8, 48);
     this.CityLabel.Name = "CityLabel";
     this.CityLabel.Size = new System.Drawing.Size(28, 13);
     this.CityLabel.TabIndex = 1;
     this.CityLabel.Text = "City";
     //
     // CompanyNameLabel
     //
     this.CompanyNameLabel.AutoSize = true;
     this.CompanyNameLabel.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.StoreSalesDataSet1, "sales.stor_name", true));
     this.CompanyNameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.CompanyNameLabel.Location = new System.Drawing.Point(8, 24);
     this.CompanyNameLabel.Name = "CompanyNameLabel";
     this.CompanyNameLabel.Size = new System.Drawing.Size(94, 13);
     this.CompanyNameLabel.TabIndex = 0;
     this.CompanyNameLabel.Text = "Company Name";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(560, 342);
     this.Controls.Add(this.groupBox1);
     this.Controls.Add(this.dataGrid1);
     this.Controls.Add(this.StoresComboBox);
     this.Controls.Add(this.label1);
     this.Name = "Form1";
     this.Text = "Store Orders";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.StoreSalesDataSet1)).EndInit();
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }