public Sled BuildFromRow(DataRow row) { var returnRecord = Sled.BuildSledFromRow(row); returnRecord = this.BuildExtraFromRow <Sled>(returnRecord, row); return(returnRecord); }
public string Part1() { var map = new Map(InputFileAsStringList); var sled = new Sled(map, 3, 1); var treesHit = sled.SlideDownMap(); return($"Trees hit : {treesHit}"); }
public Sled Insert(Sled record) { DataRow row = this.dataSet.ttblsled.NewttblsledRow(); this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.dataSet.ttblsled.AddttblsledRow((pdssledDataSet.ttblsledRow)row); this.SaveChanges(); return(this.dataSet.ttblsled.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblsled.Rows[0]) : null); }
public Sled GetByRowId(string rowId, string fldList) { var row = this.GetRowByRowId(rowId, fldList); Sled sled = null; if (row != null) { sled = this.BuildFromRow(row); } return(sled); }
protected Sled Fetch(string where, int batchsize, string fldList) { this.FetchWhere(where, batchsize, fldList); var row = this.dataSet.ttblsled.AsEnumerable().SingleOrDefault(); Sled sled = null; if (row != null) { sled = this.BuildFromRow(row); } return(sled); }
private void DeleteUseRowID(Sled record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttblsled.NewttblsledRow(); Sled.BuildMinimalRow(ref row, record); this.dataSet.ttblsled.AddttblsledRow((pdssledDataSet.ttblsledRow)row); } row.Delete(); this.SaveChanges(); }
public Sled Update(Sled record) { var row = this.GetRowByRowpointer(record.rowpointer, string.Empty); if (row != null) { this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.SaveChanges(); return(this.dataSet.ttblsled.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblsled.Rows[0]) : null); } ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421); return(null); }
// Use this for initialization void Start() { //Set Variables currState = State.Menu; prevState = State.GameOver; canvas = GameObject.Find("Canvas"); instructIndex = 1; //Prep canvas.SetActive(true); Time.timeScale = 0; tempSled = new Sled(); tempSled.time = float.MaxValue; numFinished = 0; }
public string Part2() { var map = new Map(InputFileAsStringList); var sleds = new Sled[5] { new Sled(map, 1, 1), new Sled(map, 3, 1), new Sled(map, 5, 1), new Sled(map, 7, 1), new Sled(map, 1, 2) }; long result = 1; foreach (var sled in sleds) { result *= sled.SlideDownMap(); } return($"Combination of Trees hit : {result}"); }
public Sled Update(Sled record) { return(this.adapter.Update(record)); }
public void Delete(Sled record) { this.repository.Delete(record); }
public Sled Update(Sled record) { return(this.repository.Update(record)); }
public Sled Insert(Sled record) { return(this.repository.Insert(record)); }
public Sled Insert(Sled record) { return(this.adapter.Insert(record)); }
public void Awake() { instance = this; }
public void UpdateToRow(ref DataRow row, Sled record) { Sled.UpdateRowFromSled(ref row, record); this.ExtraUpdateToRow(ref row, record); }
public void Delete(Sled record) { this.adapter.Delete(record); }