Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                CatergoriesID cat = new CatergoriesID();
                categoryList = cat.GetAll();

                DataListCategory.DataSource = categoryList;
                DataListCategory.DataBind();

                if (Session["catid"] != null)
                {
                    int Catid = Convert.ToInt32(Session["catid"]);
                    Label13.Text = Catid.ToString();

                    Activity ac = new Activity();
                    activityList = ac.GetAllActivityByCategory(Catid);

                    DataListActivity.DataSource = activityList;
                    DataListActivity.DataBind();
                }
                else
                {
                }
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                CatergoriesID cat = new CatergoriesID();
                categoryList = cat.GetAll();

                DataListCategory.DataSource = categoryList;
                DataListCategory.DataBind();

                if (Session["catid"] != null)
                {
                    int Catid = Convert.ToInt32(Session["catid"]);


                    Place pl = new Place();
                    placeList = pl.GetAllPlacesByCat(Catid);

                    DataListPlaces.DataSource = placeList;
                    DataListPlaces.DataBind();
                }
                else
                {
                    Place pl = new Place();
                    placeList = pl.GetAllPlaces();

                    DataListPlaces.DataSource = placeList;
                    DataListPlaces.DataBind();
                }
            }
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                CatergoriesID cat = new CatergoriesID();
                categoryList = cat.GetAll();

                DataListCategory.DataSource = categoryList;
                DataListCategory.DataBind();
            }
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                Place pl = new Place();
                plList = pl.GetAllPlaces();

                DataListPlaces.DataSource = plList;
                DataListPlaces.DataBind();

                CatergoriesID cat = new CatergoriesID();
                categoryList = cat.GetAll();

                DataListCategory.DataSource = categoryList;
                DataListCategory.DataBind();
            }
        }
Esempio n. 5
0
        private void LoadCategoryData()
        {
            //カテゴリテーブルから全カテゴリの情報を取得し、
            //comboBoxのアイテムに設定する
            ParamCategorySearch pcs = new ParamCategorySearch();

            ServiceSearchCategory ssc = new ServiceSearchCategory(pcs);

            ssc.Run();
            TypeCategoryAggregate dta = (TypeCategoryAggregate)pcs.GetParam(DataType.CategoryAggregate);
            AggregateCategory     ac  = (AggregateCategory)dta.CategoryAggregate();

            for (int i = 0; i < ac.Size(); i++)
            {
                DataListCategory dlc = (DataListCategory)ac.GetData(i);
                comboBox1.Items.Add(dlc.CategoryName());
            }
        }
Esempio n. 6
0
        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            string substring = TextBoxSearch.Text;

            if (substring == "")
            {
                CatergoriesID cat = new CatergoriesID();
                categoryList = cat.GetAll();

                DataListCategory.DataSource = categoryList;
                DataListCategory.DataBind();
            }
            else
            {
                CatergoriesID cat = new CatergoriesID();
                categoryList = cat.GetBySearch(substring);

                DataListCategory.DataSource = categoryList;
                DataListCategory.DataBind();
            }
        }