Ejemplo n.º 1
0
 public void Save(RedirectionUrl url)
 {
     using (var session = sessionManager.OpenSession())
         using (var tx = session.BeginTransaction(IsolationLevel.ReadCommitted))
         {
             session.SaveOrUpdate(url);
             tx.Commit();
         }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     UrlId = Int32.Parse(Request.QueryString["FileId"]);
     if (UrlId > 0)
     {
         Url = RedirectionModule.GetbyId(UrlId);
         if (!IsPostBack)
         {
             BindUrl();// I HATE WebForms
         }
         btnDelete.Visible = true;
         btnDelete.Attributes.Add("onclick", "return confirm('Are you sure?');");
     }
     else
     {
         Url = new RedirectionUrl
         {
             Section = RedirectionModule.Section
         };
         calDatePublished.SelectedDate = DateTime.Now;
         btnDelete.Visible             = false;
     }
 }