示例#1
0
 public void update_Button_Click(object sender, RoutedEventArgs e)
 {
     if (int.TryParse(unitPrice.Text, out unitPriceInt) == true && int.TryParse(sellingPrice.Text, out sellingPriceInt) == true)
     {
         try
         {
             if (ProductTableData.updatePrice(product.ID, unitPriceInt, sellingPriceInt) == true)
             {
                 Xceed.Wpf.Toolkit.MessageBox.Show("Price Updated Successfullly. Press ok to exit", "Info");
             }
         }
         catch (Exception ex)
         {
             Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, "Error");
         }
         this.Close();
     }
 }