コード例 #1
0
 protected void grvAdmin_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     string aId = e.CommandArgument.ToString();
     string aName = e.CommandName.ToLower();
     switch (aName)
     {
         case "user":
             Response.Redirect("~/Admins/editadminaddroles/" + aId + "/Default.aspx");
             break;
         case "edit":
             Response.Redirect("~/Admins/editadmin/" + aId + "/Default.aspx");
             break;
         case "delete":
             AdminBSO adminBSO = new AdminBSO();
             adminBSO.DeleteAdmin(aId);
             ViewAdmin();
             break;
     }
 }