示例#1
0
        public ActionResult Index(int?div, int?progid)
        {
            Response.NoCache();
            var m = new OrgSearchModel();

            m.StatusId = OrgStatusCode.Active;

            if (div.HasValue)
            {
                m.DivisionId = div;
                if (progid.HasValue)
                {
                    m.ProgramId = progid;
                }
                else
                {
                    m.ProgramId = m.Division().ProgId;
                }
                m.TagProgramId = m.ProgramId;
                m.TagDiv       = div;
            }
            else if (progid.HasValue)
            {
                m.ProgramId    = progid;
                m.TagProgramId = m.ProgramId;
            }
            else if (Session[STR_OrgSearch].IsNotNull())
            {
                (Session[STR_OrgSearch] as OrgSearchInfo).CopyPropertiesTo(m);
            }

            return(View(m));
        }
示例#2
0
        public ActionResult Index(int?div, int?progid, int?onlinereg, string name)
        {
            Response.NoCache();
            var m = new OrgSearchModel(CurrentDatabase);

            m.StatusId = OrgStatusCode.Active;

            if (name.HasValue())
            {
                m.Name     = name;
                m.StatusId = null;
            }
            if (onlinereg.HasValue)
            {
                m.OnlineReg = onlinereg;
            }

            if (div.HasValue)
            {
                m.DivisionId = div;
                if (progid.HasValue)
                {
                    m.ProgramId = progid;
                }
                else
                {
                    m.ProgramId = m.Division().ProgId;
                }

                m.TagProgramId = m.ProgramId;
                m.TagDiv       = div;
            }
            else if (progid.HasValue)
            {
                m.ProgramId    = progid;
                m.TagProgramId = m.ProgramId;
            }
            else if (Util.OrgSearch.IsNotNull())
            {
                var search = JsonConvert.DeserializeObject <OrgSearchInfo>(Util.OrgSearch);
                search.CopyPropertiesTo(m);
            }

            return(View(m));
        }
示例#3
0
        public ActionResult Index(int?div, int?progid, int?onlinereg, string name)
        {
            Response.NoCache();
            var m = new OrgSearchModel(CurrentDatabase);

            m.StatusId = OrgStatusCode.Active;

            if (name.HasValue())
            {
                m.Name     = name;
                m.StatusId = null;
            }
            if (onlinereg.HasValue)
            {
                m.OnlineReg = onlinereg;
            }

            if (div.HasValue)
            {
                m.DivisionId = div;
                if (progid.HasValue)
                {
                    m.ProgramId = progid;
                }
                else
                {
                    m.ProgramId = m.Division().ProgId;
                }

                m.TagProgramId = m.ProgramId;
                m.TagDiv       = div;
            }
            else if (progid.HasValue)
            {
                m.ProgramId    = progid;
                m.TagProgramId = m.ProgramId;
            }
            else if (Session[STR_OrgSearch].IsNotNull())
            {
                (Session[STR_OrgSearch] as OrgSearchInfo).CopyPropertiesTo(m);
            }

            return(View(m));
        }
示例#4
0
        public ActionResult Index(int?div, int?progid)
        {
            Response.NoCache();
            var m = new OrgSearchModel();

            if (div.HasValue)
            {
                m.DivisionId = div;
                if (progid.HasValue)
                {
                    m.ProgramId = progid;
                }
                else
                {
                    m.ProgramId = m.Division().ProgId;
                }
                m.TagProgramId = m.ProgramId;
                m.TagDiv       = div;
            }
            else if (progid.HasValue)
            {
                m.ProgramId    = progid;
                m.TagProgramId = m.ProgramId;
            }
            else if (Session[STR_OrgSearch].IsNotNull())
            {
                var os = Session[STR_OrgSearch] as OrgSearchInfo;
                m.Name       = os.Name;
                m.ProgramId  = os.Program;
                m.DivisionId = os.Division;
                m.ScheduleId = os.Sched;
                m.StatusId   = os.Status;
                m.OnlineReg  = os.OnlineReg;
                m.TypeId     = os.Type;
                m.CampusId   = os.Campus;
            }
            return(View(m));
        }