Пример #1
0
        public Icsv BuildFromRow(DataRow row)
        {
            var returnRecord = Icsv.BuildIcsvFromRow(row);

            returnRecord = this.BuildExtraFromRow <Icsv>(returnRecord, row);
            return(returnRecord);
        }
Пример #2
0
        public Icsv Insert(Icsv record)
        {
            DataRow row = this.dataSet.ttblicsv.NewttblicsvRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblicsv.AddttblicsvRow((pdsicsvDataSet.ttblicsvRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblicsv.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblicsv.Rows[0]) : null);
        }
Пример #3
0
        public Icsv GetByRowId(string rowId, string fldList)
        {
            var  row  = this.GetRowByRowId(rowId, fldList);
            Icsv icsv = null;

            if (row != null)
            {
                icsv = this.BuildFromRow(row);
            }
            return(icsv);
        }
Пример #4
0
        protected Icsv Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var  row  = this.dataSet.ttblicsv.AsEnumerable().SingleOrDefault();
            Icsv icsv = null;

            if (row != null)
            {
                icsv = this.BuildFromRow(row);
            }
            return(icsv);
        }
Пример #5
0
        public void Delete(Icsv record)
        {
            var row = this.GetRowByRowId(record.rowID, string.Empty);

            if (row == null)
            {
                row = this.dataSet.ttblicsv.NewttblicsvRow();
                Icsv.BuildMinimalRow(ref row, record);
                this.dataSet.ttblicsv.AddttblicsvRow((pdsicsvDataSet.ttblicsvRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Пример #6
0
        public Icsv Update(Icsv 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.ttblicsv.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblicsv.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Пример #7
0
 public AsicsetupICSVRowSelectResponseAPI ICSVRowSelect(Icsv icsv)
 {
     return(this.repository.ICSVRowSelect(icsv));
 }
Пример #8
0
 public Icsv Insert(Icsv record)
 {
     return(this.adapter.Insert(record));
 }
Пример #9
0
 public void Delete(Icsv record)
 {
     this.adapter.Delete(record);
 }
Пример #10
0
 public Icsv Update(Icsv record)
 {
     return(this.adapter.Update(record));
 }
Пример #11
0
 public AsicsetupICSVRowSelectResponseAPI ICSVRowSelect(Icsv icsv)
 {
     return(this.adapter.ICSVRowSelect(icsv));
 }
Пример #12
0
 public void UpdateToRow(ref DataRow row, Icsv record)
 {
     Icsv.UpdateRowFromIcsv(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }
Пример #13
0
 public void Delete(Icsv record)
 {
     this.repository.Delete(record);
 }
Пример #14
0
 public Icsv Update(Icsv record)
 {
     return(this.repository.Update(record));
 }
Пример #15
0
 public Icsv Insert(Icsv record)
 {
     return(this.repository.Insert(record));
 }