protected void ListView1_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
         Response.Write("<script type='text/javascript'> alert('" + e.Exception.Message + "')) </script>");
     }
 }
Example #2
0
 protected void lvScreen_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     if (e.Exception != null)
     {
         lblError.Text = "A database error has occurred. " + e.Exception.Message;
         e.ExceptionHandled = true;
     }
 }
 protected void CurrentTopicListView_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     this.CurrentTopicListView.InsertItemPosition = InsertItemPosition.None;
 }
Example #4
0
		protected override void OnItemInserted (ListViewInsertedEventArgs e)
		{
			RecordEvent ("Enter");
			base.OnItemInserted (e);
			RecordEvent ("Leave");
		}
Example #5
0
        protected void ListViewTowns_ItemInserted(object sender, ListViewInsertedEventArgs e)
        {

        }
 protected void ListView1_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     ListView1.InsertItemPosition = InsertItemPosition.None;
 }
 protected void ListViewTowns_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     this.ListViewTowns.InsertItemPosition = InsertItemPosition.None;
     this.ListViewTowns.DataBind();
 }
Example #8
0
 void ListView1_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     InitializePage();
 }
 protected void CategoriesList_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     this.CategoriesList.InsertItemPosition = InsertItemPosition.None;
 }
 protected void ListView1_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     String strEmail = e.Values["EMail"].ToString();
     Mailing.Send(strEmail, "Witaj, zapraszamy", "Haslo");
 }
Example #11
0
 protected void lvTowns_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     this.lvTowns.InsertItemPosition = InsertItemPosition.None;
 }
 protected void ListViewInsertCountryForm_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     this.ListViewInsertCountryForm.InsertItemPosition = InsertItemPosition.None;
     ShowInsertCountryButton();
 }
 protected void ListViewCustomers_ItemInserted(object sender,
     ListViewInsertedEventArgs e)
 {
     this.ListView1.InsertItemPosition = InsertItemPosition.None;
 }
Example #14
0
 protected void ListViewComments_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     ListView listviewCommentsControl = (ListView)this.FormViewPost.FindControl("ListViewComments");
     listviewCommentsControl.InsertItemPosition = InsertItemPosition.None;
 }
 protected void BooksListView_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     this.BooksListView.InsertItemPosition = InsertItemPosition.None;
     ErrorSuccessNotifier.AddSuccessMessage("Book created successfully!");
 }
Example #16
0
        private bool HandleInsertCallback(int affectedRows, Exception ex) {
            ListViewInsertedEventArgs e = new ListViewInsertedEventArgs(affectedRows, ex);
            e.SetValues(_insertValues);

            OnItemInserted(e);

            _insertValues = null;
            if (ex != null && !e.ExceptionHandled) {
                // If there is no validator in the validation group that could make sense
                // of the error, return false to proceed with standard exception handling.
                // But if there is one, we want to let it display its error instead of throwing.
                if (PageIsValidAfterModelException()) {
                    return false;
                }
                e.KeepInInsertMode = true;
            }

            if (IsUsingModelBinders && !Page.ModelState.IsValid) {
                e.KeepInInsertMode = true;
            }

            if (!e.KeepInInsertMode) {
                RequiresDataBinding = true;
            }
            return true;
        }
 protected void ArticlesListView_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     this.ArticlesListView.InsertItemPosition = InsertItemPosition.None;
     ErrorSuccessNotifier.AddSuccessMessage("Article successfully created.");
 }
Example #18
0
 protected virtual void OnItemInserted(ListViewInsertedEventArgs e) {
     EventHandler<ListViewInsertedEventArgs> handler = (EventHandler<ListViewInsertedEventArgs>)Events[EventItemInserted];
     if (handler != null) {
         handler(this, e);
     }
 }
 protected void TodosListView_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     this.TodosListView.InsertItemPosition = InsertItemPosition.None;
 }
 protected void ListView1_ItemInserted(object sender, ListViewInsertedEventArgs e)
 {
     ModalPopupExtender1.Show();
 }