예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeetdupcustporesults(ref DataRow row, Oeetdupcustporesults entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("ordernotext", entity.ordernotext);
     row.SetField("transtype", entity.transtype);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagetext", entity.stagetext);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Oeetdupcustporesults BuildOeetdupcustporesultsFromRow(DataRow row)
        {
            Oeetdupcustporesults entity = new Oeetdupcustporesults();

            entity.orderno     = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf    = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.ordernotext = row.IsNull("ordernotext") ? string.Empty : row.Field <string>("ordernotext");
            entity.transtype   = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.enterdt     = row.Field <DateTime?>("enterdt");
            entity.stagecd     = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagetext   = row.IsNull("stagetext") ? string.Empty : row.Field <string>("stagetext");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }