protected void AddFeeDetailsOfStudent(object sender, EventArgs e) { Page.Validate("rngCurrentGroup"); // Page.Validate(); if (!Page.IsValid) { return; } if (Session[SessionVariables.UserIdInSession] != null && Session[SessionVariables.StudentSelectedToUpdateInAccountMaintenance] != null) { var currentlyLoggedInUser = PageDataService.GetUserByIdInAdoNet(Convert.ToInt32(Session[SessionVariables.UserIdInSession].ToString())); var isAdmin = PageDataService.IsUserAdminEntityFrameWork(currentlyLoggedInUser.UserId); PageDataService.AddTransactionDetailAdoNet(Convert.ToInt32(hdnAccountId.Value), Convert.ToInt32(hdnStudentId.Value), Convert.ToInt32(txtStudentCurrentFee.Text.Trim()), Convert.ToInt32( Session[SessionVariables.UserIdInSession].ToString()), isAdmin, Convert.ToInt32(hdnAccademicYearId.Value)); if (isAdmin) { PageDataService.UpdateFeePaidForAccountByAccountIdAdoNet(Convert.ToInt32(hdnAccountId.Value), Convert.ToInt32(txtStudentCurrentFee.Text.Trim()), Convert.ToInt32(txtStudentDiscount.Text)); } Response.Redirect(Request.RawUrl, false); } }