public Ibao BuildFromRow(DataRow row) { var returnRecord = Ibao.BuildIbaoFromRow(row); returnRecord = this.BuildExtraFromRow <Ibao>(returnRecord, row); return(returnRecord); }
public Ibao Insert(Ibao record) { DataRow row = this.dataSet.ttblibao.NewttblibaoRow(); this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.dataSet.ttblibao.AddttblibaoRow((pdsibaoDataSet.ttblibaoRow)row); this.SaveChanges(); return(this.dataSet.ttblibao.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblibao.Rows[0]) : null); }
public Ibao GetByRowId(string rowId, string fldList) { var row = this.GetRowByRowId(rowId, fldList); Ibao ibao = null; if (row != null) { ibao = this.BuildFromRow(row); } return(ibao); }
protected Ibao Fetch(string where, int batchsize, string fldList) { this.FetchWhere(where, batchsize, fldList); var row = this.dataSet.ttblibao.AsEnumerable().SingleOrDefault(); Ibao ibao = null; if (row != null) { ibao = this.BuildFromRow(row); } return(ibao); }
public void Delete(Ibao record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttblibao.NewttblibaoRow(); Ibao.BuildMinimalRow(ref row, record); this.dataSet.ttblibao.AddttblibaoRow((pdsibaoDataSet.ttblibaoRow)row); } row.Delete(); this.SaveChanges(); }
public Ibao Update(Ibao 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.ttblibao.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblibao.Rows[0]) : null); } ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421); return(null); }
public Ibao Insert(Ibao record) { return(this.repository.Insert(record)); }
public void Delete(Ibao record) { this.repository.Delete(record); }
public Ibao Update(Ibao record) { return(this.repository.Update(record)); }
public void UpdateToRow(ref DataRow row, Ibao record) { Ibao.UpdateRowFromIbao(ref row, record); this.ExtraUpdateToRow(ref row, record); }
public void Delete(Ibao record) { this.adapter.Delete(record); }
public Ibao Update(Ibao record) { return(this.adapter.Update(record)); }
public Ibao Insert(Ibao record) { return(this.adapter.Insert(record)); }