protected void BtnSearchAuthor_Click(object sender, EventArgs e) { if (TbxSearchAuthor.Text != string.Empty) { string h_author = CleanString(TbxSearchAuthor.Text); SourceAuthors.SelectCommand = $"SELECT * FROM BookAuthors WHERE CONTAINS(firstName,'\"{h_author}*\"') OR " + $"CONTAINS(lastName,'\"{h_author}*\"')"; } GrdAuthors.DataBind(); }
protected void BtnDeleteAuthor_ServerClick(object sender, EventArgs e) { SourceAuthorEdit.Delete(); GrdAuthors.DataBind(); GrdBooks.DataBind(); GrdLibraryIndex.DataBind(); DrpAuthors.Items.Clear(); DrpAuthors.DataBind(); ScriptManager.RegisterStartupScript(BtnDeleteAuthor, GetType(), "DeleteAuthorModal", @"$('#DeleteAuthorModal').modal('hide');", true); }
protected void FvBtnUpdateAuth_ServerClick(object sender, EventArgs e) { if (IsValid) { FvwAuthors.UpdateItem(true); GrdAuthors.DataBind(); GrdBooks.DataBind(); GrdLibraryIndex.DataBind(); DrpAuthors.Items.Clear(); DrpAuthors.DataBind(); ScriptManager.RegisterStartupScript(FvBtnUpdateAuth, GetType(), "EditAuthorModal", @"$('#EditAuthorModal').modal('hide');", true); ScriptManager.RegisterStartupScript(FvBtnUpdateAuth, GetType(), "UpdateNotifModal", @"$('#UpdateNotifModal').modal('toggle');", true); } }