コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCreatewolistttresults(ref DataRow row, Createwolistttresults entity)
 {
     row.SetField("wono", entity.wono);
     row.SetField("wosuf", entity.wosuf);
     row.SetField("seqno", entity.seqno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("whse", entity.whse);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("prodnotes", entity.prodnotes);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("rrarinit", entity.rrarinit);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("unit", entity.unit);
     row.SetField("stagedesc", entity.stagedesc);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("verno", entity.verno);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Createwolistttresults BuildCreatewolistttresultsFromRow(DataRow row)
        {
            Createwolistttresults entity = new Createwolistttresults();

            entity.wono      = row.IsNull("wono") ? 0 : row.Field <int>("wono");
            entity.wosuf     = row.IsNull("wosuf") ? 0 : row.Field <int>("wosuf");
            entity.seqno     = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.notesfl   = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.stagecd   = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.shipprod  = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.prodnotes = row.IsNull("prodnotes") ? string.Empty : row.Field <string>("prodnotes");
            entity.enterdt   = row.Field <DateTime?>("enterdt");
            entity.rrarinit  = row.IsNull("rrarinit") ? string.Empty : row.Field <string>("rrarinit");
            entity.qtyord    = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.unit      = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.stagedesc = row.IsNull("stagedesc") ? string.Empty : row.Field <string>("stagedesc");
            entity.proddesc  = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            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);
        }