public Articles() { InitializeComponent(); selectedArticle = null; articlesRepo = new App1CL.Repositories.ArticlesRepo(); ArticlesGridView.DataSource = articlesRepo.Get(); }
public Edit(App1CL.Models.Article _article) { InitializeComponent(); articlesRepo = new App1CL.Repositories.ArticlesRepo(); article = _article; RefTextBox.Text = article.Ref; DescriptionTextBox.Text = article.Description; PriceTextBox.Text = article.Price.ToString(); }
private void ArticlesGridView_SelectionChanged(object sender, EventArgs e) { selectedArticle = new App1CL.Models.Article { Ref = ArticlesGridView.CurrentRow.Cells["Ref"].Value.ToString(), Description = ArticlesGridView.CurrentRow.Cells["Description"].Value.ToString(), Price = Convert.ToDecimal(ArticlesGridView.CurrentRow.Cells["Price"].Value) }; }
public Remove(App1CL.Models.Article _article) { InitializeComponent(); articlesRepo = new App1CL.Repositories.ArticlesRepo(); article = _article; ReferenceLable.Text = article.Ref; DescriptionLable.Text = article.Description; PriceLable.Text = article.Price.ToString(); }
public Add() { InitializeComponent(); articlesRepo = new App1CL.Repositories.ArticlesRepo(); article = new App1CL.Models.Article() { Ref = Guid.NewGuid().ToString(), }; RefTextBox.Text = article.Ref; }