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

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

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblsassp.AddttblsasspRow((pdssasspDataSet.ttblsasspRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblsassp.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblsassp.Rows[0]) : null);
        }
Example #3
0
        public Sassp GetByRowId(string rowId, string fldList)
        {
            var   row   = this.GetRowByRowId(rowId, fldList);
            Sassp sassp = null;

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

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

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