public Pmes BuildFromRow(DataRow row) { var returnRecord = Pmes.BuildPmesFromRow(row); returnRecord = this.BuildExtraFromRow <Pmes>(returnRecord, row); return(returnRecord); }
public Pmes Insert(Pmes record) { DataRow row = this.dataSet.ttblpmes.NewttblpmesRow(); this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.dataSet.ttblpmes.AddttblpmesRow((pdspmesDataSet.ttblpmesRow)row); this.SaveChanges(); return(this.dataSet.ttblpmes.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpmes.Rows[0]) : null); }
public Pmes GetByRowId(string rowId, string fldList) { var row = this.GetRowByRowId(rowId, fldList); Pmes pmes = null; if (row != null) { pmes = this.BuildFromRow(row); } return(pmes); }
protected Pmes Fetch(string where, int batchsize, string fldList) { this.FetchWhere(where, batchsize, fldList); var row = this.dataSet.ttblpmes.AsEnumerable().SingleOrDefault(); Pmes pmes = null; if (row != null) { pmes = this.BuildFromRow(row); } return(pmes); }
public void Save(Pme.Models.Pme pme, List <PmeDetail> pmeDetails) { var savedPme = Pmes.Add(pme); savedPme.PmeDetails = new List <PmeDetail>(); foreach (var item in pmeDetails) { pme.PmeDetails.Add(item); } SaveChanges(); }
public void Delete(Pmes record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttblpmes.NewttblpmesRow(); Pmes.BuildMinimalRow(ref row, record); this.dataSet.ttblpmes.AddttblpmesRow((pdspmesDataSet.ttblpmesRow)row); } row.Delete(); this.SaveChanges(); }
public Pmes Update(Pmes 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.ttblpmes.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpmes.Rows[0]) : null); } ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421); return(null); }
public void Delete(Pmes record) { this.repository.Delete(record); }
public Pmes Update(Pmes record) { return(this.repository.Update(record)); }
public Pmes Insert(Pmes record) { return(this.repository.Insert(record)); }
public void Delete(Pmes record) { this.adapter.Delete(record); }
public Pmes Update(Pmes record) { return(this.adapter.Update(record)); }
public Pmes Insert(Pmes record) { return(this.adapter.Insert(record)); }
public void UpdateToRow(ref DataRow row, Pmes record) { Pmes.UpdateRowFromPmes(ref row, record); this.ExtraUpdateToRow(ref row, record); }