コード例 #1
0
        public Pdsra BuildFromRow(DataRow row)
        {
            var returnRecord = Pdsra.BuildPdsraFromRow(row);

            returnRecord = this.BuildExtraFromRow <Pdsra>(returnRecord, row);
            return(returnRecord);
        }
コード例 #2
0
        public Pdsra Insert(Pdsra record)
        {
            DataRow row = this.dataSet.ttblpdsra.NewttblpdsraRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblpdsra.AddttblpdsraRow((pdspdsraDataSet.ttblpdsraRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblpdsra.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpdsra.Rows[0]) : null);
        }
コード例 #3
0
        public Pdsra GetByRowId(string rowId, string fldList)
        {
            var   row   = this.GetRowByRowId(rowId, fldList);
            Pdsra pdsra = null;

            if (row != null)
            {
                pdsra = this.BuildFromRow(row);
            }
            return(pdsra);
        }
コード例 #4
0
        protected Pdsra Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var   row   = this.dataSet.ttblpdsra.AsEnumerable().SingleOrDefault();
            Pdsra pdsra = null;

            if (row != null)
            {
                pdsra = this.BuildFromRow(row);
            }
            return(pdsra);
        }
コード例 #5
0
        private void DeleteUseRowID(Pdsra record)
        {
            var row = this.GetRowByRowId(record.rowID, string.Empty);

            if (row == null)
            {
                row = this.dataSet.ttblpdsra.NewttblpdsraRow();
                Pdsra.BuildMinimalRow(ref row, record);
                this.dataSet.ttblpdsra.AddttblpdsraRow((pdspdsraDataSet.ttblpdsraRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
コード例 #6
0
        public Pdsra Update(Pdsra record)
        {
            var row = this.GetRowByRowpointer(record.rowpointer, string.Empty);

            if (row != null)
            {
                this.UpdateToRow(ref row, record);
                this.ExtraUpdateToRow(ref row, record);
                this.SaveChanges();
                return(this.dataSet.ttblpdsra.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpdsra.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
コード例 #7
0
 public void Delete(Pdsra record)
 {
     this.adapter.Delete(record);
 }
コード例 #8
0
 public Pdsra Update(Pdsra record)
 {
     return(this.adapter.Update(record));
 }
コード例 #9
0
 public Pdsra Insert(Pdsra record)
 {
     return(this.adapter.Insert(record));
 }
コード例 #10
0
 public void UpdateToRow(ref DataRow row, Pdsra record)
 {
     Pdsra.UpdateRowFromPdsra(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }
コード例 #11
0
 public void Delete(Pdsra record)
 {
     this.repository.Delete(record);
 }
コード例 #12
0
 public Pdsra Update(Pdsra record)
 {
     return(this.repository.Update(record));
 }
コード例 #13
0
 public Pdsra Insert(Pdsra record)
 {
     return(this.repository.Insert(record));
 }