Example #1
0
        public EntregaNuevoPageSavana()
        {
            try
            {
                InitializeComponent();

                BindingContext = viewModel = new EntregaCreacionViewModel(true);
                MessagingCenter.Subscribe <EntregaCreacionViewModel, Entrega>(this, "EntregatotalNuevo", (obj, item) =>
                {
                    var entre = item as Entrega;
                    this.SubTotalAmount.Text = "$ " + entre.SubTotal.ToString();
                    this.TotalAmount.Text    = "$ " + item.Total.ToString();
                });
                //InitPage();
            }
            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 EntregaNuevoPage(Entrega entrega)
 {
     InitializeComponent();
     //InitPage();
     //Item = entrega;
     BindingContext = viewModel = new EntregaCreacionViewModel();
 }
        public EntregaAddProducto(EntregaCreacionViewModel viewModel, bool EsMayorista, EntregaItemVendido _item)
        {
            try
            {
                vmParent = viewModel;

                item           = _item;
                BindingContext = this;
                InitializeComponent();
                this.cta_eliminar.IsEnabled = true;
                this.cta_agregar.Text       = "Guardar";
                esMayorista                = EsMayorista;
                this.SC_Devolucion.On      = item.Devolucion;
                this.SC_Oferta.On          = item.Oferta;
                this.ProdCtaSrc.Text       = item.Cantidad.ToString();
                this.SubTotal.Text         = item.SubTotal.ToString();
                this.ProdcutoSrc.Text      = item.Producto.Codigo;
                this.ProdcutoSrc.IsEnabled = false;
                vmParent.ProductoIncrementarStockPorEdicion(item.Producto.Codigo, item.Cantidad);
                ProductoSelected.Text = string.Concat(item.Producto.Codigo, " - ", item.Producto.Nombre, " - $ ", item.PrecioUnitario);
            }
            catch (Exception ex)
            {
                string    messag = "";
                Exception er     = ex;
                while (er != null)
                {
                    messag += er.Message + "!!!";
                    er      = er.InnerException;
                }

                DisplayAlert("Error", messag, "OK");
            }
        }
Example #4
0
        public EntregaNuevoPage()
        {
            InitializeComponent();

            BindingContext = viewModel = new EntregaCreacionViewModel();
            MessagingCenter.Subscribe <EntregaCreacionViewModel, Entrega>(this, "EntregatotalNuevo", (obj, item) =>
            {
                var entre = item as Entrega;
                this.SubTotalAmount.Text = "$ " + entre.SubTotal.ToString();
                this.TotalAmount.Text    = "$ " + item.Total.ToString();
            });
            //InitPage();
        }
Example #5
0
        public EntregaNuevoPageSavana(Entrega entrega)
        {
            try
            {
                InitializeComponent();
                BindingContext = viewModel = new EntregaCreacionViewModel(true);
            }
            catch (Exception ex)
            {
                string    messag = "";
                Exception er     = ex;
                while (er != null)
                {
                    messag += er.Message + "!!!";
                    er      = er.InnerException;
                }

                DisplayAlert("Error", messag, "OK");
            }
        }
 public EntregaAddProducto(EntregaCreacionViewModel viewModel, bool EsMayorista)
 {
     try
     {
         vmParent = viewModel;
         InitializeComponent();
         BindingContext = this;
         esMayorista    = EsMayorista;
     }
     catch (Exception ex)
     {
         string    messag = "";
         Exception er     = ex;
         while (er != null)
         {
             messag += er.Message + "!!!";
             er      = er.InnerException;
         }
         DisplayAlert("Error", messag, "OK");
     }
 }