private void CandidateFill()
        {
            CandidateBiz     candidateBiz = new CandidateBiz();
            List <Candidate> candidates   = candidateBiz.GetCandidates();

            if (candidates != null && candidates.Count > 0)
            {
                GridView1.DataSource = candidates;
                GridView1.DataBind();
            }
            else
            {
                GridView1.DataSource = null;
                GridView1.DataBind();
            }
        }
예제 #2
0
        private void CandidateFill()
        {
            CandidateBiz     candidateBiz = new CandidateBiz();
            List <Candidate> candidates   = candidateBiz.GetCandidates();

            if (candidates != null && candidates.Count > 0)
            {
                for (int i = 0; i < candidates.Count; i++)
                {
                    ddl_Candidate.Items.Add(candidates[i].ID.ToString());
                }
                ddl_Candidate.Items.Insert(0, new ListItem("Select Candidate", " "));
            }
            else
            {
                ddl_Candidate.Items.Clear();
            }
        }