public static void DeletePage(int PageID) { BINROTA.DAL.Pages objPage = new BINROTA.DAL.Pages(); objPage.Load(PageID); objPage.isDeleted = true; objPage.Save(); }
public static void UpdatePage(int PageID, int SubjectID, int PageCategoryID, string Title, string PageContent, DateTime TravelDate, string PhotoPath, string PhotoCaption, DateTime ModifyDate, int ModifiedBy, Hashtable htCategories, DataTable PageIDCategories) { //Tran konulacak Unutma BINROTA.DAL.Pages objPage = new BINROTA.DAL.Pages(); objPage.Load(PageID); objPage.SubjectID = SubjectID; objPage.PageCategoryID = PageCategoryID; objPage.Title = Title; objPage.PageContent = PageContent; objPage.TravelDate = TravelDate; objPage.ModifyDate = ModifyDate; objPage.ModifiedBy = ModifiedBy; objPage.Save(); for (int i = 0; i < PageIDCategories.Rows.Count; i++) { BINROTA.DAL.Pages objPageCategory = new BINROTA.DAL.Pages(); objPageCategory.Load(int.Parse(PageIDCategories.Rows[i]["PageID"].ToString())); objPageCategory.SubjectID = SubjectID; objPageCategory.PageContent = htCategories[PageIDCategories.Rows[i]["CategoryID"].ToString()].ToString(); objPageCategory.ModifyDate = ModifyDate; objPageCategory.ModifiedBy = ModifiedBy; objPageCategory.Save(); } }
public static void MemberHomePageUpdate(int MemberID, string PageContent) { DataTable dt = BINROTA.BUS.Pages.GetUserPages(MemberID, (int)Enumerations.PageType.HomePage); if (dt.Rows.Count > 0) { int PageID = int.Parse(dt.Rows[0]["PageID"].ToString()); BINROTA.DAL.Pages objPage = new BINROTA.DAL.Pages(); objPage.Load(PageID); objPage.PageContent = PageContent; objPage.ModifyDate = DateTime.Now; objPage.ModifiedBy = MemberID; objPage.isDeleted = false; objPage.Save(); } else { BINROTA.DAL.Pages objPage = new BINROTA.DAL.Pages(); objPage.MemberID = MemberID; objPage.PageTypeID = (int)Enumerations.PageType.HomePage; objPage.PageContent = PageContent; objPage.CreateDate = DateTime.Now; objPage.ModifyDate = DateTime.Now; objPage.ModifiedBy = MemberID; objPage.isDeleted = false; objPage.Save(); } }