コード例 #1
0
        protected void searchjob(object sender, EventArgs e)
        {
            jobWeaponArmors = repository.GetJobWeaponArmos();
            List <JobWeaponArmo> jobWeaponArmorsFilter = new List <JobWeaponArmo>();

            if (textboxfilter.Text == "All" || textboxfilter.Text == "all")
            {
                GridViewJWA.DataSource = repository.GetJobWeaponArmos();
                GridViewJWA.DataBind();
            }
            else
            {
                for (int i = 0; i < jobWeaponArmors.Count(); i++)
                {
                    if (textboxfilter.Text == jobWeaponArmors[i].job)
                    {
                        jobWeaponArmorsFilter.Add(jobWeaponArmors[i]);
                    }
                }
                GridViewJWA.DataSource = jobWeaponArmorsFilter;
                GridViewJWA.DataBind();
            }
        }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     GridViewJWA.DataSource = repository.GetJobWeaponArmos();
     GridViewJWA.DataBind();
 }