public static void updateTblDict(tblDictSystem c)
 {
     try
     {
         BusProjectEntities db = new BusProjectEntities();
         db.Entry <tblDictSystem>(c).State = EntityState.Modified;
         db.SaveChanges();
     }
     catch
     {
     }
 }
 //Todo- get from tblsystemConterol the current culture
 public static void addTblDict(tblDictSystem c)
 {
     try
     {
         BusProjectEntities db = new BusProjectEntities();
         db.tblDictSystems.Add(c);
         db.SaveChanges();
     }
     catch
     {
     }
 }
 public static void updateTblDictById(int dictId, string CustomerTranslated)
 {
     try
     {
         tblDictSystem c = getTblDict(dictId);
         c.CustomerTranslated = CustomerTranslated;
         c.DateCreatedUTC     = DateTime.Now;
         updateTblDict(c);
     }
     catch
     {
     }
 }
        public static string termHandle(string Term)
        {
            if (dictunarySystem == null)
            {
                if (HttpRuntime.Cache["dictSystem"] == null)
                {
                    dictunarySystem = dictSystemLogic.getDictionaryTerms();
                    handleCache();
                }
                else
                {//fil the dictunary from the cache
                    dictunarySystem = HttpRuntime.Cache["dictSystem"] as Dictionary <string, string>;
                }
            }
            string item;

            if (!dictunarySystem.TryGetValue(Term, out item))
            {
                string value = dictSystemLogic.returnTranslatedTerm(Term);
                if (value != null)
                {
                    dictunarySystem[Term] = value;
                }
                else
                {
                    value = Term;
                    dictunarySystem[Term] = Term;
                    tblDictSystem c = new tblDictSystem();//todo fix
                    c.term             = Term;
                    c.SystemTranslated = Term;
                    c.DateCreatedUTC   = DateTime.Now;
                    //unncomment gilad 14-11-15 -1
                    //c.cultures = constants.Const_defaultCulture; //todo fix
                    c.cultures = "He_iL";
                    dictSystemLogic.addTblDict(c);
                    // dictunary[Term] = Term;
                }
                handleCache();
                return(Term);
            }
            else
            {
                return(dictunarySystem[Term]);
            }
        }