protected void BtnSearchPubGrid_Click(object sender, EventArgs e) { if (TbxSearchPub.Text != string.Empty) { string h_publisher = CleanString(TbxSearchPub.Text); SourcePublishers.SelectCommand = "SELECT * FROM PublisherWithCountryName WHERE " + $"CONTAINS(publisherName,'\"{h_publisher}*\"') OR CONTAINS(countryName,'\"{h_publisher}*\"')"; } GrdPublishers.DataBind(); }
protected void BtnDeletePub_ServerClick(object sender, EventArgs e) { if (IsValid) { SourcePublisherEdit.Delete(); GrdPublishers.DataBind(); GrdBooks.DataBind(); GrdLibraryIndex.DataBind(); DrpPublishers.Items.Clear(); DrpPublishers.DataBind(); ScriptManager.RegisterStartupScript(BtnDeletePub, GetType(), "DeletePublisher", @"$('#DeletePublisher').modal('hide');", true); } }
protected void FvBtnUpdatePub_ServerClick(object sender, EventArgs e) { if (IsValid) { FormView1.UpdateItem(true); GrdPublishers.DataBind(); GrdBooks.DataBind(); GrdLibraryIndex.DataBind(); DrpPublishers.Items.Clear(); DrpPublishers.DataBind(); ScriptManager.RegisterStartupScript(FvBtnUpdatePub, GetType(), "EditAuthorModal", @"$('#EditPublisherModal').modal('hide');", true); ScriptManager.RegisterStartupScript(FvBtnUpdatePub, GetType(), "UpdateNotifModal", @"$('#UpdateNotifModal').modal('toggle');", true); } }