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

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

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblapemm.AddttblapemmRow((pdsapemmDataSet.ttblapemmRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblapemm.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblapemm.Rows[0]) : null);
        }
Beispiel #3
0
        public Apemm GetByRowId(string rowId, string fldList)
        {
            var   row   = this.GetRowByRowId(rowId, fldList);
            Apemm apemm = null;

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

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

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