Пример #1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            SlidePanel.Height = btnSearch.Height;
            SlidePanel.Top    = btnSearch.Top;

            SearchNote sn = new SearchNote();

            UserControlPanel.Controls.Add(sn);
            sn.Dock = DockStyle.Fill;
            sn.BringToFront();
        }
Пример #2
0
        public ActionResult SearchNotes()
        {
            DBEntities    _db            = new DBEntities();
            var           typeList       = _db.NoteTypes.ToList();
            var           categoryList   = _db.NoteCategories.ToList();
            var           countryList    = _db.Countries.ToList();
            List <string> universityList = new List <string>();

            foreach (InitialNotesMarketplace.Models.SellerNote row in _db.SellerNotes)
            {
                if (!universityList.Contains(row.UniversityName))
                {
                    universityList.Add(row.UniversityName);
                }
            }

            List <string> courseList = new List <string>();

            foreach (InitialNotesMarketplace.Models.SellerNote row in _db.SellerNotes)
            {
                if (!courseList.Contains(row.Course))
                {
                    courseList.Add(row.Course);
                }
            }

            SearchNote searchNote = new SearchNote()
            {
                ListCategories   = categoryList,
                ListCountries    = countryList,
                ListTypes        = typeList,
                ListUniversities = universityList,
                ListCourses      = courseList
            };

            Session["searchNote"] = searchNote;
            Models.SellerNote snote = new Models.SellerNote();

            return(View(snote));
        }