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

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

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblcmrp.AddttblcmrpRow((pdscmrpDataSet.ttblcmrpRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblcmrp.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblcmrp.Rows[0]) : null);
        }
Пример #3
0
        public Cmrp GetByRowId(string rowId, string fldList)
        {
            var  row  = this.GetRowByRowId(rowId, fldList);
            Cmrp cmrp = null;

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

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

            if (row == null)
            {
                row = this.dataSet.ttblcmrp.NewttblcmrpRow();
                Cmrp.BuildMinimalRow(ref row, record);
                this.dataSet.ttblcmrp.AddttblcmrpRow((pdscmrpDataSet.ttblcmrpRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Пример #6
0
        public Cmrp Update(Cmrp 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.ttblcmrp.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblcmrp.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Пример #7
0
 public void UpdateToRow(ref DataRow row, Cmrp record)
 {
     Cmrp.UpdateRowFromCmrp(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }
Пример #8
0
 public void Delete(Cmrp record)
 {
     this.repository.Delete(record);
 }
Пример #9
0
 public Cmrp Update(Cmrp record)
 {
     return(this.repository.Update(record));
 }
Пример #10
0
 public Cmrp Insert(Cmrp record)
 {
     return(this.repository.Insert(record));
 }
Пример #11
0
 public Cmrp Insert(Cmrp record)
 {
     return(this.adapter.Insert(record));
 }
Пример #12
0
 public void Delete(Cmrp record)
 {
     this.adapter.Delete(record);
 }
Пример #13
0
 public Cmrp Update(Cmrp record)
 {
     return(this.adapter.Update(record));
 }