Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWtiareptlistresults(ref DataRow row, Wtiareptlistresults entity)
 {
     row.SetField("wtno", entity.wtno);
     row.SetField("wtsuf", entity.wtsuf);
     row.SetField("wtnox", entity.wtnox);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdx", entity.stagecdx);
     row.SetField("transtype", entity.transtype);
     row.SetField("orderdt", entity.orderdt);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("duedt", entity.duedt);
     row.SetField("shipfmwhse", entity.shipfmwhse);
     row.SetField("shipfmname", entity.shipfmname);
     row.SetField("shiptowhse", entity.shiptowhse);
     row.SetField("shiptoname", entity.shiptoname);
     row.SetField("nounappr", entity.nounappr);
     row.SetField("rowid-wteh", entity.rowidWteh.ToByteArray());
     row.SetField("userfield", entity.userfield);
     row.SetField("sortdt1", entity.sortdt1);
     row.SetField("sortdt2", entity.sortdt2);
     row.SetField("sortfld", entity.sortfld);
     row.SetField("amounti", entity.amounti);
 }
Ejemplo n.º 2
0
        public static Wtiareptlistresults BuildWtiareptlistresultsFromRow(DataRow row)
        {
            Wtiareptlistresults entity = new Wtiareptlistresults();

            entity.wtno       = row.IsNull("wtno") ? 0 : row.Field <int>("wtno");
            entity.wtsuf      = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf");
            entity.wtnox      = row.IsNull("wtnox") ? string.Empty : row.Field <string>("wtnox");
            entity.notesfl    = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.stagecd    = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdx   = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx");
            entity.transtype  = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.orderdt    = row.Field <DateTime?>("orderdt");
            entity.enterdt    = row.Field <DateTime?>("enterdt");
            entity.reqshipdt  = row.Field <DateTime?>("reqshipdt");
            entity.duedt      = row.Field <DateTime?>("duedt");
            entity.shipfmwhse = row.IsNull("shipfmwhse") ? string.Empty : row.Field <string>("shipfmwhse");
            entity.shipfmname = row.IsNull("shipfmname") ? string.Empty : row.Field <string>("shipfmname");
            entity.shiptowhse = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse");
            entity.shiptoname = row.IsNull("shiptoname") ? string.Empty : row.Field <string>("shiptoname");
            entity.nounappr   = row.IsNull("nounappr") ? 0 : row.Field <int>("nounappr");
            entity.rowidWteh  = row.Field <byte[]>("rowid-wteh").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.sortdt1    = row.Field <DateTime?>("sortdt1");
            entity.sortdt2    = row.Field <DateTime?>("sortdt2");
            entity.sortfld    = row.IsNull("sortfld") ? string.Empty : row.Field <string>("sortfld");
            entity.amounti    = row.IsNull("amounti") ? 0 : row.Field <int>("amounti");
            return(entity);
        }