public Swsj BuildFromRow(DataRow row) { var returnRecord = Swsj.BuildSwsjFromRow(row); returnRecord = this.BuildExtraFromRow <Swsj>(returnRecord, row); return(returnRecord); }
public Swsj Insert(Swsj record) { DataRow row = this.dataSet.ttblswsj.NewttblswsjRow(); this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.dataSet.ttblswsj.AddttblswsjRow((pdsswsjDataSet.ttblswsjRow)row); this.SaveChanges(); return(this.dataSet.ttblswsj.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblswsj.Rows[0]) : null); }
public Swsj GetByRowId(string rowId, string fldList) { var row = this.GetRowByRowId(rowId, fldList); Swsj swsj = null; if (row != null) { swsj = this.BuildFromRow(row); } return(swsj); }
protected Swsj Fetch(string where, int batchsize, string fldList) { this.FetchWhere(where, batchsize, fldList); var row = this.dataSet.ttblswsj.AsEnumerable().SingleOrDefault(); Swsj swsj = null; if (row != null) { swsj = this.BuildFromRow(row); } return(swsj); }
public void Delete(Swsj record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttblswsj.NewttblswsjRow(); Swsj.BuildMinimalRow(ref row, record); this.dataSet.ttblswsj.AddttblswsjRow((pdsswsjDataSet.ttblswsjRow)row); } row.Delete(); this.SaveChanges(); }
public Swsj Update(Swsj 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.ttblswsj.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblswsj.Rows[0]) : null); } ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421); return(null); }
public void Delete(Swsj record) { this.adapter.Delete(record); }
public Swsj Update(Swsj record) { return(this.adapter.Update(record)); }
public Swsj Insert(Swsj record) { return(this.adapter.Insert(record)); }
public Swsj Insert(Swsj record) { return(this.repository.Insert(record)); }
public void Delete(Swsj record) { this.repository.Delete(record); }
public Swsj Update(Swsj record) { return(this.repository.Update(record)); }
public void UpdateToRow(ref DataRow row, Swsj record) { Swsj.UpdateRowFromSwsj(ref row, record); this.ExtraUpdateToRow(ref row, record); }