Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSafetyallowancecriteria(ref DataRow row, Safetyallowancecriteria entity)
 {
     row.SetField("calctype", entity.calctype);
     row.SetField("origsafeallamt", entity.origsafeallamt);
     row.SetField("origsafeallpct", entity.origsafeallpct);
     row.SetField("origsafealldays", entity.origsafealldays);
     row.SetField("latestleadtmavg", entity.latestleadtmavg);
     row.SetField("latestusagerate", entity.latestusagerate);
     row.SetField("safeallowty", entity.safeallowty);
     row.SetField("safeallamt", entity.safeallamt);
     row.SetField("safeallamt2", entity.safeallamt2);
     row.SetField("customparam", entity.customparam);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Safetyallowancecriteria BuildSafetyallowancecriteriaFromRow(DataRow row)
        {
            Safetyallowancecriteria entity = new Safetyallowancecriteria();

            entity.calctype        = row.IsNull("calctype") ? string.Empty : row.Field <string>("calctype");
            entity.origsafeallamt  = row.IsNull("origsafeallamt") ? decimal.Zero : row.Field <decimal>("origsafeallamt");
            entity.origsafeallpct  = row.IsNull("origsafeallpct") ? decimal.Zero : row.Field <decimal>("origsafeallpct");
            entity.origsafealldays = row.IsNull("origsafealldays") ? decimal.Zero : row.Field <decimal>("origsafealldays");
            entity.latestleadtmavg = row.IsNull("latestleadtmavg") ? 0 : row.Field <int>("latestleadtmavg");
            entity.latestusagerate = row.IsNull("latestusagerate") ? decimal.Zero : row.Field <decimal>("latestusagerate");
            entity.safeallowty     = row.IsNull("safeallowty") ? string.Empty : row.Field <string>("safeallowty");
            entity.safeallamt      = row.IsNull("safeallamt") ? decimal.Zero : row.Field <decimal>("safeallamt");
            entity.safeallamt2     = row.IsNull("safeallamt2") ? decimal.Zero : row.Field <decimal>("safeallamt2");
            entity.customparam     = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }