public int updateData(DTOStanding _dtoStanding)
 {
     if (_dtoStanding != null)
     {
         DataExecute.Instance.createSqlCmd("UpdateStandingValue", ref _dtoStanding);
         return DataExecute.Instance.updateData(DataConnection.Instance.m_cmd);
     }
     return 0;
 }
 public int insertData(DTOStanding dtoStanding)
 {
     return new DALStanding().insertData(dtoStanding);
 }
 public int updateData(DTOStanding dtoStanding)
 {
     return new DALStanding().updateData(dtoStanding);
 }
        private void bbtnAddTeam_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            DataRowView rowFocused = grdvListSeason.GetFocusedRow() as DataRowView;
            if (rowFocused != null)
            {
                string seasonID = rowFocused["SeasonID"].ToString();
                frmChoseTeam.getInstance().seasonID = seasonID.Trim();
                frmChoseTeam.getInstance().initData();
                frmChoseTeam.getInstance().ShowDialog();
                //
                if (frmChoseTeam.getInstance().listTeamID.Count != 0)
                {
                    SplashScreenManager.ShowForm(typeof(frmWaiting));
                    foreach(string teamID in frmChoseTeam.getInstance().listTeamID)
                    {
                        DTOStanding dtoStanding = new DTOStanding();
                        dtoStanding.seasonID = seasonID;
                        dtoStanding.teamID = teamID;
                        dtoStanding.totalMatch = 0;
                        dtoStanding.totalMatchWon = 0;
                        dtoStanding.totalMatchLost = 0;
                        dtoStanding.totalMatchDrawn = 0;
                        dtoStanding.goalsFor = 0;
                        dtoStanding.goalsAgainst = 0;
                        dtoStanding.goalsDisfference = 0;
                        dtoStanding.point = 0;

                        if (new BUSStanding().insertData(dtoStanding) <= 0)
                        {
                            XtraMessageBox.Show("Đội bóng đã tồn tại trong danh sách!");
                        }
                    }
                    SplashScreenManager.CloseForm();
                    frmChoseTeam.getInstance().listTeamID.Clear();
                }

                //
                grdListTeam.DataSource = new BUSTeam().getAllTeamValueBySeasonID(seasonID);
            }
        }