Exemplo n.º 1
0
 protected void lvScreen_ItemDeleted(object sender, ListViewDeletedEventArgs e)
 {
     if (e.Exception != null)
     {
         lblError.Text = "A database error has occurred. " + e.Exception.Message;
         e.ExceptionHandled = true;
     }
 }
Exemplo n.º 2
0
		protected override void OnItemDeleted (ListViewDeletedEventArgs e)
		{
			RecordEvent ("Enter");
			base.OnItemDeleted (e);
			RecordEvent ("Leave");
		}
Exemplo n.º 3
0
 protected void lvEngLotCard_ItemDeleted(object sender, ListViewDeletedEventArgs e)
 {
     //刷新本页
     lBtnRefresh_Click(null, null);
 }
Exemplo n.º 4
0
 protected virtual void OnItemDeleted(ListViewDeletedEventArgs e) {
     EventHandler<ListViewDeletedEventArgs> handler = (EventHandler<ListViewDeletedEventArgs>)Events[EventItemDeleted];
     if (handler != null) {
         handler(this, e);
     }
 }
Exemplo n.º 5
0
        private bool HandleDeleteCallback(int affectedRows, Exception ex) {
            ListViewDeletedEventArgs e = new ListViewDeletedEventArgs(affectedRows, ex);
            e.SetKeys(_deleteKeys);
            e.SetValues(_deleteValues);

            OnItemDeleted(e);
            _deleteKeys = null;
            _deleteValues = 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;
                }
            }
            EditIndex = -1;

            if (affectedRows > 0) {
                // Patch up the selected index if we deleted the last item on the last page.
                if ((_totalRowCount > 0) &&
                    (_deletedItemIndex == SelectedIndex) &&
                    (_deletedItemIndex + _startRowIndex == _totalRowCount)) {
                    SelectedIndex--;
                }
            }
            _deletedItemIndex = -1;

            RequiresDataBinding = true;
            return true;
        }
 protected void ListView1_ItemDeleted(object sender, ListViewDeletedEventArgs e)
 {
     ModalPopupExtender1.Show();
 }