private void Method_GET_DocumentoSunat()
 {
     try
     {
         Property_IsIndeterminate = true;
         var CollectionDocumento = new CHObservableCollection <EComSoft_KeyValue>();
         CollectionDocumento.Add(new EComSoft_KeyValue()
         {
             Key = "CTZ", Value = "COTIZACIÓN"
         });
         CollectionDocumento.Add(new EComSoft_KeyValue()
         {
             Key = "ORC", Value = "ORDEN DE COMPRA"
         });
         CollectionDocumento.Add(new EComSoft_KeyValue()
         {
             Key = "ORS", Value = "ORDEN DE SERVICIO"
         });
         Collection_DatosDocumentoSunat.Sources = (Property_IsCheckedDocumentoElectronico) ? new BComSoft_KeyValue().GET_DocumentoSunat() : CollectionDocumento;
         Property_IsIndeterminate = false;
     }
     catch (Exception ex)
     {
         CHMessageBox.Show(ComSoftMensaje.TituloDocumento, ex.Message, CHMessageTypeButton.Acept);
         Property_IsIndeterminate = false;
     }
 }
Exemple #2
0
 public async void MethodCargarDatos()
 {
     await Task.Factory.StartNew(() =>
     {
         try
         {
             Property_IsIndeterminate       = true;
             Collection_DatoEmpresa.Sources = new BComSoft_Empresa().GET_Empresa();
             Property_IsIndeterminate       = false;
         }
         catch (Exception ex)
         {
             Property_IsIndeterminate = false;
             CHMessageBox.Show(ComSoftMensaje.TituloEmpresa, ex.Message, CHMessageTypeButton.Acept);
         }
     });
 }
Exemple #3
0
 private async void Method_CargaAlmacen()
 {
     await Task.Factory.StartNew(() =>
     {
         try
         {
             Collection_DatoAlmacen.Sources = new BComSoft_Almacen().GET_Almacen(Property_SelectItemEmpresaSucursal.IdEmpresaSucursal);
             Property_SelectItemAlmacen     = (EComSoft_Cotizacion.Opcion == "U")
                                          ? Collection_DatoAlmacen.FirstOrDefault(x => x.IdAlmacen == EComSoft_Cotizacion.EComSoft_Almacen.IdAlmacen)
                                          : Collection_DatoAlmacen.FirstOrDefault();
         }
         catch (Exception ex)
         {
             CHMessageBox.Show(ComSoftMensaje.TituloCotizacion, ex.Message, CHMessageTypeButton.Acept);
         }
     });
 }
 private async void Method_CargaDatos()
 {
     await Task.Factory.StartNew(() =>
     {
         try
         {
             Property_IsIndeterminate         = true;
             Collection_DatoDocumento.Sources = new BComSoft_Documento().GET_Documento();
             Property_IsIndeterminate         = false;
         }
         catch (Exception ex)
         {
             Property_IsIndeterminate = false;
             CHMessageBox.Show(ComSoftMensaje.TituloDocumento, ex.Message, CHMessageTypeButton.Acept);
         }
     });
 }
Exemple #5
0
 private async void Method_CargaDatos()
 {
     try
     {
         await Task.Factory.StartNew(() =>
         {
             Property_IsIndeterminate       = true;
             Collection_DatoAlmacen.Sources = new BComSoft_Almacen().GET_Almacen(EComSoft_EmpresaSucursal.IdEmpresaSucursal);
             Property_IsIndeterminate       = false;
         });
     }
     catch (Exception ex)
     {
         Property_IsIndeterminate = false;
         CHMessageBox.Show(ComSoftMensaje.TituloAlmacen, ex.Message, CHMessageTypeButton.Acept);
     }
 }
Exemple #6
0
 private async void Method_CargaDistrito()
 {
     await Task.Factory.StartNew(() =>
     {
         try
         {
             Collection_DatoDistrito.Sources = new BComSoft_Ubigeo().GET_Distrito(Property_SelectItemProvincia.CodUbigeo);
             if (!string.IsNullOrEmpty(EComSoft_Almacen.EComSoft_Ubigeo.CodUbigeo))
             {
                 Property_SelectItemDistrito = Collection_DatoDistrito.FirstOrDefault(x => x.CodUbigeo == ((EComSoft_Almacen.Opcion == "U") ? EComSoft_Almacen.EComSoft_Ubigeo.CodUbigeo : string.Empty));
             }
         }
         catch (Exception ex)
         {
             CHMessageBox.Show(ComSoftMensaje.TituloAlmacen, ex.Message, CHMessageTypeButton.Acept);
         }
     });
 }
