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

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

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblwteral.AddttblwteralRow((pdswteralDataSet.ttblwteralRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblwteral.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblwteral.Rows[0]) : null);
        }
Example #3
0
        public Wteral GetByRowId(string rowId, string fldList)
        {
            var    row    = this.GetRowByRowId(rowId, fldList);
            Wteral wteral = null;

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

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

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