public int updateData(DTOMatch _dtoMatch) { if (_dtoMatch != null) { DataExecute.Instance.createSqlCmd("UpdateMatchValue", ref _dtoMatch); return DataExecute.Instance.updateData(DataConnection.Instance.m_cmd); } return 0; }
private void bbtnSaveMatchInfo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { DataTable data = this.grdListMatch.DataSource as DataTable; if (data != null) { foreach (DataRow row in data.Rows) { DTOMatch dtoMatch = new DTOMatch(); dtoMatch.matchID = row["MatchID"].ToString(); dtoMatch.homeTeam = row["HomeTeam"].ToString(); dtoMatch.visitingTeam = row["VisitingTeam"].ToString(); dtoMatch.stadiumID = row["StadiumID"].ToString(); dtoMatch.startDate = row["StartDate"].ToString(); dtoMatch.startTime = row["StartTime"].ToString(); dtoMatch.refereeID = row["RefereeID"].ToString(); dtoMatch.roundID = row["RoundID"].ToString(); dtoMatch.score = "-:-"; if (new BUSMatch().updateData(dtoMatch) <= 0) { XtraMessageBox.Show("Cập nhật dữ liệu thất bại"); } } } }
public int updateData(DTOMatch _dtoMatch) { return m_dalMatch.updateData(_dtoMatch); }
public int insertData(DTOMatch _dtoMatch) { return m_dalMatch.insertData(_dtoMatch); }