Exemplo n.º 1
0
 private List <ImportarSaldosSOFOMInfo> Guardar(List <ImportarSaldosSOFOMInfo> saldos)
 {
     try
     {
         var saldosPL = new ImportarSaldosSOFOMPL();
         return(saldosPL.Guardar(saldos));
     }
     catch (Exception)
     {
         throw new ExcepcionServicio("Error al guardar información.");
     }
 }
Exemplo n.º 2
0
        private void AgregarCredito()
        {
            try
            {
                var pl      = new ImportarSaldosSOFOMPL();
                var info    = pl.CreditoSOFOM_ObtenerPorID(Convert.ToInt32(skAyudaClienteCreditoExcel.Clave.Trim()));
                var credito = new RelacionClienteProveedorInfo
                {
                    Editable  = true,
                    CreditoID = Convert.ToInt32(skAyudaClienteCreditoExcel.Clave.Trim()),
                    Credito   = new ImportarSaldosSOFOMInfo
                    {
                        CreditoID   = Convert.ToInt32(skAyudaClienteCreditoExcel.Clave.Trim()),
                        Saldo       = info.Saldo,
                        TipoCredito = new TipoCreditoInfo {
                            Descripcion   = info.TipoCredito.Descripcion,
                            TipoCreditoID = info.TipoCredito.TipoCreditoID
                        },
                    },
                    Ganadera          = (OrganizacionInfo)cboGadera.SelectedItem,
                    Centro            = (OrganizacionInfo)skAyudaCentroAcopio.Contexto,
                    UsuarioCreacionID = AuxConfiguracion.ObtenerUsuarioLogueado(),
                    Proveedor         = new ProveedorInfo {
                        ProveedorID = Convert.ToInt32(SplAyudaProveedor.Clave.Trim()),
                        Descripcion = SplAyudaProveedor.Descripcion.Trim()
                    }
                };

                ListaRelacionClienteProveedor.Add(credito);
                gridDatos3.ItemsSource = null;
                gridDatos3.ItemsSource = ListaRelacionClienteProveedor;
                skAyudaClienteCreditoExcel.LimpiarCampos();
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                SkMessageBox.Show(Application.Current.Windows[ConstantesVista.WindowPrincipal],
                                  Properties.Resources.RelacionClienteProveedor_ErrorAgregarCredito, MessageBoxButton.OK, MessageImage.Error);
            }
        }