Start intergration of scrap-routine
This commit is contained in:
@ -22,7 +22,7 @@ namespace RepositoryPattern
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Container = Configure();
|
||||
Application.Run(new Form1(Container.Resolve<IProductRepository>(),Container.Resolve<IStockMemberRepository>()));
|
||||
Application.Run(new frmInitial(Container.Resolve<IProductRepository>(),Container.Resolve<IStockMemberRepository>()));
|
||||
}
|
||||
/// <summary>
|
||||
/// Setting dependency injection
|
||||
@ -33,7 +33,7 @@ namespace RepositoryPattern
|
||||
var builder = new ContainerBuilder();
|
||||
builder.RegisterType<ProductRepository>().As<IProductRepository>();
|
||||
builder.RegisterType<StockMemberRepository>().As<IStockMemberRepository>();
|
||||
builder.RegisterType<Form1>();
|
||||
builder.RegisterType<frmInitial>();
|
||||
return builder.Build();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
namespace RepositoryPattern
|
||||
{
|
||||
partial class Form1
|
||||
partial class frmInitial
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@ -32,20 +32,22 @@ namespace RepositoryPattern
|
||||
this.dataGridView = new System.Windows.Forms.DataGridView();
|
||||
this.lblTotalRecords = new System.Windows.Forms.Label();
|
||||
this.gB1 = new System.Windows.Forms.GroupBox();
|
||||
this.btnReload = new System.Windows.Forms.Button();
|
||||
this.rdbStock = new System.Windows.Forms.RadioButton();
|
||||
this.rdbNorth = new System.Windows.Forms.RadioButton();
|
||||
this.btnReload = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||
this.gB1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dataGridView
|
||||
//
|
||||
this.dataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView.Location = new System.Drawing.Point(12, 12);
|
||||
this.dataGridView.Location = new System.Drawing.Point(12, 16);
|
||||
this.dataGridView.Name = "dataGridView";
|
||||
this.dataGridView.RowTemplate.Height = 25;
|
||||
this.dataGridView.Size = new System.Drawing.Size(776, 393);
|
||||
this.dataGridView.Size = new System.Drawing.Size(776, 389);
|
||||
this.dataGridView.TabIndex = 0;
|
||||
//
|
||||
// lblTotalRecords
|
||||
@ -62,34 +64,12 @@ namespace RepositoryPattern
|
||||
this.gB1.Controls.Add(this.btnReload);
|
||||
this.gB1.Controls.Add(this.rdbStock);
|
||||
this.gB1.Controls.Add(this.rdbNorth);
|
||||
this.gB1.Location = new System.Drawing.Point(220, 410);
|
||||
this.gB1.Location = new System.Drawing.Point(157, 411);
|
||||
this.gB1.Name = "gB1";
|
||||
this.gB1.Size = new System.Drawing.Size(248, 35);
|
||||
this.gB1.TabIndex = 3;
|
||||
this.gB1.TabStop = false;
|
||||
//
|
||||
// rdbStock
|
||||
//
|
||||
this.rdbStock.AutoSize = true;
|
||||
this.rdbStock.Location = new System.Drawing.Point(98, 9);
|
||||
this.rdbStock.Name = "rdbStock";
|
||||
this.rdbStock.Size = new System.Drawing.Size(54, 19);
|
||||
this.rdbStock.TabIndex = 1;
|
||||
this.rdbStock.Text = "Stock";
|
||||
this.rdbStock.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rdbNorth
|
||||
//
|
||||
this.rdbNorth.AutoSize = true;
|
||||
this.rdbNorth.Checked = true;
|
||||
this.rdbNorth.Location = new System.Drawing.Point(7, 9);
|
||||
this.rdbNorth.Name = "rdbNorth";
|
||||
this.rdbNorth.Size = new System.Drawing.Size(84, 19);
|
||||
this.rdbNorth.TabIndex = 0;
|
||||
this.rdbNorth.TabStop = true;
|
||||
this.rdbNorth.Text = "NorthWind";
|
||||
this.rdbNorth.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnReload
|
||||
//
|
||||
this.btnReload.Location = new System.Drawing.Point(158, 9);
|
||||
@ -100,16 +80,38 @@ namespace RepositoryPattern
|
||||
this.btnReload.UseVisualStyleBackColor = true;
|
||||
this.btnReload.Click += new System.EventHandler(this.btnReload_Click);
|
||||
//
|
||||
// Form1
|
||||
// rdbStock
|
||||
//
|
||||
this.rdbStock.AutoSize = true;
|
||||
this.rdbStock.Checked = true;
|
||||
this.rdbStock.Location = new System.Drawing.Point(98, 9);
|
||||
this.rdbStock.Name = "rdbStock";
|
||||
this.rdbStock.Size = new System.Drawing.Size(54, 19);
|
||||
this.rdbStock.TabIndex = 1;
|
||||
this.rdbStock.TabStop = true;
|
||||
this.rdbStock.Text = "Stock";
|
||||
this.rdbStock.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rdbNorth
|
||||
//
|
||||
this.rdbNorth.AutoSize = true;
|
||||
this.rdbNorth.Location = new System.Drawing.Point(7, 9);
|
||||
this.rdbNorth.Name = "rdbNorth";
|
||||
this.rdbNorth.Size = new System.Drawing.Size(84, 19);
|
||||
this.rdbNorth.TabIndex = 0;
|
||||
this.rdbNorth.Text = "NorthWind";
|
||||
this.rdbNorth.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// frmInitial
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.ClientSize = new System.Drawing.Size(800, 509);
|
||||
this.Controls.Add(this.gB1);
|
||||
this.Controls.Add(this.lblTotalRecords);
|
||||
this.Controls.Add(this.dataGridView);
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "Form1";
|
||||
this.Name = "frmInitial";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Repository Pattern";
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
@ -11,12 +11,12 @@ using System.Windows.Forms;
|
||||
|
||||
namespace RepositoryPattern
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
public partial class frmInitial : Form
|
||||
{
|
||||
IProductRepository _productRepository;
|
||||
private readonly IStockMemberRepository _stockMemberRepository;
|
||||
|
||||
public Form1(IProductRepository productRepository,IStockMemberRepository stockMemberRepository)
|
||||
public frmInitial(IProductRepository productRepository,IStockMemberRepository stockMemberRepository)
|
||||
{
|
||||
InitializeComponent();
|
||||
_productRepository = productRepository;
|
||||
Reference in New Issue
Block a user