Esempio n. 1
0
        protected void gvBlocks_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Edit")
            {
                Response.Redirect(EditUrl(string.Empty, string.Empty, "Edit", "id=" + e.CommandArgument));
            }

            if (e.CommandName == "Delete")
            {
                var tc = new BlockController();
                tc.DeleteBlock(Convert.ToInt32(e.CommandArgument), ModuleId);
            }
            Response.Redirect(DotNetNuke.Common.Globals.NavigateURL());
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string          id = txtBlockId.Text;
            BlockController blockController = new BlockController();
            bool            i = blockController.DeleteBlock(id);

            if (i == true)
            {
                MessageBox.Show("Selected Block Information deleted successfully!");

                txtBlockId.Text     = "";
                txtBlockName.Text   = "";
                txtGender.Text      = "";
                txtDescription.Text = "";
                txtStatus.Text      = "";
            }
            else
            {
                MessageBox.Show("Selected Block Information is not deleted successfully!");
            }
        }