示例#1
0
 /// <summary>
 /// Automatically fills add interface for modification
 /// </summary>
 /// <param name="modifyw">The wrestler searched up</param>
 private void editWrestler(Wrestler modifyw)
 {
     ddb_addmember.SelectedIndex = 0;
     txb_addfirstname.Text       = modifyw.getFirstName();
     txb_addlastname.Text        = modifyw.getLastName();
     ddb_addgender.SelectedItem  = modifyw.getGender();
     txb_addyearofexp.Text       = modifyw.getYearExp();
     txb_addschool.Text          = modifyw.getSchool();
     ddb_addstatus.SelectedItem  = modifyw.getStatus();
     txb_addbirthday.Text        = modifyw.getBirthday();
     txb_addweight.Text          = Convert.ToString(modifyw.getWeight());
     txb_addwin.Text             = Convert.ToString(modifyw.getWin());
     txb_addlose.Text            = Convert.ToString(modifyw.getLoss());
     txb_addpinwin.Text          = Convert.ToString(modifyw.getPinWin());
     txb_addtotalpoint.Text      = Convert.ToString(modifyw.getTotalPoint());
     ddb_adduniform.SelectedItem = modifyw.getUniform();
     btn_modify.Visible          = true;
     btn_delete.Enabled          = true;
     btn_cancel.Enabled          = true;
     ddb_addmember.Enabled       = false;
 }
示例#2
0
        /// <summary>
        /// Creates a new wrestler and adds them into the list
        /// </summary>
        /// <param name="firstName"></param>
        /// <param name="lastName"></param>
        /// <param name="gender"></param>
        /// <param name="yearExp"></param>
        /// <param name="school"></param>
        /// <param name="birthday"></param>
        /// <param name="weight"></param>
        /// <param name="win"></param>
        /// <param name="loss"></param>
        /// <param name="pinWin"></param>
        /// <param name="totalPoint"></param>
        /// <param name="status"></param>
        /// <param name="uniform"></param>
        public void addWrestler(string firstName, string lastName, string gender, string yearExp, string school, string birthday, double weight, double win, double loss, int pinWin, double totalPoint, string status, string uniform)
        {
            Wrestler newWrestler = new Wrestler(firstName, lastName, gender, yearExp, school, birthday, weight, win, loss, pinWin, totalPoint, status, uniform);

            wrestler.Add(newWrestler);
        }