public void MyClickEvent(object sender, EventArgs e)
        {
// events from the view
            if (sender == view.getBtn1())
            {
                //MessageBox.Show("This click was on button:" + ((Button)sender).Text + view.getBtn1());
                GenericRepository <Breed> repos = new GenericRepository <Breed>();
                Breed dog = new Breed();
                dog.Breed1        = "dog";
                dog.BreedID       = 56;
                dog.FoodCostPerKG = 45;
                dog.HousingCosts  = 67;
                dog.SpeciesID     = 6;

                repos.insert(dog);
                repos.save();
            }
            else if (sender == view.getBtn2())
            {
                MessageBox.Show("This click was on button:" + ((Button)sender).Text + view.getBtn2());
            }
        }
Example #2
0
 partial void UpdateBreed(Breed instance);
Example #3
0
 partial void DeleteBreed(Breed instance);
Example #4
0
 partial void InsertBreed(Breed instance);