Пример #1
0
 public Kpskv Insert(Kpskv record)
 {
    DataRow row = this.dataSet.ttblkpskv.NewttblkpskvRow();
    this.UpdateToRow(ref row, record);
    this.ExtraUpdateToRow(ref row, record);
    this.dataSet.ttblkpskv.AddttblkpskvRow((pdskpskvDataSet.ttblkpskvRow)row);
    this.SaveChanges();
    return this.dataSet.ttblkpskv.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblkpskv.Rows[0]) : null;
 }
Пример #2
0
 public Kpskv GetByRowId(string rowId, string fldList)
 {
    var row = this.GetRowByRowId(rowId, fldList);
    Kpskv kpskv = null;
    if (row != null)
    {
        kpskv = this.BuildFromRow(row);
    }
    return kpskv;
 }
Пример #3
0
 protected Kpskv Fetch(string where, int batchsize, string fldList)
 {
    this.FetchWhere(where, batchsize, fldList);
    var row = this.dataSet.ttblkpskv.AsEnumerable().SingleOrDefault();
    Kpskv kpskv = null;
    if (row != null)
    {
        kpskv = this.BuildFromRow(row);
    }
    return kpskv;
 }
Пример #4
0
 public void Delete(Kpskv record)
 {
    var row = this.GetRowByRowId(record.rowID, string.Empty);         
    if (row == null)
    {
       row = this.dataSet.ttblkpskv.NewttblkpskvRow();
       Kpskv.BuildMinimalRow(ref row, record);
       this.dataSet.ttblkpskv.AddttblkpskvRow((pdskpskvDataSet.ttblkpskvRow)row);
    }
    row.Delete();
    this.SaveChanges();
 }
Пример #5
0
 public Kpskv Update(Kpskv 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.ttblkpskv.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblkpskv.Rows[0]) : null;
    }
    ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
    return null;
 }
Пример #6
0
 public void Delete(Kpskv record)
 {
     this.adapter.Delete(record);
 }
Пример #7
0
 public Kpskv Update(Kpskv record)
 {
     return(this.adapter.Update(record));
 }
Пример #8
0
 public Kpskv Insert(Kpskv record)
 {
     return(this.adapter.Insert(record));
 }
Пример #9
0
 public void UpdateToRow(ref DataRow row, Kpskv record)
 {
    Kpskv.UpdateRowFromKpskv(ref row, record);
    this.ExtraUpdateToRow(ref row, record);
 }
Пример #10
0
 public Kpskv BuildFromRow(DataRow row)
 {
    var returnRecord = Kpskv.BuildKpskvFromRow(row);
    returnRecord = this.BuildExtraFromRow<Kpskv>(returnRecord, row);
    return returnRecord;
 }
Пример #11
0
 public void Delete(Kpskv record)
 {
     this.repository.Delete(record);
 }
Пример #12
0
 public Kpskv Update(Kpskv record)
 {
     return(this.repository.Update(record));
 }
Пример #13
0
 public Kpskv Insert(Kpskv record)
 {
     return(this.repository.Insert(record));
 }