예제 #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));
 }