Exemplo n.º 1
0
        public Arbch BuildFromRow(DataRow row)
        {
            var returnRecord = Arbch.BuildArbchFromRow(row);

            returnRecord = this.BuildExtraFromRow <Arbch>(returnRecord, row);
            return(returnRecord);
        }
Exemplo n.º 2
0
        public Arbch Insert(Arbch record)
        {
            DataRow row = this.dataSet.ttblarbch.NewttblarbchRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblarbch.AddttblarbchRow((pdsarbchDataSet.ttblarbchRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblarbch.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblarbch.Rows[0]) : null);
        }
Exemplo n.º 3
0
        public Arbch GetByRowId(string rowId, string fldList)
        {
            var   row   = this.GetRowByRowId(rowId, fldList);
            Arbch arbch = null;

            if (row != null)
            {
                arbch = this.BuildFromRow(row);
            }
            return(arbch);
        }
Exemplo n.º 4
0
        protected Arbch Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var   row   = this.dataSet.ttblarbch.AsEnumerable().SingleOrDefault();
            Arbch arbch = null;

            if (row != null)
            {
                arbch = this.BuildFromRow(row);
            }
            return(arbch);
        }
Exemplo n.º 5
0
        public void Delete(Arbch record)
        {
            var row = this.GetRowByRowId(record.rowID, string.Empty);

            if (row == null)
            {
                row = this.dataSet.ttblarbch.NewttblarbchRow();
                Arbch.BuildMinimalRow(ref row, record);
                this.dataSet.ttblarbch.AddttblarbchRow((pdsarbchDataSet.ttblarbchRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Exemplo n.º 6
0
        public Arbch Update(Arbch 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.ttblarbch.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblarbch.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Exemplo n.º 7
0
 public void UpdateToRow(ref DataRow row, Arbch record)
 {
     Arbch.UpdateRowFromArbch(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }
Exemplo n.º 8
0
 public void Delete(Arbch record)
 {
     this.repository.Delete(record);
 }
Exemplo n.º 9
0
 public Arbch Update(Arbch record)
 {
     return(this.repository.Update(record));
 }
Exemplo n.º 10
0
 public Arbch Insert(Arbch record)
 {
     return(this.repository.Insert(record));
 }
Exemplo n.º 11
0
 public void Delete(Arbch record)
 {
     this.adapter.Delete(record);
 }
Exemplo n.º 12
0
 public Arbch Update(Arbch record)
 {
     return(this.adapter.Update(record));
 }
Exemplo n.º 13
0
 public Arbch Insert(Arbch record)
 {
     return(this.adapter.Insert(record));
 }