Esempio n. 1
0
 public List<SitePageLanguage> GetAllBySitePageId(int PageId)
 {
     SitePageLanguageDAC _sitePageLanguageComponent = new SitePageLanguageDAC();
     IDataReader reader = _sitePageLanguageComponent.GetAllSitePageLanguage(" SitePageId = " + PageId).CreateDataReader();
     List<SitePageLanguage> _sitePageLanguageList = new List<SitePageLanguage>();
     while (reader.Read())
     {
         if (_sitePageLanguageList == null)
             _sitePageLanguageList = new List<SitePageLanguage>();
         SitePageLanguage _sitePageLanguage = new SitePageLanguage();
         if (reader["SitePageLanguageId"] != DBNull.Value)
             _sitePageLanguage.SitePageLanguageId = Convert.ToInt32(reader["SitePageLanguageId"]);
         if (reader["SitePageId"] != DBNull.Value)
             _sitePageLanguage.SitePageId = Convert.ToInt32(reader["SitePageId"]);
         if (reader["LanguageId"] != DBNull.Value)
             _sitePageLanguage.LanguageId = Convert.ToInt32(reader["LanguageId"]);
         if (reader["PageName"] != DBNull.Value)
             _sitePageLanguage.PageName = Convert.ToString(reader["PageName"]);
         if (reader["PageContent"] != DBNull.Value)
             _sitePageLanguage.PageContent = Convert.ToString(reader["PageContent"]);
         if (reader["AuthorAlias"] != DBNull.Value)
             _sitePageLanguage.AuthorAlias = Convert.ToString(reader["AuthorAlias"]);
         if (reader["PageAlias"] != DBNull.Value)
             _sitePageLanguage.PageAlias = Convert.ToString(reader["PageAlias"]);
         if (reader["ModifiedDate"] != DBNull.Value)
             _sitePageLanguage.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
         _sitePageLanguage.NewRecord = false;
         _sitePageLanguageList.Add(_sitePageLanguage);
     } reader.Close();
     return _sitePageLanguageList;
 }
Esempio n. 2
0
        public SitePageLanguage GetSitePageLanguageByLanguageId(int id)
        {
            SitePageLanguage lang          = new SitePageLanguage();
            var availableSitePageLanguages = from x in CurrentSitePageLanguages where x.LanguageId == id select x;

            foreach (SitePageLanguage l in availableSitePageLanguages)
            {
                lang = l;
            }
            return(lang);
        }
Esempio n. 3
0
 public SitePageLanguage GetSitePageLanguageByLanguageId(int id)
 {
     SitePageLanguage lang = new SitePageLanguage();
     var availableSitePageLanguages = from x in CurrentSitePageLanguages where x.LanguageId == id select x;
     foreach(SitePageLanguage l in availableSitePageLanguages)
     {
         lang = l;
     }
     return lang;
 }
Esempio n. 4
0
 public bool Update(SitePageLanguage sitepagelanguage ,int old_sitePageLanguageId)
 {
     SitePageLanguageDAC sitepagelanguageComponent = new SitePageLanguageDAC();
     return sitepagelanguageComponent.UpdateSitePageLanguage( sitepagelanguage.SitePageId,  sitepagelanguage.LanguageId,  sitepagelanguage.PageName,  sitepagelanguage.PageContent,  sitepagelanguage.AuthorAlias,  sitepagelanguage.PageAlias,  sitepagelanguage.ModifiedDate,  old_sitePageLanguageId);
 }
Esempio n. 5
0
 public bool Insert(SitePageLanguage sitepagelanguage)
 {
     int autonumber = 0;
     SitePageLanguageDAC sitepagelanguageComponent = new SitePageLanguageDAC();
     bool endedSuccessfuly = sitepagelanguageComponent.InsertNewSitePageLanguage( ref autonumber,  sitepagelanguage.SitePageId,  sitepagelanguage.LanguageId,  sitepagelanguage.PageName,  sitepagelanguage.PageContent,  sitepagelanguage.AuthorAlias,  sitepagelanguage.PageAlias,  sitepagelanguage.ModifiedDate);
     if(endedSuccessfuly)
     {
         sitepagelanguage.SitePageLanguageId = autonumber;
     }
     return endedSuccessfuly;
 }
Esempio n. 6
0
 public SitePageLanguage GetBySitePageIDLanguageId(int SitePageId,int LanguageId)
 {
     SitePageLanguageDAC _sitePageLanguageComponent = new SitePageLanguageDAC();
      IDataReader reader = _sitePageLanguageComponent.GetByPageIDLanguageIdSitePageLanguage(SitePageId,LanguageId);
      SitePageLanguage _sitePageLanguage = null;
      while (reader.Read())
      {
          _sitePageLanguage = new SitePageLanguage();
          if (reader["SitePageLanguageId"] != DBNull.Value)
              _sitePageLanguage.SitePageLanguageId = Convert.ToInt32(reader["SitePageLanguageId"]);
          if (reader["SitePageId"] != DBNull.Value)
              _sitePageLanguage.SitePageId = Convert.ToInt32(reader["SitePageId"]);
          if (reader["LanguageId"] != DBNull.Value)
              _sitePageLanguage.LanguageId = Convert.ToInt32(reader["LanguageId"]);
          if (reader["PageName"] != DBNull.Value)
              _sitePageLanguage.PageName = Convert.ToString(reader["PageName"]);
          if (reader["PageContent"] != DBNull.Value)
              _sitePageLanguage.PageContent = Convert.ToString(reader["PageContent"]);
          if (reader["AuthorAlias"] != DBNull.Value)
              _sitePageLanguage.AuthorAlias = Convert.ToString(reader["AuthorAlias"]);
          if (reader["PageAlias"] != DBNull.Value)
              _sitePageLanguage.PageAlias = Convert.ToString(reader["PageAlias"]);
          if (reader["ModifiedDate"] != DBNull.Value)
              _sitePageLanguage.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
          _sitePageLanguage.NewRecord = false;
      } reader.Close();
      return _sitePageLanguage;
 }