Exemple #1
0
        public Shfmst BuildFromRow(DataRow row)
        {
            var returnRecord = Shfmst.BuildShfmstFromRow(row);

            returnRecord = this.BuildExtraFromRow <Shfmst>(returnRecord, row);
            return(returnRecord);
        }
Exemple #2
0
        public Shfmst Insert(Shfmst record)
        {
            DataRow row = this.dataSet.ttblshfmst.NewttblshfmstRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblshfmst.AddttblshfmstRow((pdsshfmstDataSet.ttblshfmstRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblshfmst.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblshfmst.Rows[0]) : null);
        }
Exemple #3
0
        public Shfmst GetByRowId(string rowId, string fldList)
        {
            var    row    = this.GetRowByRowId(rowId, fldList);
            Shfmst shfmst = null;

            if (row != null)
            {
                shfmst = this.BuildFromRow(row);
            }
            return(shfmst);
        }
Exemple #4
0
        protected Shfmst Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var    row    = this.dataSet.ttblshfmst.AsEnumerable().SingleOrDefault();
            Shfmst shfmst = null;

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

            if (row == null)
            {
                row = this.dataSet.ttblshfmst.NewttblshfmstRow();
                Shfmst.BuildMinimalRow(ref row, record);
                this.dataSet.ttblshfmst.AddttblshfmstRow((pdsshfmstDataSet.ttblshfmstRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Exemple #6
0
        public Shfmst Update(Shfmst 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.ttblshfmst.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblshfmst.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Exemple #7
0
 public void Delete(Shfmst record)
 {
     this.adapter.Delete(record);
 }
Exemple #8
0
 public Shfmst Update(Shfmst record)
 {
     return(this.adapter.Update(record));
 }
Exemple #9
0
 public Shfmst Insert(Shfmst record)
 {
     return(this.adapter.Insert(record));
 }
Exemple #10
0
 public void UpdateToRow(ref DataRow row, Shfmst record)
 {
     Shfmst.UpdateRowFromShfmst(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }
Exemple #11
0
 public Shfmst Update(Shfmst record)
 {
     return(this.repository.Update(record));
 }
Exemple #12
0
 public Shfmst Insert(Shfmst record)
 {
     return(this.repository.Insert(record));
 }
Exemple #13
0
 public void Delete(Shfmst record)
 {
     this.repository.Delete(record);
 }