Example #1
0
 public Edit(Factures _home)
 {
     InitializeComponent();
     articleRepo                  = new ArticleRepo();
     article                      = Factures.selectedArticle;
     ReferenceTextBox.Text        = article.Reference;
     DescriptionTextBox.Text      = article.Designation;
     PriceTextBox.Text            = article.Prix.ToString();
     QuantityTextBox.Text         = article.Quantite.ToString();
     InPromotionCheckBox.Checked  = article.Promo.Value;
     DateEndPromotTimePicker.Text = article.DateFinPromo.ToString();
     home = _home;
 }
Example #2
0
 public Add(Factures _preForm)
 {
     InitializeComponent();
     preForm     = _preForm;
     articleRepo = new ArticleRepo();
     article     = new Article()
     {
         Reference = Guid.NewGuid().ToString(),
         Prix      = 0,
     };
     PriceTextBox.Text     = "0.00";
     ReferenceTextBox.Text = article.Reference;
 }
Example #3
0
 public Remove(Factures _home)
 {
     InitializeComponent();
     articleRepo             = new ArticleRepo();
     article                 = Factures.selectedArticle;
     ReferenceTB.Text        = article.Reference;
     DescriptionTB.Text      = article.Designation;
     PriceTB.Text            = article.Prix.ToString();
     QuantityTB.Text         = article.Quantite.ToString();
     InPromotionTB.Text      = article.Promo == true ? "is in promotion :)" : "is not in promotion :(";
     DateEndPromotionTB.Text = article.DateFinPromo.ToString();
     home = _home;
 }
 public SearchForm(Factures _home)
 {
     InitializeComponent();
     home = _home;
 }