public string Save(Candidate aCandidate)
 {
     connection.Open();
     string query = string.Format("INSERT INTO t_Candidate VALUES('{0}','{1}')", aCandidate.Name,
         aCandidate.Symbol);
     SqlCommand command = new SqlCommand(query, connection);
     int affectedRow = command.ExecuteNonQuery();
     if (affectedRow>0)
     {
         return @"Candidate has been saved sucessfully";
     }
     return @"Candidate save failed";
 }
 private void SaveButton_Click(object sender, EventArgs e)
 {
     Candidate aCandidate=new Candidate(nameTextBox.Text,symbolTextBox.Text);
     string msg = aCandidateBll.Save(aCandidate);
     MessageBox.Show(msg);
 }
 private void GetAllSymbolInComboBox()
 {
     Candidate aCandidate = new Candidate();
     List<Candidate> candidates = aCandidateBll.GetAllCandidate(aCandidate);
 }
 public string Save(Candidate aCandidate)
 {
     return aCandidateGateway.Save(aCandidate);
 }
 public List<Candidate> GetAllCandidate(Candidate aCandidate)
 {
     return aCandidateGateway.GetAllCandidate(aCandidate);
 }
 public List<Candidate> GetAllCandidate(Candidate aCandidate)
 {
     connection.Open();
 }