예제 #1
0
        public static void DeleteUser(string args)
        {
            int          Pap_NeighbrID   = Convert.ToInt32(args.Trim());
            neighbourBLL neighbourBLLobj = new neighbourBLL();

            neighbourBLLobj.Delete(Pap_NeighbrID);
            (new Neighbours()).BindGrid();
        }
예제 #2
0
        /// <summary>
        /// to Edit and Delete Command
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void grdNeighr_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "EditRow")
            {
                ViewState["PAP_NEIGHBOURID"] = e.CommandArgument;
                GetNeighbor();
                SetUpdateMode(true);
            }
            else if (e.CommandName == "DeleteRow")
            {
                int          Pap_NeighbrID   = Convert.ToInt32(e.CommandArgument);
                neighbourBLL neighbourBLLobj = new neighbourBLL();
                neighbourBLLobj.Delete(Pap_NeighbrID);
                clearfields();
                SetUpdateMode(false);
                BindGrid();

                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Added", "alert('Deleted successfully');", true);
            }
        }