static void populate_ocValuesForInsert(List <string> ocValues, object DTO) { ThisDTO oThisDTO = (ThisDTO)DTO; ocValues.Add(oThisDTO.GameDate.ToString()); ocValues.Add(oThisDTO.LeagueName.ToString()); }
public void InsertRow() { ThisDTO oThisDTO = populateDTO(); // TableName ColNames(csv) DTO Insert into DTO Method SqlFunctions.DALInsertRow(TableName, TableColumns, oThisDTO, populate_ocValuesForInsert, _ConnectionString); }
private ThisDTO populateDTO() { ThisDTO oThisDTO = new ThisDTO(); oThisDTO.LeagueName = _oLeagueDTO.LeagueName; // ... return(oThisDTO); }
static void populateDTOFromRdr(List <object> ocRows, object oRow, SqlDataReader rdr) { // Column Updates Procedure // 1) Update Table Columns // 2) Select 1000, Cut Column names, Insert in Textpad, run Sql Columns macro, Replace {table}Columns with macro Op // 3) Use CodeGeneration.xlsm to generate populateBoxScoreValues entries // 4) Update CoversBoxScore.PopulateBoxScoresDTO ThisDTO oLeagueDTO = (ThisDTO)oRow; oLeagueDTO.LeagueName = rdr["LeagueName"].ToString().Trim(); oLeagueDTO.RotNum = (int)rdr["RotNum"]; // DateTime double // oLeagueDTO.MultiYearLeague = (bool)rdr["MultiYearLeague"]; }
public int GetRow(ThisDTO oThisDTO) { int rows = SysDAL.DALfunctions.ExecuteSqlQuery(_ConnectionString, getRowSql(), null, oThisDTO, populateDTOFromRdr); return(rows); }