AddRound() public method

public AddRound ( Round Round ) : bool
Round CapDemo.DO.Round
return bool
Esempio n. 1
0
 //save competition
 public void saveRound()
 {
     if (txt_NameRound.Text.Trim() == "")
     {
         MessageBox.Show("Vui lòng nhập tên vòng thi.", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         RoundBL RoundBL = new RoundBL();
         Round Round = new Round();
         Round.NameRound = txt_NameRound.Text.Trim();
         Round.IDCompetition = idCompetition;
         if (RoundBL.AddRound(Round) == true)
         {
             this.Close();
         }
         else
         {
             MessageBox.Show("Vòng thi này đã tồn tại trong cuộc thi "+ nameCompetition +".", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }