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

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

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblswel.AddttblswelRow((pdsswelDataSet.ttblswelRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblswel.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblswel.Rows[0]) : null);
        }
Example #3
0
        public Swel GetByRowId(string rowId, string fldList)
        {
            var  row  = this.GetRowByRowId(rowId, fldList);
            Swel swel = null;

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

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

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