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