Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeetotlookupresults(ref DataRow row, Apeetotlookupresults entity)
 {
     row.SetField("curr", entity.curr);
     row.SetField("future", entity.future);
     row.SetField("dispute", entity.dispute);
     row.SetField("currvendor", entity.currvendor);
     row.SetField("futurevendor", entity.futurevendor);
     row.SetField("disputevendor", entity.disputevendor);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Apeetotlookupresults BuildApeetotlookupresultsFromRow(DataRow row)
        {
            Apeetotlookupresults entity = new Apeetotlookupresults();

            entity.curr          = row.IsNull("curr") ? decimal.Zero : row.Field <decimal>("curr");
            entity.future        = row.IsNull("future") ? decimal.Zero : row.Field <decimal>("future");
            entity.dispute       = row.IsNull("dispute") ? decimal.Zero : row.Field <decimal>("dispute");
            entity.currvendor    = row.IsNull("currvendor") ? decimal.Zero : row.Field <decimal>("currvendor");
            entity.futurevendor  = row.IsNull("futurevendor") ? decimal.Zero : row.Field <decimal>("futurevendor");
            entity.disputevendor = row.IsNull("disputevendor") ? decimal.Zero : row.Field <decimal>("disputevendor");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }