Ejemplo n.º 1
0
 public ProvinceBusiness(MardisContext mardisContext, IMemoryCache memoryCache)
 {
     _provinceDao = new ProvinceDao(mardisContext);
     var myCache = memoryCache;
     if (myCache.Get(CacheName) == null)
     {
         myCache.Set(CacheName, _provinceDao.GetAll());
     }
 }
Ejemplo n.º 2
0
        public List <string> PopulateProvinceList(ref DropDownList dropDownList)
        {
            dropDownList.Items.Clear();
            var provinceList = ProvinceDao.GetAll();
            var returnList   = new List <string>();

            returnList.Add("");
            dropDownList.Items.Add(new ListItem(""));
            foreach (var p in provinceList)
            {
                returnList.Add(p.Prov);
                dropDownList.Items.Add(new ListItem(p.Prov));
            }
            dropDownList.SelectedIndex = 0;
            return(returnList);
        }
Ejemplo n.º 3
0
 public List <Province> GetAll()
 {
     return(ProvinceDao.GetAll());
 }