コード例 #1
0
ファイル: ProjectMailbox.ascx.cs プロジェクト: rms81/bugnet
        /// <summary>
        /// Handles the DeleteCommand event of the grdMailboxes control.
        /// </summary>
        /// <param name="source">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.Web.UI.WebControls.DataGridCommandEventArgs"/> instance containing the event data.</param>
        protected void dtgMailboxes_Delete(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
        {
            var id = (int)grdMailboxes.DataKeys[e.Item.ItemIndex];

            if (!ProjectMailboxManager.Delete(id))
            {
                ActionMessage.ShowErrorMessage(LoggingManager.GetErrorMessageResource("DeleteMailboxError"));
            }
            else
            {
                BindMailboxes();
            }
        }