Example #1
0
        public PvWtln BuildFromRow(DataRow row)
        {
            var returnRecord = PvWtln.BuildPvWtlnFromRow(row);

            returnRecord = this.BuildExtraFromRow <PvWtln>(returnRecord, row);
            return(returnRecord);
        }
Example #2
0
        public PvWtln Insert(PvWtln record)
        {
            DataRow row = this.dataSet.ttblpv_wtln.Newttblpv_wtlnRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblpv_wtln.Addttblpv_wtlnRow((pdspv_wtlnDataSet.ttblpv_wtlnRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblpv_wtln.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpv_wtln.Rows[0]) : null);
        }
Example #3
0
        public PvWtln GetByRowId(string rowId, string fldList)
        {
            var    row    = this.GetRowByRowId(rowId, fldList);
            PvWtln pvWtln = null;

            if (row != null)
            {
                pvWtln = this.BuildFromRow(row);
            }
            return(pvWtln);
        }
Example #4
0
        protected PvWtln Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var    row    = this.dataSet.ttblpv_wtln.AsEnumerable().SingleOrDefault();
            PvWtln pvWtln = null;

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

            if (row == null)
            {
                row = this.dataSet.ttblpv_wtln.Newttblpv_wtlnRow();
                PvWtln.BuildMinimalRow(ref row, record);
                this.dataSet.ttblpv_wtln.Addttblpv_wtlnRow((pdspv_wtlnDataSet.ttblpv_wtlnRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Example #6
0
        public PvWtln Update(PvWtln 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.ttblpv_wtln.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpv_wtln.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Example #7
0
 public void UpdateToRow(ref DataRow row, PvWtln record)
 {
     PvWtln.UpdateRowFromPvWtln(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }
Example #8
0
 public void Delete(PvWtln record)
 {
     this.adapter.Delete(record);
 }
Example #9
0
 public PvWtln Update(PvWtln record)
 {
     return(this.adapter.Update(record));
 }
Example #10
0
 public PvWtln Insert(PvWtln record)
 {
     return(this.adapter.Insert(record));
 }
Example #11
0
 public PvWtln Update(PvWtln record)
 {
     return(this.repository.Update(record));
 }
Example #12
0
 public PvWtln Insert(PvWtln record)
 {
     return(this.repository.Insert(record));
 }
Example #13
0
 public void Delete(PvWtln record)
 {
     this.repository.Delete(record);
 }