Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromKpewloadresults(ref DataRow row, Kpewloadresults entity)
 {
     row.SetField("seqno", entity.seqno);
     row.SetField("kpetrowid", entity.kpetrowid.ToByteArray());
     row.SetField("wono", entity.wono);
     row.SetField("wosuf", entity.wosuf);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecd2", entity.stagecd2);
     row.SetField("rrarinit", entity.rrarinit);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("orderaltsuf", entity.orderaltsuf);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("ordertype2", entity.ordertype2);
     row.SetField("seqaltno", entity.seqaltno);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("unit", entity.unit);
     row.SetField("statuscd", entity.statuscd);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("prodnotes", entity.prodnotes);
     row.SetField("kitbuild", entity.kitbuild);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("errormessage", entity.errormessage);
     row.SetField("verno", entity.verno);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Kpewloadresults BuildKpewloadresultsFromRow(DataRow row)
        {
            Kpewloadresults entity = new Kpewloadresults();

            entity.seqno        = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.kpetrowid    = row.Field <byte[]>("kpetrowid").ToStringEncoded();
            entity.wono         = row.IsNull("wono") ? 0 : row.Field <int>("wono");
            entity.wosuf        = row.IsNull("wosuf") ? 0 : row.Field <int>("wosuf");
            entity.notesfl      = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.stagecd      = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecd2     = row.IsNull("stagecd2") ? string.Empty : row.Field <string>("stagecd2");
            entity.rrarinit     = row.IsNull("rrarinit") ? string.Empty : row.Field <string>("rrarinit");
            entity.orderaltno   = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno");
            entity.orderaltsuf  = row.IsNull("orderaltsuf") ? 0 : row.Field <int>("orderaltsuf");
            entity.ordertype    = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.ordertype2   = row.IsNull("ordertype2") ? string.Empty : row.Field <string>("ordertype2");
            entity.seqaltno     = row.IsNull("seqaltno") ? 0 : row.Field <int>("seqaltno");
            entity.shipprod     = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.qtyord       = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.unit         = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.statuscd     = row.IsNull("statuscd") ? string.Empty : row.Field <string>("statuscd");
            entity.enterdt      = row.Field <DateTime?>("enterdt");
            entity.prodnotes    = row.IsNull("prodnotes") ? string.Empty : row.Field <string>("prodnotes");
            entity.kitbuild     = row.IsNull("kitbuild") ? string.Empty : row.Field <string>("kitbuild");
            entity.proddesc     = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.errormessage = row.IsNull("errormessage") ? string.Empty : row.Field <string>("errormessage");
            entity.verno        = row.IsNull("verno") ? 0 : row.Field <int>("verno");
            entity.msdsfl       = row.Field <bool>("msdsfl");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }