protected void btnDelete_Click(object sender, EventArgs e)
 {
     foreach (int rowIndex in grdPermission.SelectedRowIndexArray)
     {
         int id = Convert.ToInt32(grdPermission.DataKeys[rowIndex + grdPermission.PageIndex * grdPermission.PageSize][0]);
         permissionService.Delete(permissionService.FindBy(id));
     }
     grdPermissionDataBind();
 }
        private void loadData(int id)
        {
            Permission permission = permissionService.FindBy(id);

            ddlPermissionName.SelectedValue = permission.PermissionName;
            txtDescription.Text             = permission.Description;
            ddlPath.SelectedValue           = permission.PathId.ToString();
        }