Exemple #7
0
        private async void Method_CargaDato()
        {
            await Task.Factory.StartNew(() =>
            {
                try
                {
                    #region CARGA DATOS

                    Collection_DatoEmpresaSucursal.Sources = new BComSoft_EmpresaSucursal().GET_EmpresaSucursal();
                    Collection_DatoPlazo.Sources           = new BComSoft_Plazo().GET_Plazo();
                    Collection_DatoFormaPago.Sources       = new BComSoft_FormaPago().GET_FormaPago();
                    Collection_DatoMoneda.Sources          = new BComSoft_Moneda().GET_Moneda();

                    #endregion

                    #region SELECCION DEFECTO

                    Property_SelectItemEmpresaSucursal = (EComSoft_Cotizacion.Opcion == "U")
                                                         ? Collection_DatoEmpresaSucursal.FirstOrDefault(x => x.IdEmpresaSucursal == EComSoft_Cotizacion.EComSoft_EmpresaSucursal.IdEmpresaSucursal)
                                                         : Collection_DatoEmpresaSucursal.FirstOrDefault(x => x.Principal);
                    Property_SelectItemPlazo = (EComSoft_Cotizacion.Opcion == "U")
                                               ? Collection_DatoPlazo.FirstOrDefault(x => x.IdPlazo == EComSoft_Cotizacion.EComSoft_Plazo.IdPlazo)
                                               : Collection_DatoPlazo.FirstOrDefault();
                    Property_SelectItemFormaPago = (EComSoft_Cotizacion.Opcion == "U")
                                                   ? Collection_DatoFormaPago.FirstOrDefault(x => x.IdFormaPago == EComSoft_Cotizacion.EComSoft_FormaPago.IdFormaPago)
                                                   : Collection_DatoFormaPago.FirstOrDefault();
                    Property_SelectItemMoneda = (EComSoft_Cotizacion.Opcion == "U")
                                                ? Collection_DatoMoneda.FirstOrDefault(x => x.CodMoneda == EComSoft_Cotizacion.EComSoft_Moneda.CodMoneda)
                                                : Collection_DatoMoneda.FirstOrDefault(x => x.Nacional);

                    Property_SelectDateFechaEmision     = (EComSoft_Cotizacion.Opcion == "U") ? EComSoft_Cotizacion.FechaEmision : DateTime.Now;
                    Property_SelectDateFechaVencimiento = (EComSoft_Cotizacion.Opcion == "U") ? EComSoft_Cotizacion.FechaVencimiento : DateTime.Now;

                    #endregion
                }
                catch (Exception ex)
                {
                    CHMessageBox.Show(ComSoftMensaje.TituloCotizacion, ex.Message, CHMessageTypeButton.Acept);
                }
            });
        }
Exemple #8
0
 private async void Method_CargaProvincia()
 {
     await Task.Factory.StartNew(() =>
     {
         try
         {
             Collection_DatoProvincia.Sources = new BComSoft_Ubigeo().GET_Provincia(Property_SelectItemDepartamento.CodUbigeo);
             if (!string.IsNullOrEmpty(EComSoft_Almacen.EComSoft_Ubigeo.CodUbigeo))
             {
                 Property_SelectItemProvincia = Collection_DatoProvincia.FirstOrDefault(x => x.CodUbigeo == ((EComSoft_Almacen.Opcion == "U") ? EComSoft_Almacen.EComSoft_Ubigeo.CodUbigeo?.Substring(0, 4) : string.Empty));
             }
             Application.Current.Dispatcher.Invoke(() =>
             {
                 Collection_DatoDistrito.Clear();
             });
         }
         catch (Exception ex)
         {
             CHMessageBox.Show(ComSoftMensaje.TituloAlmacen, ex.Message, CHMessageTypeButton.Acept);
         }
     });
 }