Beispiel #1
0
        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);
        }
Beispiel #2
0
        private void DefaultLoad()
        {
            hfPageID.Value        = "Default";
            hfUserLoginRole.Value = WorkingProfile.UserRoleLogin;

            hfRunningModel.Value = WebConfigB.RunningModel();
            if (DBConnectionB.CurrentDB != "Live")
            {
                LabelTrain.Text    = DBConnectionB.CurrentDB;
                LabelTrain.Visible = true;
            }

            AssembleListItem.SetLists(rblLoginAS, "UserRole", User.Identity.Name, "", "");
            AssembleListItem.SetValue(rblLoginAS, WorkingProfile.UserRole);
            try
            {
                LoginUserRole.InnerText = UserProfile.LoginUserName + " as " + rblLoginAS.SelectedItem.Text;
            }

            catch (Exception ex)
            {
                LoginUserRole.InnerText = UserProfile.LoginUserName + " as " + WorkingProfile.UserRole;
            }
            hfCurrentUserRole.Value = WorkingProfile.UserRole;

            GetUserLastWorkingValue();
        }
Beispiel #3
0
        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();
        }
Beispiel #4
0
 private void InitialPage()
 {
     if (WorkingProfile.SchoolCode == "")
     {
         ddlSchool.SelectedIndex = 0;
         AssembleListItem.SetValue(ddlSchoolCode, ddlSchool.SelectedValue);
         WorkingProfile.SchoolCode = ddlSchool.SelectedValue;
     }
     else
     {
         AssembleListItem.SetValue(ddlSchool, WorkingProfile.SchoolCode);
         AssembleListItem.SetValue(ddlSchoolCode, WorkingProfile.SchoolCode);
     }
 }
Beispiel #5
0
        public void SetSearchListTest_Assembleing_SchoolAreaList()
        {    //Arrange
            string[] searchby  = new[] { "School", "Panel", "Area", "Level", "PostingState", "PendingConfirm", "PostingCycle", "PositionStatus" };
            var      myDDLlist = new System.Web.UI.WebControls.DropDownList();
            string   operate   = searchby[2];// "School";
            string   para0     = "mif";
            string   para1     = "20192020";
            int      expect    = 9;

            //Act
            AssembleListItem.SetSearchList(myDDLlist, operate, para0, para1);
            var result = myDDLlist.Items.Count;

            //Asser
            Assert.AreEqual(expect, result, "School Area list  " + operate + result);
        }
Beispiel #6
0
        public void SetSearchListTest_Assembleing_PostingState()
        {   //Arrange
            string[] searchby  = new[] { "School", "Panel", "Area", "Level", "PostingState", "PendingConfirm", "PostingCycle", "PositionStatus" };
            var      myDDLlist = new System.Web.UI.WebControls.DropDownList();
            string   operate   = searchby[4];// "School";
            string   para0     = "mif";
            string   para1     = "20192020";
            string   expect    = "More Interview";

            //Act
            AssembleListItem.SetSearchList(myDDLlist, operate, para0, para1);
            myDDLlist.SelectedIndex = 4;
            var result = myDDLlist.SelectedItem.Text; // .SelectedValue.ToLower();

            //Assert
            Assert.AreEqual(expect, result, "Posting state  " + operate + result);
        }
Beispiel #7
0
        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);
        }
Beispiel #8
0
        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();
        }
Beispiel #9
0
        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);
        }
Beispiel #10
0
        public void SetList_Assembling_PositionLevel_Elementary_WithIntialValue()
        {  //Arrange
            var myDDLlist = new System.Web.UI.WebControls.DropDownList();
            var parameter = new List2Item()
            {
                Operate = "SupportingQualification", Para0 = "0204", Para1 = "LTO"
            };

            parameter.Operate = "SupportingQualification";
            parameter.Para0   = "0204";
            parameter.Para1   = "LTO";

            var    initialValue = "BC001E";
            string expect       = "Primary and Junior Divisions";

            //Act
            AssembleListItem.SetLists(myDDLlist, "SupportingQualification", parameter, initialValue);
            var result = myDDLlist.SelectedItem.Text; // .SelectedValue.ToLower();

            //Assert
            Assert.AreEqual(expect, result, "Position Level for elementary panel " + result);
        }
Beispiel #11
0
        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);
        }
Beispiel #12
0
 protected void ddlSchoolCode_SelectedIndexChanged(object sender, EventArgs e)
 {
     UserLastWorking.SchoolCode = ddlSchoolCode.SelectedValue;
     AssembleListItem.SetValue(ddlSchool, ddlSchoolCode.SelectedValue);
     BindGridViewData();
 }