コード例 #1
0
 private void Button_Clicked(object sender, System.EventArgs e)
 {
     var DatosRegistro = new T_Pedidos
     {
         FechaPedido     = DateTime.Parse(fechaPedido.Text),
         DireccionPedido = direccion.Text,
         FechaEnvio      = DateTime.Parse(fechaEnvio.Text),
         MedioEntrega    = medio.Text,
         FechaEntrega    = DateTime.Parse(fechaEntrega.Text),
         TotalPago       = float.Parse(total.Text)
     };
 }
コード例 #2
0
ファイル: Page1.xaml.cs プロジェクト: Manuad/TiendaDeportes
        private void Button_Clicked(object sender, System.EventArgs e)
        {
            DateTime fecha_pedido, fecha_entrega, fecha_envio;

            fecha_pedido  = Convert.ToDateTime(fechaPedido.Text);
            fecha_entrega = Convert.ToDateTime(fechaEntrega.Text);
            fecha_envio   = Convert.ToDateTime(fechaEnvio.Text);

            var DatosRegistro = new T_Pedidos
            {
                FechaPedido     = fecha_pedido,
                DireccionPedido = direccion.Text,
                FechaEnvio      = fecha_envio,
                MedioEntrega    = medio.Text,
                FechaEntrega    = fecha_entrega,
                TotalPago       = float.Parse(total.Text)
            };

            con.InsertAsync(DatosRegistro);
            limpiarFormulario();
            DisplayAlert("Info", "Pedido guardado con éxito", "Ok");
        }