예제 #1
0
        public DrpRules BuildFromRow(DataRow row)
        {
            var returnRecord = DrpRules.BuildDrpRulesFromRow(row);

            returnRecord = this.BuildExtraFromRow <DrpRules>(returnRecord, row);
            return(returnRecord);
        }
예제 #2
0
        public DrpRules Insert(DrpRules record)
        {
            DataRow row = this.dataSet.ttbldrp_rules.Newttbldrp_rulesRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttbldrp_rules.Addttbldrp_rulesRow((pdsdrp_rulesDataSet.ttbldrp_rulesRow)row);
            this.SaveChanges();
            return(this.dataSet.ttbldrp_rules.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbldrp_rules.Rows[0]) : null);
        }
예제 #3
0
        public DrpRules GetByRowId(string rowId, string fldList)
        {
            var      row      = this.GetRowByRowId(rowId, fldList);
            DrpRules drpRules = null;

            if (row != null)
            {
                drpRules = this.BuildFromRow(row);
            }
            return(drpRules);
        }
예제 #4
0
        protected DrpRules Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var      row      = this.dataSet.ttbldrp_rules.AsEnumerable().SingleOrDefault();
            DrpRules drpRules = null;

            if (row != null)
            {
                drpRules = this.BuildFromRow(row);
            }
            return(drpRules);
        }
예제 #5
0
        public void Delete(DrpRules record)
        {
            var row = this.GetRowByRowId(record.rowID, string.Empty);

            if (row == null)
            {
                row = this.dataSet.ttbldrp_rules.Newttbldrp_rulesRow();
                DrpRules.BuildMinimalRow(ref row, record);
                this.dataSet.ttbldrp_rules.Addttbldrp_rulesRow((pdsdrp_rulesDataSet.ttbldrp_rulesRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
예제 #6
0
        public DrpRules Update(DrpRules 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.ttbldrp_rules.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbldrp_rules.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
예제 #7
0
 public DrpRules ValidateAutoDropRule(DrpRules drp_rules)
 {
     return(this.repository.ValidateAutoDropRule(drp_rules));
 }
예제 #8
0
 public DrpRules ValidateAutoDropRule(DrpRules drp_rules)
 {
     return(this.adapter.ValidateAutoDropRule(drp_rules));
 }
예제 #9
0
 public DrpRules Insert(DrpRules record)
 {
     return(this.repository.Insert(record));
 }
예제 #10
0
 public void Delete(DrpRules record)
 {
     this.repository.Delete(record);
 }
예제 #11
0
 public DrpRules Update(DrpRules record)
 {
     return(this.repository.Update(record));
 }
예제 #12
0
 public void UpdateToRow(ref DataRow row, DrpRules record)
 {
     DrpRules.UpdateRowFromDrpRules(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }
예제 #13
0
 public void Delete(DrpRules record)
 {
     this.adapter.Delete(record);
 }
예제 #14
0
 public DrpRules Update(DrpRules record)
 {
     return(this.adapter.Update(record));
 }
예제 #15
0
 public DrpRules Insert(DrpRules record)
 {
     return(this.adapter.Insert(record));
 }