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

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

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblwh_zone.Addttblwh_zoneRow((pdswh_zoneDataSet.ttblwh_zoneRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblwh_zone.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblwh_zone.Rows[0]) : null);
        }
Example #3
0
        public WhZone GetByRowId(string rowId, string fldList)
        {
            var    row    = this.GetRowByRowId(rowId, fldList);
            WhZone whZone = null;

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

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

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