예제 #1
0
        protected void lnkDelete_Click(object sender, EventArgs e)
        {
            getSconn();
            _bll = new ToolBll(Session["sConn"].ToString());
            switch (hidTabType.Value)
            {
            case TYPE_TABLE:
            {
                if (lsbDataTable.SelectedIndex >= 0 && lsbDataTable.SelectedValue != null)
                {
                    _bll.deleteTable(getAbsoluteTableName(hidSchemasName.Value, hidTablesName.Value));
                }
                break;
            }

            case TYPE_VIEW:
            {
                if (lsbDataView.SelectedIndex >= 0 && lsbDataView.SelectedValue != null)
                {
                    _bll.deleteView(getAbsoluteTableName(hidSchemasName.Value, hidTablesName.Value));
                }
                break;
            }

            case TYPE_PROC:
            {
                if (lsbProcedures.SelectedIndex >= 0 && lsbProcedures.SelectedValue != null)
                {
                    _bll.deleteProcedure(getAbsoluteTableName(hidSchemasName.Value, hidTablesName.Value));
                }
                break;
            }
            }
            //Changed on 2015.06.04
            BindDataList(hidTabType.Value);
            panToolBar.Visible = true;
            panMessage.Visible = false;
            lnkDelete.Visible  = false;

            closeSelect();
        }