public Sapbj BuildFromRow(DataRow row) { var returnRecord = Sapbj.BuildSapbjFromRow(row); returnRecord = this.BuildExtraFromRow <Sapbj>(returnRecord, row); return(returnRecord); }
public Sapbj Insert(Sapbj record) { DataRow row = this.dataSet.ttblsapbj.NewttblsapbjRow(); this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.dataSet.ttblsapbj.AddttblsapbjRow((pdssapbjDataSet.ttblsapbjRow)row); this.SaveChanges(); return(this.dataSet.ttblsapbj.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblsapbj.Rows[0]) : null); }
public Sapbj GetByRowId(string rowId, string fldList) { var row = this.GetRowByRowId(rowId, fldList); Sapbj sapbj = null; if (row != null) { sapbj = this.BuildFromRow(row); } return(sapbj); }
protected Sapbj Fetch(string where, int batchsize, string fldList) { this.FetchWhere(where, batchsize, fldList); var row = this.dataSet.ttblsapbj.AsEnumerable().SingleOrDefault(); Sapbj sapbj = null; if (row != null) { sapbj = this.BuildFromRow(row); } return(sapbj); }
public void Delete(Sapbj record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttblsapbj.NewttblsapbjRow(); Sapbj.BuildMinimalRow(ref row, record); this.dataSet.ttblsapbj.AddttblsapbjRow((pdssapbjDataSet.ttblsapbjRow)row); } row.Delete(); this.SaveChanges(); }
public Sapbj Update(Sapbj 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.ttblsapbj.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblsapbj.Rows[0]) : null); } ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421); return(null); }
public void UpdateToRow(ref DataRow row, Sapbj record) { Sapbj.UpdateRowFromSapbj(ref row, record); this.ExtraUpdateToRow(ref row, record); }
public void Delete(Sapbj record) { this.adapter.Delete(record); }
public Sapbj Update(Sapbj record) { return(this.adapter.Update(record)); }
public Sapbj Insert(Sapbj record) { return(this.adapter.Insert(record)); }
public void Delete(Sapbj record) { this.repository.Delete(record); }
public Sapbj Update(Sapbj record) { return(this.repository.Update(record)); }
public Sapbj Insert(Sapbj record) { return(this.repository.Insert(record)); }