Ejemplo n.º 1
0
        public static Wtesbuildwtlistresults BuildWtesbuildwtlistresultsFromRow(DataRow row)
        {
            Wtesbuildwtlistresults entity = new Wtesbuildwtlistresults();

            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.printeddt  = row.Field <DateTime?>("printeddt");
            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.statusinfo = row.IsNull("statusinfo") ? string.Empty : row.Field <string>("statusinfo");
            entity.amounti    = row.IsNull("amounti") ? 0 : row.Field <int>("amounti");
            entity.rowidWteh  = row.Field <byte[]>("rowid-wteh").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWtesbuildwtlistresults(ref DataRow row, Wtesbuildwtlistresults 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("printeddt", entity.printeddt);
     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("statusinfo", entity.statusinfo);
     row.SetField("amounti", entity.amounti);
     row.SetField("rowid-wteh", entity.rowidWteh.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }