Пример #1
0
 public void Save()
 {
     UrlTrackerModel.Is404    = false;
     UrlTrackerModel.Referrer = string.Empty;
     if (!string.IsNullOrEmpty(cpRedirectNode.Value))
     {
         UrlTrackerModel.RedirectNodeId = int.Parse(cpRedirectNode.Value);
     }
     else
     {
         UrlTrackerModel.RedirectNodeId = null;
     }
     UrlTrackerModel.RedirectUrl      = tbRedirectUrl.Text;
     UrlTrackerModel.RedirectHttpCode = rbPermanent.Checked ? 301 : 302;
     UrlTrackerModel.RedirectPassThroughQueryString = cbRedirectPassthroughQueryString.Checked;
     UrlTrackerModel.Notes = tbNotes.Text;
     UrlTrackerRepository.UpdateUrlTrackerEntry(UrlTrackerModel);
     UrlTrackerRepository.DeleteNotFoundEntriesByRootAndOldUrl(UrlTrackerModel.RedirectRootNodeId, UrlTrackerModel.OldUrl);
 }