Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcipfetchtrendresults(ref DataRow row, Icipfetchtrendresults entity)
 {
     row.SetField("cmessage", entity.cmessage);
     row.SetField("calcusage", entity.calcusage);
     row.SetField("seastrendmax", entity.seastrendmax);
     row.SetField("seastrendlyu", entity.seastrendlyu);
     row.SetField("calcusagelyr", entity.calcusagelyr);
     row.SetField("seastrendmin", entity.seastrendmin);
     row.SetField("seastrendtyu", entity.seastrendtyu);
     row.SetField("calcusagetyr", entity.calcusagetyr);
     row.SetField("recordlevel", entity.recordlevel);
     row.SetField("seastrendexpdt", entity.seastrendexpdt);
     row.SetField("calctrendpct", entity.calctrendpct);
     row.SetField("usedtrendpct", entity.usedtrendpct);
     row.SetField("usagerate", entity.usagerate);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Icipfetchtrendresults BuildIcipfetchtrendresultsFromRow(DataRow row)
        {
            Icipfetchtrendresults entity = new Icipfetchtrendresults();

            entity.cmessage       = row.IsNull("cmessage") ? string.Empty : row.Field <string>("cmessage");
            entity.calcusage      = row.IsNull("calcusage") ? decimal.Zero : row.Field <decimal>("calcusage");
            entity.seastrendmax   = row.IsNull("seastrendmax") ? decimal.Zero : row.Field <decimal>("seastrendmax");
            entity.seastrendlyu   = row.IsNull("seastrendlyu") ? 0 : row.Field <int>("seastrendlyu");
            entity.calcusagelyr   = row.IsNull("calcusagelyr") ? decimal.Zero : row.Field <decimal>("calcusagelyr");
            entity.seastrendmin   = row.IsNull("seastrendmin") ? decimal.Zero : row.Field <decimal>("seastrendmin");
            entity.seastrendtyu   = row.IsNull("seastrendtyu") ? 0 : row.Field <int>("seastrendtyu");
            entity.calcusagetyr   = row.IsNull("calcusagetyr") ? decimal.Zero : row.Field <decimal>("calcusagetyr");
            entity.recordlevel    = row.IsNull("recordlevel") ? string.Empty : row.Field <string>("recordlevel");
            entity.seastrendexpdt = row.Field <DateTime?>("seastrendexpdt");
            entity.calctrendpct   = row.IsNull("calctrendpct") ? decimal.Zero : row.Field <decimal>("calctrendpct");
            entity.usedtrendpct   = row.IsNull("usedtrendpct") ? decimal.Zero : row.Field <decimal>("usedtrendpct");
            entity.usagerate      = row.IsNull("usagerate") ? decimal.Zero : row.Field <decimal>("usagerate");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }