Exemplo n.º 1
0
        /// <summary>
        /// Purpose: Grabs language label information based on language label code
        /// Accepts: String
        /// Returns: Hashtable
        /// </summary>
        public Hashtable GetLangLabelByCode(string code)
        {
            LangLabel obj = new LangLabel();
            QuickStart_DBEntities dbContext;
            Hashtable hsh = new Hashtable();
            try
            {
                dbContext = new QuickStart_DBEntities();
                obj = dbContext.LangLabels.FirstOrDefault(l => l.LangLabelCode == code);
                if (obj != null)
                {
                    hsh["langlabelcode"] = obj.LangLabelCode;
                    hsh["value"] = obj.Value;
                    hsh["modified"] = obj.Modified;
                }
            }
            catch (Exception ex)
            {
                ErrorLoggerData.ErrorRoutine(ex, "LangLabelData", "GetLangLabelByCode");
            }

            return hsh;
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the LangLabels EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToLangLabels(LangLabel langLabel)
 {
     base.AddObject("LangLabels", langLabel);
 }
 /// <summary>
 /// Create a new LangLabel object.
 /// </summary>
 /// <param name="langLabelCode">Initial value of the LangLabelCode property.</param>
 public static LangLabel CreateLangLabel(global::System.String langLabelCode)
 {
     LangLabel langLabel = new LangLabel();
     langLabel.LangLabelCode = langLabelCode;
     return langLabel;
 }