Ejemplo n.º 1
0
        public Boolean GuardarNomina(clsPagoDos Pago)
        {
            try
            {
                int id = getIdSiguiente();
                using (CuentasPorPagarEntities ent = new CuentasPorPagarEntities())
                {
                    PagoCab otro = new PagoCab()
                    {
                        NumPago = id,
                        FechaIngreso = Pago.FechaIngreso,
                        TotalPagar = Pago.TotalPagar,
                        IdUsuario = Pago.IdUsuario,
                        IdEmpresa = Pago.IdEmpresa,
                        Estado = Pago.IdEstado,
                        NumComprobante = Pago.NumComprobante,
                    };
                    ent.AddToPagoCab(otro);
                    ent.SaveChanges();
                }
                return true;
            }
            catch (Exception ex)
            {
                return false;

            }
        }