public bool Insert(LookupLanguages lookuplanguages)
        {
            int autonumber = 0;
            LookupLanguagesDAC lookuplanguagesComponent = new LookupLanguagesDAC();
            bool endedSuccessfuly = lookuplanguagesComponent.InsertNewLookupLanguages(ref autonumber, lookuplanguages.LookupId, lookuplanguages.LanguageId, lookuplanguages.RefId, lookuplanguages.LookupValue, lookuplanguages.LookupValueDescription);

            if (endedSuccessfuly)
            {
                lookuplanguages.LookupLanguageId = autonumber;
            }
            return(endedSuccessfuly);
        }
        public List <LookupLanguages> GetAllByLookupName(string LookupName, int LanguageId)
        {
            LookupLanguagesDAC     _lookupLanguagesComponent = new LookupLanguagesDAC();
            IDataReader            reader = _lookupLanguagesComponent.GetByLanguageIDLookupLanguages(LookupName, LanguageId);
            List <LookupLanguages> _lookupLanguagesList = new List <LookupLanguages>();

            while (reader.Read())
            {
                if (_lookupLanguagesList == null)
                {
                    _lookupLanguagesList = new List <LookupLanguages>();
                }
                LookupLanguages _lookupLanguages = new LookupLanguages();
                if (reader["LookupLanguageId"] != DBNull.Value)
                {
                    _lookupLanguages.LookupLanguageId = Convert.ToInt32(reader["LookupLanguageId"]);
                }
                if (reader["LookupId"] != DBNull.Value)
                {
                    _lookupLanguages.LookupId = Convert.ToInt32(reader["LookupId"]);
                }
                if (reader["LanguageId"] != DBNull.Value)
                {
                    _lookupLanguages.LanguageId = Convert.ToInt32(reader["LanguageId"]);
                }
                if (reader["RefId"] != DBNull.Value)
                {
                    _lookupLanguages.RefId = Convert.ToInt32(reader["RefId"]);
                }
                if (reader["LookupValue"] != DBNull.Value)
                {
                    _lookupLanguages.LookupValue = Convert.ToString(reader["LookupValue"]);
                }
                if (reader["LookupValueDescription"] != DBNull.Value)
                {
                    _lookupLanguages.LookupValueDescription = Convert.ToString(reader["LookupValueDescription"]);
                }
                _lookupLanguages.NewRecord = false;
                _lookupLanguagesList.Add(_lookupLanguages);
            }
            reader.Close();
            return(_lookupLanguagesList);
        }
        public LookupLanguages GetByID(int _lookupLanguageId)
        {
            LookupLanguagesDAC _lookupLanguagesComponent = new LookupLanguagesDAC();
            IDataReader        reader           = _lookupLanguagesComponent.GetByIDLookupLanguages(_lookupLanguageId);
            LookupLanguages    _lookupLanguages = null;

            while (reader.Read())
            {
                _lookupLanguages = new LookupLanguages();
                if (reader["LookupLanguageId"] != DBNull.Value)
                {
                    _lookupLanguages.LookupLanguageId = Convert.ToInt32(reader["LookupLanguageId"]);
                }
                if (reader["LookupId"] != DBNull.Value)
                {
                    _lookupLanguages.LookupId = Convert.ToInt32(reader["LookupId"]);
                }
                if (reader["LanguageId"] != DBNull.Value)
                {
                    _lookupLanguages.LanguageId = Convert.ToInt32(reader["LanguageId"]);
                }
                if (reader["RefId"] != DBNull.Value)
                {
                    _lookupLanguages.RefId = Convert.ToInt32(reader["RefId"]);
                }
                if (reader["LookupValue"] != DBNull.Value)
                {
                    _lookupLanguages.LookupValue = Convert.ToString(reader["LookupValue"]);
                }
                if (reader["LookupValueDescription"] != DBNull.Value)
                {
                    _lookupLanguages.LookupValueDescription = Convert.ToString(reader["LookupValueDescription"]);
                }
                _lookupLanguages.NewRecord = false;
            }
            reader.Close();
            return(_lookupLanguages);
        }
        public bool Update(LookupLanguages lookuplanguages, int old_lookupLanguageId)
        {
            LookupLanguagesDAC lookuplanguagesComponent = new LookupLanguagesDAC();

            return(lookuplanguagesComponent.UpdateLookupLanguages(lookuplanguages.LookupId, lookuplanguages.LanguageId, lookuplanguages.RefId, lookuplanguages.LookupValue, lookuplanguages.LookupValueDescription, old_lookupLanguageId));
        }