Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeiinvdetpolntally(ref DataRow row, Apeiinvdetpolntally entity)
 {
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("setno", entity.setno);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("bundleid", entity.bundleid);
     row.SetField("compseqno", entity.compseqno);
     row.SetField("cost", entity.cost);
     row.SetField("costeddt", entity.costeddt);
     row.SetField("eachfl", entity.eachfl);
     row.SetField("prod", entity.prod);
     row.SetField("qtycharged", entity.qtycharged);
     row.SetField("qtycost", entity.qtycost);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("updatefl", entity.updatefl);
     row.SetField("whse", entity.whse);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Apeiinvdetpolntally BuildApeiinvdetpolntallyFromRow(DataRow row)
        {
            Apeiinvdetpolntally entity = new Apeiinvdetpolntally();

            entity.jrnlno     = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.setno      = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.pono       = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf      = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.lineno     = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.bundleid   = row.IsNull("bundleid") ? string.Empty : row.Field <string>("bundleid");
            entity.compseqno  = row.IsNull("compseqno") ? 0 : row.Field <int>("compseqno");
            entity.cost       = row.IsNull("cost") ? decimal.Zero : row.Field <decimal>("cost");
            entity.costeddt   = row.Field <DateTime?>("costeddt");
            entity.eachfl     = row.Field <bool>("eachfl");
            entity.prod       = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.qtycharged = row.IsNull("qtycharged") ? decimal.Zero : row.Field <decimal>("qtycharged");
            entity.qtycost    = row.IsNull("qtycost") ? decimal.Zero : row.Field <decimal>("qtycost");
            entity.unitconv   = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.updatefl   = row.Field <bool>("updatefl");
            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }