예제 #1
0
        public Arbclw BuildFromRow(DataRow row)
        {
            var returnRecord = Arbclw.BuildArbclwFromRow(row);

            returnRecord = this.BuildExtraFromRow <Arbclw>(returnRecord, row);
            return(returnRecord);
        }
예제 #2
0
        public Arbclw Insert(Arbclw record)
        {
            DataRow row = this.dataSet.ttblarbclw.NewttblarbclwRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblarbclw.AddttblarbclwRow((pdsarbclwDataSet.ttblarbclwRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblarbclw.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblarbclw.Rows[0]) : null);
        }
예제 #3
0
        public Arbclw GetByRowId(string rowId, string fldList)
        {
            var    row    = this.GetRowByRowId(rowId, fldList);
            Arbclw arbclw = null;

            if (row != null)
            {
                arbclw = this.BuildFromRow(row);
            }
            return(arbclw);
        }
예제 #4
0
        protected Arbclw Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var    row    = this.dataSet.ttblarbclw.AsEnumerable().SingleOrDefault();
            Arbclw arbclw = null;

            if (row != null)
            {
                arbclw = this.BuildFromRow(row);
            }
            return(arbclw);
        }
예제 #5
0
        public void Delete(Arbclw record)
        {
            var row = this.GetRowByRowId(record.rowID, string.Empty);

            if (row == null)
            {
                row = this.dataSet.ttblarbclw.NewttblarbclwRow();
                Arbclw.BuildMinimalRow(ref row, record);
                this.dataSet.ttblarbclw.AddttblarbclwRow((pdsarbclwDataSet.ttblarbclwRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
예제 #6
0
        public Arbclw Update(Arbclw 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.ttblarbclw.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblarbclw.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
예제 #7
0
 public void Delete(Arbclw record)
 {
     this.adapter.Delete(record);
 }
예제 #8
0
 public Arbclw Update(Arbclw record)
 {
     return(this.adapter.Update(record));
 }
예제 #9
0
 public Arbclw Insert(Arbclw record)
 {
     return(this.adapter.Insert(record));
 }
예제 #10
0
 public void Delete(Arbclw record)
 {
     this.repository.Delete(record);
 }
예제 #11
0
 public Arbclw Update(Arbclw record)
 {
     return(this.repository.Update(record));
 }
예제 #12
0
 public Arbclw Insert(Arbclw record)
 {
     return(this.repository.Insert(record));
 }
예제 #13
0
 public void UpdateToRow(ref DataRow row, Arbclw record)
 {
     Arbclw.UpdateRowFromArbclw(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }