Пример #1
0
        public Kpet BuildFromRow(DataRow row)
        {
            var returnRecord = Kpet.BuildKpetFromRow(row);

            returnRecord = this.BuildExtraFromRow <Kpet>(returnRecord, row);
            return(returnRecord);
        }
Пример #2
0
        public Kpet Insert(Kpet record)
        {
            DataRow row = this.dataSet.ttblkpet.NewttblkpetRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblkpet.AddttblkpetRow((pdskpetDataSet.ttblkpetRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblkpet.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblkpet.Rows[0]) : null);
        }
Пример #3
0
        public Kpet GetByRowId(string rowId, bool fillMode, string fldList)
        {
            var  row  = this.GetRowByRowId(rowId, fillMode, fldList);
            Kpet kpet = null;

            if (row != null)
            {
                kpet = this.BuildFromRow(row);
            }
            return(kpet);
        }
Пример #4
0
        protected Kpet Fetch(string where, bool fillMode, int batchsize, string fldList)
        {
            this.FetchWhere(where, fillMode, batchsize, fldList);
            var  row  = this.dataSet.ttblkpet.AsEnumerable().SingleOrDefault();
            Kpet kpet = null;

            if (row != null)
            {
                kpet = this.BuildFromRow(row);
            }
            return(kpet);
        }
Пример #5
0
        private void DeleteUseRowID(Kpet record)
        {
            var row = this.GetRowByRowId(record.rowID, false, string.Empty);

            if (row == null)
            {
                row = this.dataSet.ttblkpet.NewttblkpetRow();
                Kpet.BuildMinimalRow(ref row, record);
                this.dataSet.ttblkpet.AddttblkpetRow((pdskpetDataSet.ttblkpetRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Пример #6
0
        public Kpet Update(Kpet record)
        {
            var row = this.GetRowByRowpointer(record.rowpointer, false, string.Empty);

            if (row != null)
            {
                this.UpdateToRow(ref row, record);
                this.ExtraUpdateToRow(ref row, record);
                this.SaveChanges();
                return(this.dataSet.ttblkpet.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblkpet.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Пример #7
0
 public void Delete(Kpet record)
 {
     this.repository.Delete(record);
 }
Пример #8
0
 public Kpet Update(Kpet record)
 {
     return(this.repository.Update(record));
 }
Пример #9
0
 public Kpet Insert(Kpet record)
 {
     return(this.repository.Insert(record));
 }
Пример #10
0
 public void UpdateToRow(ref DataRow row, Kpet record)
 {
     Kpet.UpdateRowFromKpet(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }
Пример #11
0
 public void Delete(Kpet record)
 {
     this.adapter.Delete(record);
 }
Пример #12
0
 public Kpet Update(Kpet record)
 {
     return(this.adapter.Update(record));
 }
Пример #13
0
 public Kpet Insert(Kpet record)
 {
     return(this.adapter.Insert(record));
 }