public static tbl_PageInformation GetPageInformationByID(long PageInforID) { tbl_PageInformation _PageInfo = new tbl_PageInformation(); using (enidcDataContext db = Enidc.Web.DataHelper.getEnIdcData()) { _PageInfo = db.tbl_PageInformations.Where(i => i.PageInfoId == PageInforID).SingleOrDefault(); } return _PageInfo; }
/// <summary> /// Insert new page-information /// </summary> /// <param name="PageId"></param> /// <param name="PageTitle"></param> /// <param name="PageContent"></param> /// <param name="MetaKeys"></param> /// <param name="MetaDesc"></param> /// <param name="LanguageId"></param> /// <returns></returns> public static bool InsertPageInformation(long PageId,string PageTitle,string PageContent,string MetaKeys, string MetaDesc, int LanguageId) { tbl_PageInformation _PageInfo = new tbl_PageInformation(); _PageInfo.LangId = LanguageId; _PageInfo.PageTitle = PageTitle; _PageInfo.PageContent = PageContent; _PageInfo.MetaKeys = MetaKeys; _PageInfo.MetaDesc = MetaDesc; _PageInfo.PageId = PageId; try { Enidc.Web.DataHelper.Insert<tbl_PageInformation>(_PageInfo); return true; } catch { return false; } }
partial void Deletetbl_PageInformation(tbl_PageInformation instance);
partial void Updatetbl_PageInformation(tbl_PageInformation instance);
private void detach_tbl_PageInformations(tbl_PageInformation entity) { this.SendPropertyChanging(); entity.tbl_Language = null; }
partial void Inserttbl_PageInformation(tbl_PageInformation instance);
private void attach_tbl_PageInformations(tbl_PageInformation entity) { this.SendPropertyChanging(); entity.tbl_Page = this; }