コード例 #1
0
ファイル: Neighbours.aspx.cs プロジェクト: abigabaw/wis
        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
ファイル: Neighbours.aspx.cs プロジェクト: abigabaw/wis
        /// <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);
            }
        }