public SendMail.Model.BackEndRefCode Load(decimal id)
 {
     using (BackEndCodeSQLDb dao = new BackEndCodeSQLDb())
     {
         return(dao.GetById(id));
     }
 }
        public IList <SendMail.Model.BackEndRefCode> GetAll(bool refresh)
        {
            if (refresh)
            {
                using (BackEndCodeSQLDb dao = new BackEndCodeSQLDb())
                {
                    CacheManager <List <BackEndRefCode> > .set(CacheKeys.DATI_MEMO, (List <BackEndRefCode>) dao.GetAll());

                    return(CacheManager <List <BackEndRefCode> > .get(CacheKeys.DATI_MEMO, Com.Delta.Web.Cache.VincoloType.NONE));
                }
            }
            else
            {
                if (CacheManager <List <SendMail.Model.BackEndRefCode> > .get(CacheKeys.DATI_MEMO, Com.Delta.Web.Cache.VincoloType.NONE) != null)
                {
                    return(CacheManager <List <SendMail.Model.BackEndRefCode> > .get(CacheKeys.DATI_MEMO, Com.Delta.Web.Cache.VincoloType.NONE));
                }
                else
                {
                    return(GetAll(true));
                }
            }
        }
 public void Delete(decimal id)
 {
     using (BackEndCodeSQLDb dao = new BackEndCodeSQLDb())
         dao.Delete(id);
 }
 public void Insert(BackEndRefCode entity)
 {
     using (BackEndCodeSQLDb dao = new BackEndCodeSQLDb())
         dao.Insert(entity);
 }
 public List <BackEndRefCode> GetByDescr(string descrBackEnd)
 {
     using (BackEndCodeSQLDb dao = new BackEndCodeSQLDb())
         return(dao.GetByDescr(descrBackEnd));
 }
 public BackEndRefCode GetByCode(string idCodeBackEnd)
 {
     using (BackEndCodeSQLDb dao = new BackEndCodeSQLDb())
         return(dao.GetByCode(idCodeBackEnd));
 }