private void BindDDLList() { string schoolyear = PLF.WorkingProfile.SchoolYear; string schoolcode = PLF.WorkingProfile.SchoolCode; string role = PLF.WorkingProfile.UserRole; string superArea = PLF.WorkingProfile.UserArea; ddlSuperarea.Visible = true; AssembleListItem.SetLists(ddlSchoolYear, "SchoolYearbySuper", User.Identity.Name, role, schoolyear); AssembleListItem.SetValue(ddlSchoolYear, schoolyear); if (role == "Principal" || role == "vPrincipal") { ddlSuperarea.Visible = false; superArea = ""; } if (role == "Superintendent") { ddlSuperarea.Enabled = false; // PLF.WorkingProfile.UserArea = AppraisalProfile.ProfileUser.Area(User.Identity.Name, schoolyear, schoolcode); } AssembleListItem.SetLists(ddlSuperarea, "TPASuperArea", User.Identity.Name, role, schoolyear); AssembleListItem.SetValue(ddlSuperarea, superArea); AssembleListItem.SetLists2(ddlSchoolCode, ddlSchools, "SchoolListP", User.Identity.Name, role, schoolyear, superArea); AssembleListItem.SetValue(ddlSchools, schoolcode); AssembleListItem.SetValue(ddlSchoolCode, schoolcode); }
private void AssemblePage() { AssembleListItem.SetLists(ddlSchoolYear, "SchoolYearbySchool", User.Identity.Name, WorkingProfile.UserRole, WorkingProfile.SchoolCode); AssembleListItem.SetValue(ddlSchoolYear, UserProfile.CurrentSchoolYear); AssembleListItem.SetLists2(ddlSchoolCode, ddlSchool, "SchoolList", User.Identity.Name, WorkingProfile.UserRole, ddlSchoolYear.SelectedValue, WorkingProfile.SchoolCode); InitialPage(); }
private void BindDDLList() { string schoolyear = PLF.WorkingProfile.SchoolYear; string schoolcode = PLF.WorkingProfile.SchoolCode; string role = PLF.WorkingProfile.UserRole; string superArea = PLF.WorkingProfile.UserArea; AssembleListItem.SetLists(ddlSchoolYear, "SchoolYearbySchool", User.Identity.Name, role, schoolyear); AssembleListItem.SetValue(ddlSchoolYear, schoolyear); AssembleListItem.SetLists2(ddlSchoolCode, ddlSchool, "SchoolListP", User.Identity.Name, role, schoolyear, superArea); AssembleListItem.SetValue(ddlSchool, schoolcode); AssembleListItem.SetValue(ddlSchoolCode, schoolcode); }
private void AssemblePage() { ParameterSP parameter = new ParameterSP { Operate = "SchoolYearbySchool", UserID = User.Identity.Name, UserRole = WorkingProfile.UserRole, SchoolCode = WorkingProfile.SchoolCode }; AssembleListItem.SetLists(ddlSchoolYear, parameter); // AssembleListItem.SetLists(ddlSchoolYear, "SchoolYearbySchool", User.Identity.Name, WorkingProfile.UserRole, WorkingProfile.SchoolCode); AssembleListItem.SetValue(ddlSchoolYear, UserProfile.CurrentSchoolYear); parameter.Operate = "SchoolList"; parameter.SchoolYear = WorkingProfile.SchoolYear; // ParameterSP parameter1 = new ParameterSP { Operate = "SchoolList", UserID = User.Identity.Name, UserRole = WorkingProfile.UserRole, SchoolYear = WorkingProfile.SchoolYear, SchoolCode = WorkingProfile.SchoolCode }; AssembleListItem.SetLists2(ddlSchoolCode, ddlSchool, parameter); // AssembleListItem.SetLists2(ddlSchoolCode, ddlSchool, "SchoolList", User.Identity.Name, WorkingProfile.UserRole, ddlSchoolYear.SelectedValue, WorkingProfile.SchoolCode); InitialPage(); }
public void SetLists2_Assembling_SchoolandSchoolCodeList_WithInitialValue() { //Arrange var myDDLlist1 = new System.Web.UI.WebControls.DropDownList(); var myDDLlist2 = new System.Web.UI.WebControls.DropDownList(); var parameter = new List2Item() { Operate = "SchoolList", Para0 = "mif", Para1 = "Admin", Para3 = "20182019" }; var initialValue = "0290"; string expect = "All Saints Catholic School"; //Act AssembleListItem.SetLists2(myDDLlist1, myDDLlist2, parameter, initialValue); var result = myDDLlist2.SelectedItem.Text; // .SelectedValue.ToLower(); //Assert Assert.AreEqual(expect, result, "Both School and school code list, selected All Saints Catholic " + result); }
private void BindDDLList() { string schoolyear = PLF.WorkingProfile.SchoolYear; string schoolcode = PLF.WorkingProfile.SchoolCode; string role = PLF.WorkingProfile.UserRole; string superArea = PLF.WorkingProfile.UserArea; ParameterSP parameter = new ParameterSP { Operate = "SchoolYearbySchool", UserID = User.Identity.Name, UserRole = role, SchoolYear = schoolyear }; ddlSuperarea.Visible = true; AssembleListItem.SetLists(ddlSchoolYear, parameter, schoolyear); // AssembleListItem.SetValue(ddlSchoolYear, schoolyear); if (role == "Principal" || role == "vPrincipal") { ddlSuperarea.Visible = false; superArea = ""; } if (role == "Superintendent") { ddlSuperarea.Enabled = false; // PLF.WorkingProfile.UserArea = AppraisalProfile.ProfileUser.Area(User.Identity.Name, schoolyear, schoolcode); } parameter.Operate = "TPASuperArea"; AssembleListItem.SetLists(ddlSuperarea, parameter, superArea); // "TPASuperArea", User.Identity.Name, role, schoolyear); // AssembleListItem.SetValue(ddlSuperarea, superArea); // AssembleListItem.SetLists2( ddlSchoolCode, ddlSchools, "SchoolListP", User.Identity.Name, role,schoolyear, superArea); parameter.Operate = "SchoolListP"; parameter.SchoolCode = superArea; AssembleListItem.SetLists2(ddlSchoolCode, ddlSchools, parameter); AssembleListItem.SetValue(ddlSchools, schoolcode); AssembleListItem.SetValue(ddlSchoolCode, schoolcode); }