public Lostbus BuildFromRow(DataRow row) { var returnRecord = Lostbus.BuildLostbusFromRow(row); returnRecord = this.BuildExtraFromRow <Lostbus>(returnRecord, row); return(returnRecord); }
public Lostbus Insert(Lostbus record) { DataRow row = this.dataSet.ttbllostbus.NewttbllostbusRow(); this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.dataSet.ttbllostbus.AddttbllostbusRow((pdslostbusDataSet.ttbllostbusRow)row); this.SaveChanges(); return(this.dataSet.ttbllostbus.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbllostbus.Rows[0]) : null); }
public Lostbus GetByRowId(string rowId, string fldList) { var row = this.GetRowByRowId(rowId, fldList); Lostbus lostbus = null; if (row != null) { lostbus = this.BuildFromRow(row); } return(lostbus); }
protected Lostbus Fetch(string where, int batchsize, string fldList) { this.FetchWhere(where, batchsize, fldList); var row = this.dataSet.ttbllostbus.AsEnumerable().SingleOrDefault(); Lostbus lostbus = null; if (row != null) { lostbus = this.BuildFromRow(row); } return(lostbus); }
public void Delete(Lostbus record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttbllostbus.NewttbllostbusRow(); Lostbus.BuildMinimalRow(ref row, record); this.dataSet.ttbllostbus.AddttbllostbusRow((pdslostbusDataSet.ttbllostbusRow)row); } row.Delete(); this.SaveChanges(); }
public Lostbus Update(Lostbus record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row != null) { this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.SaveChanges(); return(this.dataSet.ttbllostbus.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbllostbus.Rows[0]) : null); } ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421); return(null); }
public void UpdateToRow(ref DataRow row, Lostbus record) { Lostbus.UpdateRowFromLostbus(ref row, record); this.ExtraUpdateToRow(ref row, record); }
public void Delete(Lostbus record) { this.repository.Delete(record); }
public Lostbus Update(Lostbus record) { return(this.repository.Update(record)); }
public Lostbus Insert(Lostbus record) { return(this.repository.Insert(record)); }
public void Delete(Lostbus record) { this.adapter.Delete(record); }
public Lostbus Update(Lostbus record) { return(this.adapter.Update(record)); }
public Lostbus Insert(Lostbus record) { return(this.adapter.Insert(record)); }