Beispiel #1
0
        public Dealgd BuildFromRow(DataRow row)
        {
            var returnRecord = Dealgd.BuildDealgdFromRow(row);

            returnRecord = this.BuildExtraFromRow <Dealgd>(returnRecord, row);
            return(returnRecord);
        }
Beispiel #2
0
        public Dealgd Insert(Dealgd record)
        {
            DataRow row = this.dataSet.ttbldealgd.NewttbldealgdRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttbldealgd.AddttbldealgdRow((pdsdealgdDataSet.ttbldealgdRow)row);
            this.SaveChanges();
            return(this.dataSet.ttbldealgd.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbldealgd.Rows[0]) : null);
        }
Beispiel #3
0
        public Dealgd GetByRowId(string rowId, string fldList)
        {
            var    row    = this.GetRowByRowId(rowId, fldList);
            Dealgd dealgd = null;

            if (row != null)
            {
                dealgd = this.BuildFromRow(row);
            }
            return(dealgd);
        }
Beispiel #4
0
        protected Dealgd Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var    row    = this.dataSet.ttbldealgd.AsEnumerable().SingleOrDefault();
            Dealgd dealgd = null;

            if (row != null)
            {
                dealgd = this.BuildFromRow(row);
            }
            return(dealgd);
        }
Beispiel #5
0
        public void Delete(Dealgd record)
        {
            var row = this.GetRowByRowId(record.rowID, string.Empty);

            if (row == null)
            {
                row = this.dataSet.ttbldealgd.NewttbldealgdRow();
                Dealgd.BuildMinimalRow(ref row, record);
                this.dataSet.ttbldealgd.AddttbldealgdRow((pdsdealgdDataSet.ttbldealgdRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Beispiel #6
0
        public Dealgd Update(Dealgd 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.ttbldealgd.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbldealgd.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Beispiel #7
0
 public void Delete(Dealgd record)
 {
     this.repository.Delete(record);
 }
Beispiel #8
0
 public Dealgd Update(Dealgd record)
 {
     return(this.repository.Update(record));
 }
Beispiel #9
0
 public Dealgd Insert(Dealgd record)
 {
     return(this.repository.Insert(record));
 }
Beispiel #10
0
 public void Delete(Dealgd record)
 {
     this.adapter.Delete(record);
 }
Beispiel #11
0
 public Dealgd Update(Dealgd record)
 {
     return(this.adapter.Update(record));
 }
Beispiel #12
0
 public Dealgd Insert(Dealgd record)
 {
     return(this.adapter.Insert(record));
 }
Beispiel #13
0
 public void UpdateToRow(ref DataRow row, Dealgd record)
 {
     Dealgd.UpdateRowFromDealgd(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }