Ejemplo n.º 1
0
 private void FillInUseCodes()
 {
     using (MaikeEntities ctx = new MaikeEntities())
     {
         List<SHFECode> codes = ctx.SHFECodes.Include("Commodity").Where(c => c.IsInUse == true && c.IsDeleted == false).ToList();
         foreach (SHFECode code in codes)
         {
             _inUseCodes.Push(code);
         }
     }
 }
Ejemplo n.º 2
0
 private List<SHFECode> GetInUseCode()
 {
     using (MaikeEntities ctx = new MaikeEntities())
     {
         return ctx.SHFECodes.Include("Commodity").Where(s => s.IsInUse == true && s.IsDeleted == false).ToList();
     }
 }
Ejemplo n.º 3
0
 public void RefreshSHFECodes(string shfeCodeId)
 {
     _distributor.UpdateSHFECodes();
     int id = Convert.ToInt32(shfeCodeId);
     using (MaikeEntities ctx = new MaikeEntities())
     {
         SHFECode code = ctx.SHFECodes.Include("Commodity").Where(c => c.Id == id && c.IsDeleted == false).FirstOrDefault();
         if (code != null)
         {
             Clients.All.updateSHFECodes(code.Commodity.Code, code.Code, code.Name);
         }
     }
 }