Esempio n. 1
0
        public Poelc BuildFromRow(DataRow row)
        {
            var returnRecord = Poelc.BuildPoelcFromRow(row);

            returnRecord = this.BuildExtraFromRow <Poelc>(returnRecord, row);
            return(returnRecord);
        }
Esempio n. 2
0
        public Poelc Insert(Poelc record)
        {
            DataRow row = this.dataSet.ttblpoelc.NewttblpoelcRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblpoelc.AddttblpoelcRow((pdspoelcDataSet.ttblpoelcRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblpoelc.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpoelc.Rows[0]) : null);
        }
Esempio n. 3
0
        public Poelc GetByRowId(string rowId, string fldList)
        {
            var   row   = this.GetRowByRowId(rowId, fldList);
            Poelc poelc = null;

            if (row != null)
            {
                poelc = this.BuildFromRow(row);
            }
            return(poelc);
        }
Esempio n. 4
0
        protected Poelc Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var   row   = this.dataSet.ttblpoelc.AsEnumerable().SingleOrDefault();
            Poelc poelc = null;

            if (row != null)
            {
                poelc = this.BuildFromRow(row);
            }
            return(poelc);
        }
Esempio n. 5
0
        public void Delete(Poelc record)
        {
            var row = this.GetRowByRowId(record.rowID, string.Empty);

            if (row == null)
            {
                row = this.dataSet.ttblpoelc.NewttblpoelcRow();
                Poelc.BuildMinimalRow(ref row, record);
                this.dataSet.ttblpoelc.AddttblpoelcRow((pdspoelcDataSet.ttblpoelcRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Esempio n. 6
0
        public Poelc Update(Poelc 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.ttblpoelc.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpoelc.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Esempio n. 7
0
 public void Delete(Poelc record)
 {
     this.adapter.Delete(record);
 }
Esempio n. 8
0
 public Poelc Update(Poelc record)
 {
     return(this.adapter.Update(record));
 }
Esempio n. 9
0
 public Poelc Insert(Poelc record)
 {
     return(this.adapter.Insert(record));
 }
Esempio n. 10
0
 public void UpdateToRow(ref DataRow row, Poelc record)
 {
     Poelc.UpdateRowFromPoelc(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }
Esempio n. 11
0
 public void Delete(Poelc record)
 {
     this.repository.Delete(record);
 }
Esempio n. 12
0
 public Poelc Update(Poelc record)
 {
     return(this.repository.Update(record));
 }
Esempio n. 13
0
 public Poelc Insert(Poelc record)
 {
     return(this.repository.Insert(record));
 }