コード例 #1
0
ファイル: Products_New.cs プロジェクト: sbalex27/Repo-A-CRUD
 private void BTT_Ok_Click(object sender, EventArgs e)
 {
     if (uiProductProperties.ValidateChildren())
     {
         try
         {
             Product p = uiProductProperties.GetObject();
             p.Added += P_Added;
             p.Add();
         }
         catch (Exception ex)
         {
             PremadeMessage.Notification(ex.Message);
         }
     }
 }
コード例 #2
0
 private void BTT_AddToList_Click(object sender, EventArgs e)
 {
     try
     {
         Product P = ProductProperties.GetObject();
         if (ShoppingCart.Contains(P))
         {
             throw new ProductRepeatedException();
         }
         else
         {
             AddToList(P);
         }
     }
     catch (ProductException ex)
     {
         PremadeMessage.Notification(ex.Message);
     }
 }
コード例 #3
0
 private void Product_ListPurchased(object sender, string e)
 {
     PremadeMessage.Notification(e);
     Close();
 }