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

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

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblcmsl.AddttblcmslRow((pdscmslDataSet.ttblcmslRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblcmsl.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblcmsl.Rows[0]) : null);
        }
Пример #3
0
        public Cmsl GetByRowId(string rowId, string fldList)
        {
            var  row  = this.GetRowByRowId(rowId, fldList);
            Cmsl cmsl = null;

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

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

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