Example #1
0
 public ProductoNuevoPage(Producto producto)
 {
     try
     {
         BindingContext = vModel = new ViewModels.Productos.ProductoViewModelCRUD();
         vModel.IsNew   = false;
         vModel.Item    = producto;
         InitializeComponent();
         cta_eliminar.IsEnabled = true;
         cta_agregar.IsEnabled  = true;
     }
     catch (Exception ex)
     {
         string    messag = "";
         Exception er     = ex;
         while (er != null)
         {
             messag += er.Message + "!!!";
             er      = er.InnerException;
         }
         DisplayAlert("Error", messag, "OK");
     }
 }
Example #2
0
        //public Producto Item { get; set; }

        public ProductoNuevoPage()
        {
            try
            {
                BindingContext = vModel = new ViewModels.Productos.ProductoViewModelCRUD();
                vModel.Item    = new Producto
                {
                };
                vModel.IsNew = true;
                InitializeComponent();
            }
            catch (Exception ex)
            {
                string    messag = "";
                Exception er     = ex;
                while (er != null)
                {
                    messag += er.Message + "!!!";
                    er      = er.InnerException;
                }

                DisplayAlert("Error", messag, "OK");
            }
        }