public Wmet BuildFromRow(DataRow row) { var returnRecord = Wmet.BuildWmetFromRow(row); returnRecord = this.BuildExtraFromRow <Wmet>(returnRecord, row); return(returnRecord); }
public Wmet Insert(Wmet record) { DataRow row = this.dataSet.ttblwmet.NewttblwmetRow(); this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.dataSet.ttblwmet.AddttblwmetRow((pdswmetDataSet.ttblwmetRow)row); this.SaveChanges(); return(this.dataSet.ttblwmet.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblwmet.Rows[0]) : null); }
public Wmet GetByRowId(string rowId, string fldList) { var row = this.GetRowByRowId(rowId, fldList); Wmet wmet = null; if (row != null) { wmet = this.BuildFromRow(row); } return(wmet); }
protected Wmet Fetch(string where, int batchsize, string fldList) { this.FetchWhere(where, batchsize, fldList); var row = this.dataSet.ttblwmet.AsEnumerable().SingleOrDefault(); Wmet wmet = null; if (row != null) { wmet = this.BuildFromRow(row); } return(wmet); }
public void Delete(Wmet record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttblwmet.NewttblwmetRow(); Wmet.BuildMinimalRow(ref row, record); this.dataSet.ttblwmet.AddttblwmetRow((pdswmetDataSet.ttblwmetRow)row); } row.Delete(); this.SaveChanges(); }
public Wmet Update(Wmet 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.ttblwmet.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblwmet.Rows[0]) : null); } ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421); return(null); }
public void UpdateToRow(ref DataRow row, Wmet record) { Wmet.UpdateRowFromWmet(ref row, record); this.ExtraUpdateToRow(ref row, record); }
public void Delete(Wmet record) { this.repository.Delete(record); }
public Wmet Update(Wmet record) { return(this.repository.Update(record)); }
public Wmet Insert(Wmet record) { return(this.repository.Insert(record)); }
public void Delete(Wmet record) { this.adapter.Delete(record); }
public Wmet Update(Wmet record) { return(this.adapter.Update(record)); }
public Wmet Insert(Wmet record) { return(this.adapter.Insert(record)); }