protected void submit_Click(object sender, EventArgs e) { if (Session["Sid"] != null && Session["Sid"].ToString() != "0") { Repository.Shops.Notes(txtNotes.Text, chkFlag.Checked, Session["Sid"].ToString()); BrowsegridNotes.Rebind(); txtNotes.Text = ""; chkFlag.Checked = false; } }
protected void BrowsegridNotes_DeleteCommand(object sender, GridCommandEventArgs e) { GridDataItem DeletedItem = (GridDataItem)e.Item; Label lblRecord = (Label)DeletedItem.FindControl("lblNoteRecord"); //int id = (int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["RecordID"]; string ReferenceID = lblRecord.Text.ToString(); Repository.Shops.DeleteNotes(ReferenceID); BrowsegridNotes.Rebind(); }