Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcamrloadusagerateprodtt(ref DataRow row, Icamrloadusagerateprodtt entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("linept", entity.linept);
     row.SetField("operinit", entity.operinit);
     row.SetField("orderpt", entity.orderpt);
     row.SetField("ordqtyin", entity.ordqtyin);
     row.SetField("ordqtyout", entity.ordqtyout);
     row.SetField("overreasin", entity.overreasin);
     row.SetField("overreasout", entity.overreasout);
     row.SetField("prod", entity.prod);
     row.SetField("reportno", entity.reportno);
     row.SetField("safeallamt", entity.safeallamt);
     row.SetField("safeallpct", entity.safeallpct);
     row.SetField("safeallty", entity.safeallty);
     row.SetField("transdt", entity.transdt);
     row.SetField("transproc", entity.transproc);
     row.SetField("transtm", entity.transtm);
     row.SetField("usagectrl", entity.usagectrl);
     row.SetField("usagerate", entity.usagerate);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("usgmths", entity.usgmths);
     row.SetField("whse", entity.whse);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Icamrloadusagerateprodtt BuildIcamrloadusagerateprodttFromRow(DataRow row)
        {
            Icamrloadusagerateprodtt entity = new Icamrloadusagerateprodtt();

            entity.cono        = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.linept      = row.IsNull("linept") ? decimal.Zero : row.Field <decimal>("linept");
            entity.operinit    = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.orderpt     = row.IsNull("orderpt") ? decimal.Zero : row.Field <decimal>("orderpt");
            entity.ordqtyin    = row.IsNull("ordqtyin") ? decimal.Zero : row.Field <decimal>("ordqtyin");
            entity.ordqtyout   = row.IsNull("ordqtyout") ? decimal.Zero : row.Field <decimal>("ordqtyout");
            entity.overreasin  = row.IsNull("overreasin") ? string.Empty : row.Field <string>("overreasin");
            entity.overreasout = row.IsNull("overreasout") ? string.Empty : row.Field <string>("overreasout");
            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.reportno    = row.IsNull("reportno") ? 0 : row.Field <int>("reportno");
            entity.safeallamt  = row.IsNull("safeallamt") ? decimal.Zero : row.Field <decimal>("safeallamt");
            entity.safeallpct  = row.IsNull("safeallpct") ? decimal.Zero : row.Field <decimal>("safeallpct");
            entity.safeallty   = row.IsNull("safeallty") ? string.Empty : row.Field <string>("safeallty");
            entity.transdt     = row.Field <DateTime?>("transdt");
            entity.transproc   = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc");
            entity.transtm     = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm");
            entity.usagectrl   = row.IsNull("usagectrl") ? string.Empty : row.Field <string>("usagectrl");
            entity.usagerate   = row.IsNull("usagerate") ? decimal.Zero : row.Field <decimal>("usagerate");
            entity.user1       = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2       = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3       = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4       = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5       = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6       = row.Field <decimal?>("user6");
            entity.user7       = row.Field <decimal?>("user7");
            entity.user8       = row.Field <DateTime?>("user8");
            entity.user9       = row.Field <DateTime?>("user9");
            entity.usgmths     = row.IsNull("usgmths") ? 0 : row.Field <int>("usgmths");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }