Ejemplo n.º 1
0
        private void BrandEditCommand()
        {
            Brand brand = new Brand();

            brand.CopyFrom(Datas.BrandEdit.Brand);
            //Datas.CategoryList.Categories.Add(Category);
            try
            {
                databaseService.SqliteConnection.Insert(brand);
                Datas.BrandList.Brands.Add(brand);
            }
            catch (Exception e)
            {
                ContentDialog contentDialog = new ContentDialog();
                contentDialog.Title   = "Error";
                contentDialog.Content = e.Message;
                contentDialog.IsSecondaryButtonEnabled = false;
                contentDialog.PrimaryButtonText        = "ok";
                contentDialog.ShowAsync();
            }
        }