Example #1
0
        public Depmst BuildFromRow(DataRow row)
        {
            var returnRecord = Depmst.BuildDepmstFromRow(row);

            returnRecord = this.BuildExtraFromRow <Depmst>(returnRecord, row);
            return(returnRecord);
        }
Example #2
0
        public Depmst Insert(Depmst record)
        {
            DataRow row = this.dataSet.ttbldepmst.NewttbldepmstRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttbldepmst.AddttbldepmstRow((pdsdepmstDataSet.ttbldepmstRow)row);
            this.SaveChanges();
            return(this.dataSet.ttbldepmst.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbldepmst.Rows[0]) : null);
        }
Example #3
0
        public Depmst GetByRowId(string rowId, string fldList)
        {
            var    row    = this.GetRowByRowId(rowId, fldList);
            Depmst depmst = null;

            if (row != null)
            {
                depmst = this.BuildFromRow(row);
            }
            return(depmst);
        }
Example #4
0
        protected Depmst Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var    row    = this.dataSet.ttbldepmst.AsEnumerable().SingleOrDefault();
            Depmst depmst = null;

            if (row != null)
            {
                depmst = this.BuildFromRow(row);
            }
            return(depmst);
        }
Example #5
0
        public void Delete(Depmst record)
        {
            var row = this.GetRowByRowId(record.rowID, string.Empty);

            if (row == null)
            {
                row = this.dataSet.ttbldepmst.NewttbldepmstRow();
                Depmst.BuildMinimalRow(ref row, record);
                this.dataSet.ttbldepmst.AddttbldepmstRow((pdsdepmstDataSet.ttbldepmstRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Example #6
0
        public Depmst Update(Depmst 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.ttbldepmst.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbldepmst.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Example #7
0
 public void Delete(Depmst record)
 {
     this.adapter.Delete(record);
 }
Example #8
0
 public Depmst Update(Depmst record)
 {
     return(this.adapter.Update(record));
 }
Example #9
0
 public Depmst Insert(Depmst record)
 {
     return(this.adapter.Insert(record));
 }
Example #10
0
 public Depmst Update(Depmst record)
 {
     return(this.repository.Update(record));
 }
Example #11
0
 public Depmst Insert(Depmst record)
 {
     return(this.repository.Insert(record));
 }
Example #12
0
 public void Delete(Depmst record)
 {
     this.repository.Delete(record);
 }
Example #13
0
 public void UpdateToRow(ref DataRow row, Depmst record)
 {
     Depmst.UpdateRowFromDepmst(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }