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

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

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblbpsc.AddttblbpscRow((pdsbpscDataSet.ttblbpscRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblbpsc.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblbpsc.Rows[0]) : null);
        }
Example #3
0
        public Bpsc GetByRowId(string rowId, string fldList)
        {
            var  row  = this.GetRowByRowId(rowId, fldList);
            Bpsc bpsc = null;

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

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

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