public void SaveFooter(Footer Footer) { if (Footer.Id == 0) { _RFooter.Add(Footer); } else { _uow.Entry(Footer).State = EntityState.Modified; } _uow.SaveChanges(); }
public ActionResult AddFooter(Footer Footer, bool chkLink, string FooterText2) { if (IsValidSessions()) { if (FooterText2 != null && FooterText2.Length > 0) Footer.FooterText = FooterText2.Replace("\r\n", "</br>"); Footer.FooterLink = (chkLink == true) ? Footer.FooterLink : null; Footer.CreationDate = DateTime.Now.Date; _RFooter.SaveFooter(Footer); return RedirectToAction("succ"); } else return JavaScript("window.location.href ='/Admin/Home/Login';"); }
public void DeleteFooter(Footer Footer) { _RFooter.Remove(Footer); _uow.SaveChanges(); }