Exemple #1
0
        private void btnAddTeam_Click(object sender, EventArgs e)
        {
            string refEventID = "";

            // 檢查競賽項目
            if (_eventItemDict.ContainsKey(cbxEventItem.Text))
            {
                refEventID = _eventItemDict[cbxEventItem.Text];
            }
            else
            {
                FISCA.Presentation.Controls.MsgBox.Show("請選擇競賽項目");
                return;
            }

            frmRegRecordSetTeam frrs = new frmRegRecordSetTeam();

            frrs.SetIsAddMode(true);
            frrs.SetRefEventID(refEventID);
            frrs.SetEventItemName(cbxEventItem.Text);
            if (frrs.ShowDialog() == DialogResult.Yes)
            {
                _bgSearch.RunWorkerAsync();
            }
        }
Exemple #2
0
 private void btnEditTeam_Click(object sender, EventArgs e)
 {
     if (dgTeamData.SelectedRows.Count == 1)
     {
         string           uid  = dgTeamData.SelectedRows[0].Tag.ToString();
         AccessHelper     ah   = new AccessHelper();
         List <UDT.Teams> data = ah.Select <UDT.Teams>(" uid = " + uid);
         if (data.Count > 0)
         {
             UDT.Teams           updateTeam = data[0];
             frmRegRecordSetTeam frrs       = new frmRegRecordSetTeam();
             frrs.SetIsAddMode(false);
             frrs.SetUpdateTeam(updateTeam);
             frrs.SetEventItemName(cbxEventItem.Text);
             if (frrs.ShowDialog() == DialogResult.Yes)
             {
                 _bgSearch.RunWorkerAsync();
             }
         }
     }
 }