Example #1
0
        public Apeig BuildFromRow(DataRow row)
        {
            var returnRecord = Apeig.BuildApeigFromRow(row);

            returnRecord = this.BuildExtraFromRow <Apeig>(returnRecord, row);
            return(returnRecord);
        }
Example #2
0
        public Apeig Insert(Apeig record)
        {
            DataRow row = this.dataSet.ttblapeig.NewttblapeigRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblapeig.AddttblapeigRow((pdsapeigDataSet.ttblapeigRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblapeig.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblapeig.Rows[0]) : null);
        }
Example #3
0
        public Apeig GetByRowId(string rowId, string fldList)
        {
            var   row   = this.GetRowByRowId(rowId, fldList);
            Apeig apeig = null;

            if (row != null)
            {
                apeig = this.BuildFromRow(row);
            }
            return(apeig);
        }
Example #4
0
        protected Apeig Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var   row   = this.dataSet.ttblapeig.AsEnumerable().SingleOrDefault();
            Apeig apeig = null;

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

            if (row == null)
            {
                row = this.dataSet.ttblapeig.NewttblapeigRow();
                Apeig.BuildMinimalRow(ref row, record);
                this.dataSet.ttblapeig.AddttblapeigRow((pdsapeigDataSet.ttblapeigRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Example #6
0
        public Apeig Update(Apeig 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.ttblapeig.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblapeig.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Example #7
0
 public void Delete(Apeig record)
 {
     this.adapter.Delete(record);
 }
Example #8
0
 public Apeig Update(Apeig record)
 {
     return(this.adapter.Update(record));
 }
Example #9
0
 public Apeig Insert(Apeig record)
 {
     return(this.adapter.Insert(record));
 }
Example #10
0
 public Apeig Insert(Apeig record)
 {
     return(this.repository.Insert(record));
 }
Example #11
0
 public void Delete(Apeig record)
 {
     this.repository.Delete(record);
 }
Example #12
0
 public Apeig Update(Apeig record)
 {
     return(this.repository.Update(record));
 }
Example #13
0
 public void UpdateToRow(ref DataRow row, Apeig record)
 {
     Apeig.UpdateRowFromApeig(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }