示例#1
0
 public IEnumerable <Model.Model.Parametro> GetAll()
 {
     try
     {
         _parametro = new Data.Configuracao.Parametro();
         return(_parametro.GetAll());
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         _parametro = null;
     }
 }
示例#2
0
 public bool Alter(int id, Model.Model.Parametro item)
 {
     try
     {
         _parametro = new Data.Configuracao.Parametro();
         _parametro.Alter(id, item);
         return(true);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         _parametro = null;
     }
 }
示例#3
0
 public bool Save(Model.Model.Parametro item)
 {
     try
     {
         _parametro = new Data.Configuracao.Parametro();
         if (string.IsNullOrEmpty(item.valor))
         {
             throw new Exception("PLEASE SET A VALUE FOR THE PARAMETER");
         }
         _parametro.Save(item);
         return(true);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         _parametro = null;
     }
 }