示例#1
0
 public Barcodemst Insert(Barcodemst record)
 {
    DataRow row = this.dataSet.ttblbarcodemst.NewttblbarcodemstRow();
    this.UpdateToRow(ref row, record);
    this.ExtraUpdateToRow(ref row, record);
    this.dataSet.ttblbarcodemst.AddttblbarcodemstRow((pdsbarcodemstDataSet.ttblbarcodemstRow)row);
    this.SaveChanges();
    return this.dataSet.ttblbarcodemst.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblbarcodemst.Rows[0]) : null;
 }
示例#2
0
 public Barcodemst GetByRowId(string rowId, string fldList)
 {
    var row = this.GetRowByRowId(rowId, fldList);
    Barcodemst barcodemst = null;
    if (row != null)
    {
        barcodemst = this.BuildFromRow(row);
    }
    return barcodemst;
 }
示例#3
0
 protected Barcodemst Fetch(string where, int batchsize, string fldList)
 {
    this.FetchWhere(where, batchsize, fldList);
    var row = this.dataSet.ttblbarcodemst.AsEnumerable().SingleOrDefault();
    Barcodemst barcodemst = null;
    if (row != null)
    {
        barcodemst = this.BuildFromRow(row);
    }
    return barcodemst;
 }
示例#4
0
 public void Delete(Barcodemst record)
 {
    var row = this.GetRowByRowId(record.rowID, string.Empty);         
    if (row == null)
    {
       row = this.dataSet.ttblbarcodemst.NewttblbarcodemstRow();
       Barcodemst.BuildMinimalRow(ref row, record);
       this.dataSet.ttblbarcodemst.AddttblbarcodemstRow((pdsbarcodemstDataSet.ttblbarcodemstRow)row);
    }
    row.Delete();
    this.SaveChanges();
 }
示例#5
0
 public Barcodemst Update(Barcodemst 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.ttblbarcodemst.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblbarcodemst.Rows[0]) : null;
    }
    ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
    return null;
 }
示例#6
0
 public void Delete(Barcodemst record)
 {
     this.adapter.Delete(record);
 }
示例#7
0
 public Barcodemst Update(Barcodemst record)
 {
     return(this.adapter.Update(record));
 }
示例#8
0
 public Barcodemst Insert(Barcodemst record)
 {
     return(this.adapter.Insert(record));
 }
示例#9
0
 public void Delete(Barcodemst record)
 {
     this.repository.Delete(record);
 }
示例#10
0
 public Barcodemst Update(Barcodemst record)
 {
     return(this.repository.Update(record));
 }
示例#11
0
 public Barcodemst Insert(Barcodemst record)
 {
     return(this.repository.Insert(record));
 }
示例#12
0
 public void UpdateToRow(ref DataRow row, Barcodemst record)
 {
    Barcodemst.UpdateRowFromBarcodemst(ref row, record);
    this.ExtraUpdateToRow(ref row, record);
 }
示例#13
0
 public Barcodemst BuildFromRow(DataRow row)
 {
    var returnRecord = Barcodemst.BuildBarcodemstFromRow(row);
    returnRecord = this.BuildExtraFromRow<Barcodemst>(returnRecord, row);
    return returnRecord;
 }