public Boolean Guardar(clsImpuesto Imp) { try { int id = getIdSiguiente(); using (CuentasPorPagarEntities ent = new CuentasPorPagarEntities()) { Impuesto impu = new Impuesto() { IdImpuesto = id, Descripcion = Imp.Descripcion, FechaRegistro = DateTime.Today, // Medio.FechaRegistro, Porcentaje=Convert.ToDecimal (Imp.Porcentaje), Estado = Imp.Estado, IdEmpresa = Imp.IdEmpresa, IdUsuario = Imp.IdUsuario, }; ent.AddToImpuesto(impu); ent.SaveChanges(); } return true; } catch (Exception ex) { return false; } }