Beispiel #1
0
        public Palletmst BuildFromRow(DataRow row)
        {
            var returnRecord = Palletmst.BuildPalletmstFromRow(row);

            returnRecord = this.BuildExtraFromRow <Palletmst>(returnRecord, row);
            return(returnRecord);
        }
Beispiel #2
0
        public Palletmst Insert(Palletmst record)
        {
            DataRow row = this.dataSet.ttblpalletmst.NewttblpalletmstRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblpalletmst.AddttblpalletmstRow((pdspalletmstDataSet.ttblpalletmstRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblpalletmst.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpalletmst.Rows[0]) : null);
        }
Beispiel #3
0
        public Palletmst GetByRowId(string rowId, string fldList)
        {
            var       row       = this.GetRowByRowId(rowId, fldList);
            Palletmst palletmst = null;

            if (row != null)
            {
                palletmst = this.BuildFromRow(row);
            }
            return(palletmst);
        }
Beispiel #4
0
        protected Palletmst Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var       row       = this.dataSet.ttblpalletmst.AsEnumerable().SingleOrDefault();
            Palletmst palletmst = null;

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

            if (row == null)
            {
                row = this.dataSet.ttblpalletmst.NewttblpalletmstRow();
                Palletmst.BuildMinimalRow(ref row, record);
                this.dataSet.ttblpalletmst.AddttblpalletmstRow((pdspalletmstDataSet.ttblpalletmstRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Beispiel #6
0
        public Palletmst Update(Palletmst 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.ttblpalletmst.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblpalletmst.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Beispiel #7
0
 public void Delete(Palletmst record)
 {
     this.repository.Delete(record);
 }
Beispiel #8
0
 public Palletmst Update(Palletmst record)
 {
     return(this.repository.Update(record));
 }
Beispiel #9
0
 public Palletmst Insert(Palletmst record)
 {
     return(this.repository.Insert(record));
 }
Beispiel #10
0
 public Palletmst Update(Palletmst record)
 {
     return(this.adapter.Update(record));
 }
Beispiel #11
0
 public Palletmst Insert(Palletmst record)
 {
     return(this.adapter.Insert(record));
 }
Beispiel #12
0
 public void Delete(Palletmst record)
 {
     this.adapter.Delete(record);
 }
Beispiel #13
0
 public void UpdateToRow(ref DataRow row, Palletmst record)
 {
     Palletmst.UpdateRowFromPalletmst(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }