Пример #1
0
    protected void btnDelete_Click(object sender, ImageClickEventArgs e)
    {
        reasonCode.DeleteTablesData(hidPrimaryKey.Value);
        Clear();
        DisplaStatusMessage(deleteMessage, "success");
        ViewState["Operation"] = "Delete";
        BindDataGrid();

        btnSave.Visible = false;
        btnDelete.Visible = false;
        UpdatePanels();
    }
Пример #2
0
 protected void dgCountryCode_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandName == "Edit")
     {
         dtTablesData = freightTerms.GetReasonCodeData("pTableID = '" + e.CommandArgument + "'");
         DisplayRecord();
         btncheck();
         btnSave.Visible = (CountrySecurity != "") ? true : false;
         ScriptManager.RegisterClientScriptBlock(txtDescription, txtDescription.GetType(), "focud", "document.getElementById('" + txtDescription.ClientID + "').select();document.getElementById('" + txtDescription.ClientID + "').focus();", true);
     }
     if (e.CommandName == "Delete")
     {
         ViewState["Operation"] = "Delete";
         freightTerms.DeleteTablesData(e.CommandArgument.ToString());
         BindDataGrid();
         DisplaStatusMessage(deleteMessage, "Success");
         Clear();
     }
     ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "Focus", "document.getElementById('div-datagrid').scrollTop='" + hidScrollTop.Value + "';", true);
     UpdatePanels();
 }