rendered paste bodypublic void Repeater_ItemCreated(Object Sender, RepeaterItemEventArgs e)
{
SemesterList semesters;
//Schedule schedule;
AccountHolderStudent student;
if ((student = (AccountHolderStudent)e.Item.DataItem) != null)
{
student = AccountHolderStudent.GetAccountHolderStudent(student.PersonID);
// load the semester value list control of semesters that are currently being registered
semesters = SemesterList.GetSemesterCurrentList();
foreach (SemesterList.SemesterInfo semester in semesters)
{
foreach (Registration registration in student.Registrations)
{
if (registration.SemesterIDKey == semester.SemesterID)
{
if(student.Registrations[0].RegistrationStatusID == "Pending Payment" ||
student.Registrations[0].RegistrationStatusID == "Pending Placement")
{
if(e.Item.ItemType == ListItemType.Item)
{
e.Item.FindControl("btnEdit").Visible = true;
e.Item.FindControl("btnReview").Visible = false;
break;
}
else if(e.Item.ItemType == ListItemType.AlternatingItem)
{
e.Item.FindControl("btnEdit01").Visible = true;
e.Item.FindControl("btnReview01").Visible = false;
break;
}
}
else
{
if(e.Item.ItemType == ListItemType.Item)
{
e.Item.FindControl("btnEdit").Visible = false;
e.Item.FindControl("btnReview").Visible = true;
break;
}
if(e.Item.ItemType == ListItemType.AlternatingItem)
{
e.Item.FindControl("btnEdit01").Visible = true;
e.Item.FindControl("btnReview01").Visible = false;
break;
}
}
}
}
}
}
}