Example #1
0
        private void saveRutineUpdate(object sender, EventArgs e)
        {
            Dieta aux = new Dieta();

            aux.name    = name.Text;
            aux.content = description.Text;
            if (kcal.Text != "")
            {
                aux.kcal = int.Parse(kcal.Text);
            }
            else
            {
                aux.kcal = 0;
            }
            if (rutine.update(this, aux))
            {
                var intent = new Intent(this, typeof(RutineDetailsActivity));
                intent.PutExtra("Rutine", rutine.id);
                this.StartActivity(intent);
                Finish();
            }
        }