コード例 #1
0
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(Category.Text) || string.IsNullOrEmpty(ItemName.Text) ||
                string.IsNullOrEmpty(UnitPrice.Value.ToString()))
            {
                errM.Message = "All Feilds mark with asterisk(*) Are Required";
                errM.Show();
            }
            else
            {
                ItemLogic.AddNewItem(Category.Text, Vendor.Text, ItemName.Text, ItemDescription.Text, UnitPrice.Value.ToString(), ItemQuantity.Value.ToString());
                //errM.Message = "New item details saved successfully";
                //errM.Show();

                Hide();
            }
        }