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

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

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblpv_swln.Addttblpv_swlnRow((pdspv_swlnDataSet.ttblpv_swlnRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblpv_swln.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpv_swln.Rows[0]) : null);
        }
Example #3
0
        public PvSwln GetByRowId(string rowId, string fldList)
        {
            var    row    = this.GetRowByRowId(rowId, fldList);
            PvSwln pvSwln = null;

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

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

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