Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsrdetailranks(ref DataRow row, Icsrdetailranks entity)
 {
     row.SetField("ranklevel", entity.ranklevel);
     row.SetField("rankpct", entity.rankpct);
     row.SetField("rankpctrec", entity.rankpctrec);
     row.SetField("rankpctlev", entity.rankpctlev);
     row.SetField("minhits", entity.minhits);
     row.SetField("minhitsrec", entity.minhitsrec);
     row.SetField("minhitslev", entity.minhitslev);
     row.SetField("usgmths", entity.usgmths);
     row.SetField("usgmthsrec", entity.usgmthsrec);
     row.SetField("usgmthslev", entity.usgmthslev);
     row.SetField("maxleadtime", entity.maxleadtime);
     row.SetField("maxleadrec", entity.maxleadrec);
     row.SetField("maxleadlev", entity.maxleadlev);
     row.SetField("minleadtime", entity.minleadtime);
     row.SetField("minleadrec", entity.minleadrec);
     row.SetField("minleadlev", entity.minleadlev);
     row.SetField("safewhsemid", entity.safewhsemid);
     row.SetField("whsedaysrec", entity.whsedaysrec);
     row.SetField("whsedayslev", entity.whsedayslev);
     row.SetField("safewhsemin", entity.safewhsemin);
     row.SetField("whsepctrec", entity.whsepctrec);
     row.SetField("whsepctlev", entity.whsepctlev);
     row.SetField("safevendmid", entity.safevendmid);
     row.SetField("venddaysrec", entity.venddaysrec);
     row.SetField("venddayslev", entity.venddayslev);
     row.SetField("safevendmin", entity.safevendmin);
     row.SetField("vendpctrec", entity.vendpctrec);
     row.SetField("vendpctlev", entity.vendpctlev);
     row.SetField("minsafety", entity.minsafety);
     row.SetField("minsaferec", entity.minsaferec);
     row.SetField("minsafelev", entity.minsafelev);
     row.SetField("maxsafety", entity.maxsafety);
     row.SetField("maxsaferec", entity.maxsaferec);
     row.SetField("maxsafelev", entity.maxsafelev);
     row.SetField("safetymonths", entity.safetymonths);
     row.SetField("safemthsrec", entity.safemthsrec);
     row.SetField("safemthslev", entity.safemthslev);
     row.SetField("safetymajority", entity.safetymajority);
     row.SetField("safemajorrec", entity.safemajorrec);
     row.SetField("safemajorlev", entity.safemajorlev);
     row.SetField("safetyrcpts", entity.safetyrcpts);
     row.SetField("rcptsrec", entity.rcptsrec);
     row.SetField("rcptslev", entity.rcptslev);
     row.SetField("safevendmax", entity.safevendmax);
     row.SetField("safevendmaxrec", entity.safevendmaxrec);
     row.SetField("safevendmaxlev", entity.safevendmaxlev);
     row.SetField("safewhsemax", entity.safewhsemax);
     row.SetField("safewhsemaxrec", entity.safewhsemaxrec);
     row.SetField("safewhsemaxlev", entity.safewhsemaxlev);
     row.SetField("minleadtimewhse", entity.minleadtimewhse);
     row.SetField("minleadtimewhserec", entity.minleadtimewhserec);
     row.SetField("minleadtimewhselev", entity.minleadtimewhselev);
     row.SetField("maxleadtimewhse", entity.maxleadtimewhse);
     row.SetField("maxleadtimewhserec", entity.maxleadtimewhserec);
     row.SetField("maxleadtimewhselev", entity.maxleadtimewhselev);
     row.SetField("minsafevendty", entity.minsafevendty);
     row.SetField("maxsafevendty", entity.maxsafevendty);
     row.SetField("midsafevendty", entity.midsafevendty);
     row.SetField("minvendtyrec", entity.minvendtyrec);
     row.SetField("minvendtylev", entity.minvendtylev);
     row.SetField("maxvendtyrec", entity.maxvendtyrec);
     row.SetField("maxvendtylev", entity.maxvendtylev);
     row.SetField("midvendtyrec", entity.midvendtyrec);
     row.SetField("midvendtylev", entity.midvendtylev);
     row.SetField("minsafewhsety", entity.minsafewhsety);
     row.SetField("maxsafewhsety", entity.maxsafewhsety);
     row.SetField("midsafewhsety", entity.midsafewhsety);
     row.SetField("minwhsetyrec", entity.minwhsetyrec);
     row.SetField("minwhsetylev", entity.minwhsetylev);
     row.SetField("maxwhsetyrec", entity.maxwhsetyrec);
     row.SetField("maxwhsetylev", entity.maxwhsetylev);
     row.SetField("midwhsetyrec", entity.midwhsetyrec);
     row.SetField("midwhsetylev", entity.midwhsetylev);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Icsrdetailranks BuildIcsrdetailranksFromRow(DataRow row)
        {
            Icsrdetailranks entity = new Icsrdetailranks();

            entity.ranklevel          = row.IsNull("ranklevel") ? string.Empty : row.Field <string>("ranklevel");
            entity.rankpct            = row.IsNull("rankpct") ? decimal.Zero : row.Field <decimal>("rankpct");
            entity.rankpctrec         = row.IsNull("rankpctrec") ? string.Empty : row.Field <string>("rankpctrec");
            entity.rankpctlev         = row.IsNull("rankpctlev") ? decimal.Zero : row.Field <decimal>("rankpctlev");
            entity.minhits            = row.IsNull("minhits") ? 0 : row.Field <int>("minhits");
            entity.minhitsrec         = row.IsNull("minhitsrec") ? string.Empty : row.Field <string>("minhitsrec");
            entity.minhitslev         = row.IsNull("minhitslev") ? 0 : row.Field <int>("minhitslev");
            entity.usgmths            = row.IsNull("usgmths") ? 0 : row.Field <int>("usgmths");
            entity.usgmthsrec         = row.IsNull("usgmthsrec") ? string.Empty : row.Field <string>("usgmthsrec");
            entity.usgmthslev         = row.IsNull("usgmthslev") ? 0 : row.Field <int>("usgmthslev");
            entity.maxleadtime        = row.IsNull("maxleadtime") ? 0 : row.Field <int>("maxleadtime");
            entity.maxleadrec         = row.IsNull("maxleadrec") ? string.Empty : row.Field <string>("maxleadrec");
            entity.maxleadlev         = row.IsNull("maxleadlev") ? 0 : row.Field <int>("maxleadlev");
            entity.minleadtime        = row.IsNull("minleadtime") ? 0 : row.Field <int>("minleadtime");
            entity.minleadrec         = row.IsNull("minleadrec") ? string.Empty : row.Field <string>("minleadrec");
            entity.minleadlev         = row.IsNull("minleadlev") ? 0 : row.Field <int>("minleadlev");
            entity.safewhsemid        = row.IsNull("safewhsemid") ? decimal.Zero : row.Field <decimal>("safewhsemid");
            entity.whsedaysrec        = row.IsNull("whsedaysrec") ? string.Empty : row.Field <string>("whsedaysrec");
            entity.whsedayslev        = row.IsNull("whsedayslev") ? decimal.Zero : row.Field <decimal>("whsedayslev");
            entity.safewhsemin        = row.IsNull("safewhsemin") ? decimal.Zero : row.Field <decimal>("safewhsemin");
            entity.whsepctrec         = row.IsNull("whsepctrec") ? string.Empty : row.Field <string>("whsepctrec");
            entity.whsepctlev         = row.IsNull("whsepctlev") ? decimal.Zero : row.Field <decimal>("whsepctlev");
            entity.safevendmid        = row.IsNull("safevendmid") ? decimal.Zero : row.Field <decimal>("safevendmid");
            entity.venddaysrec        = row.IsNull("venddaysrec") ? string.Empty : row.Field <string>("venddaysrec");
            entity.venddayslev        = row.IsNull("venddayslev") ? decimal.Zero : row.Field <decimal>("venddayslev");
            entity.safevendmin        = row.IsNull("safevendmin") ? decimal.Zero : row.Field <decimal>("safevendmin");
            entity.vendpctrec         = row.IsNull("vendpctrec") ? string.Empty : row.Field <string>("vendpctrec");
            entity.vendpctlev         = row.IsNull("vendpctlev") ? decimal.Zero : row.Field <decimal>("vendpctlev");
            entity.minsafety          = row.IsNull("minsafety") ? decimal.Zero : row.Field <decimal>("minsafety");
            entity.minsaferec         = row.IsNull("minsaferec") ? string.Empty : row.Field <string>("minsaferec");
            entity.minsafelev         = row.IsNull("minsafelev") ? decimal.Zero : row.Field <decimal>("minsafelev");
            entity.maxsafety          = row.IsNull("maxsafety") ? decimal.Zero : row.Field <decimal>("maxsafety");
            entity.maxsaferec         = row.IsNull("maxsaferec") ? string.Empty : row.Field <string>("maxsaferec");
            entity.maxsafelev         = row.IsNull("maxsafelev") ? decimal.Zero : row.Field <decimal>("maxsafelev");
            entity.safetymonths       = row.IsNull("safetymonths") ? 0 : row.Field <int>("safetymonths");
            entity.safemthsrec        = row.IsNull("safemthsrec") ? string.Empty : row.Field <string>("safemthsrec");
            entity.safemthslev        = row.IsNull("safemthslev") ? 0 : row.Field <int>("safemthslev");
            entity.safetymajority     = row.IsNull("safetymajority") ? 0 : row.Field <int>("safetymajority");
            entity.safemajorrec       = row.IsNull("safemajorrec") ? string.Empty : row.Field <string>("safemajorrec");
            entity.safemajorlev       = row.IsNull("safemajorlev") ? 0 : row.Field <int>("safemajorlev");
            entity.safetyrcpts        = row.IsNull("safetyrcpts") ? 0 : row.Field <int>("safetyrcpts");
            entity.rcptsrec           = row.IsNull("rcptsrec") ? string.Empty : row.Field <string>("rcptsrec");
            entity.rcptslev           = row.IsNull("rcptslev") ? 0 : row.Field <int>("rcptslev");
            entity.safevendmax        = row.IsNull("safevendmax") ? decimal.Zero : row.Field <decimal>("safevendmax");
            entity.safevendmaxrec     = row.IsNull("safevendmaxrec") ? string.Empty : row.Field <string>("safevendmaxrec");
            entity.safevendmaxlev     = row.IsNull("safevendmaxlev") ? decimal.Zero : row.Field <decimal>("safevendmaxlev");
            entity.safewhsemax        = row.IsNull("safewhsemax") ? 0 : row.Field <int>("safewhsemax");
            entity.safewhsemaxrec     = row.IsNull("safewhsemaxrec") ? string.Empty : row.Field <string>("safewhsemaxrec");
            entity.safewhsemaxlev     = row.IsNull("safewhsemaxlev") ? 0 : row.Field <int>("safewhsemaxlev");
            entity.minleadtimewhse    = row.IsNull("minleadtimewhse") ? 0 : row.Field <int>("minleadtimewhse");
            entity.minleadtimewhserec = row.IsNull("minleadtimewhserec") ? string.Empty : row.Field <string>("minleadtimewhserec");
            entity.minleadtimewhselev = row.IsNull("minleadtimewhselev") ? 0 : row.Field <int>("minleadtimewhselev");
            entity.maxleadtimewhse    = row.IsNull("maxleadtimewhse") ? 0 : row.Field <int>("maxleadtimewhse");
            entity.maxleadtimewhserec = row.IsNull("maxleadtimewhserec") ? string.Empty : row.Field <string>("maxleadtimewhserec");
            entity.maxleadtimewhselev = row.IsNull("maxleadtimewhselev") ? 0 : row.Field <int>("maxleadtimewhselev");
            entity.minsafevendty      = row.IsNull("minsafevendty") ? string.Empty : row.Field <string>("minsafevendty");
            entity.maxsafevendty      = row.IsNull("maxsafevendty") ? string.Empty : row.Field <string>("maxsafevendty");
            entity.midsafevendty      = row.IsNull("midsafevendty") ? string.Empty : row.Field <string>("midsafevendty");
            entity.minvendtyrec       = row.IsNull("minvendtyrec") ? string.Empty : row.Field <string>("minvendtyrec");
            entity.minvendtylev       = row.IsNull("minvendtylev") ? string.Empty : row.Field <string>("minvendtylev");
            entity.maxvendtyrec       = row.IsNull("maxvendtyrec") ? string.Empty : row.Field <string>("maxvendtyrec");
            entity.maxvendtylev       = row.IsNull("maxvendtylev") ? string.Empty : row.Field <string>("maxvendtylev");
            entity.midvendtyrec       = row.IsNull("midvendtyrec") ? string.Empty : row.Field <string>("midvendtyrec");
            entity.midvendtylev       = row.IsNull("midvendtylev") ? string.Empty : row.Field <string>("midvendtylev");
            entity.minsafewhsety      = row.IsNull("minsafewhsety") ? string.Empty : row.Field <string>("minsafewhsety");
            entity.maxsafewhsety      = row.IsNull("maxsafewhsety") ? string.Empty : row.Field <string>("maxsafewhsety");
            entity.midsafewhsety      = row.IsNull("midsafewhsety") ? string.Empty : row.Field <string>("midsafewhsety");
            entity.minwhsetyrec       = row.IsNull("minwhsetyrec") ? string.Empty : row.Field <string>("minwhsetyrec");
            entity.minwhsetylev       = row.IsNull("minwhsetylev") ? string.Empty : row.Field <string>("minwhsetylev");
            entity.maxwhsetyrec       = row.IsNull("maxwhsetyrec") ? string.Empty : row.Field <string>("maxwhsetyrec");
            entity.maxwhsetylev       = row.IsNull("maxwhsetylev") ? string.Empty : row.Field <string>("maxwhsetylev");
            entity.midwhsetyrec       = row.IsNull("midwhsetyrec") ? string.Empty : row.Field <string>("midwhsetyrec");
            entity.midwhsetylev       = row.IsNull("midwhsetylev") ? string.Empty : row.Field <string>("midwhsetylev");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }