protected void tblGeneral_RowCommand(object sender, GridViewCommandEventArgs e) { int tempsessionId = GeneralUtility.GetCurrentSessionId(); string SessionId = ddlyear.SelectedValue.ToString(); string Lga = ddlLgda.SelectedValue.ToString(); string id = e.CommandArgument.ToString(); lblSchoolId.Text = id; if (e.CommandName.ToLower() == "doapprove") { string CountApproved = GeneralUtility.ApproveSchool(int.Parse(id), tempsessionId); int i = 0; if (int.TryParse(CountApproved, out i) && int.Parse(CountApproved) > 0) { DropDownManager.ShowPopUp("Operation Successful, " + CountApproved + " Records Approved"); return; } else { DropDownManager.ShowPopUp("Operation Not Successful, No Records Approved"); return; } } else if (e.CommandName.ToLower() == "doview") { LoadAllStudents(tempsessionId, int.Parse(id)); panelStudent.Visible = true; PnlSchool.Visible = false; } }