public Pdsa BuildFromRow(DataRow row) { var returnRecord = Pdsa.BuildPdsaFromRow(row); returnRecord = this.BuildExtraFromRow <Pdsa>(returnRecord, row); return(returnRecord); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Shared,Gap,Plan,Doing,Study")] Pdsa pdsa) { if (id != pdsa.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(pdsa); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PdsaExists(pdsa.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(pdsa)); }
public Pdsa Insert(Pdsa record) { DataRow row = this.dataSet.ttblpdsa.NewttblpdsaRow(); this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.dataSet.ttblpdsa.AddttblpdsaRow((pdspdsaDataSet.ttblpdsaRow)row); this.SaveChanges(); return(this.dataSet.ttblpdsa.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpdsa.Rows[0]) : null); }
public Pdsa GetByRowId(string rowId, string fldList) { var row = this.GetRowByRowId(rowId, fldList); Pdsa pdsa = null; if (row != null) { pdsa = this.BuildFromRow(row); } return(pdsa); }
public async Task <IActionResult> Create([Bind("Id,Name,Shared,Gap,Plan,Doing,Study")] Pdsa pdsa) { if (ModelState.IsValid) { _context.Add(pdsa); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(pdsa)); }
protected Pdsa Fetch(string where, int batchsize, string fldList) { this.FetchWhere(where, batchsize, fldList); var row = this.dataSet.ttblpdsa.AsEnumerable().SingleOrDefault(); Pdsa pdsa = null; if (row != null) { pdsa = this.BuildFromRow(row); } return(pdsa); }
public void Delete(Pdsa record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttblpdsa.NewttblpdsaRow(); Pdsa.BuildMinimalRow(ref row, record); this.dataSet.ttblpdsa.AddttblpdsaRow((pdspdsaDataSet.ttblpdsaRow)row); } row.Delete(); this.SaveChanges(); }
public Pdsa Update(Pdsa 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.ttblpdsa.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpdsa.Rows[0]) : null); } ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421); return(null); }
public Pdsa Update(Pdsa record) { return(this.repository.Update(record)); }
public Pdsa Insert(Pdsa record) { return(this.repository.Insert(record)); }
public void Delete(Pdsa record) { this.repository.Delete(record); }
public void UpdateToRow(ref DataRow row, Pdsa record) { Pdsa.UpdateRowFromPdsa(ref row, record); this.ExtraUpdateToRow(ref row, record); }
public void Delete(Pdsa record) { this.adapter.Delete(record); }
public Pdsa Update(Pdsa record) { return(this.adapter.Update(record)); }
public Pdsa Insert(Pdsa record) { return(this.adapter.Insert(record)); }