Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWtrrarreptaddnew(ref DataRow row, Wtrrarreptaddnew entity)
 {
     row.SetField("shipfmwhse", entity.shipfmwhse);
     row.SetField("shiptowhse", entity.shiptowhse);
     row.SetField("newreportno", entity.newreportno);
     row.SetField("shipfmname", entity.shipfmname);
     row.SetField("shiptoname", entity.shiptoname);
     row.SetField("duedt", entity.duedt);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("nolines", entity.nolines);
     row.SetField("mergefl", entity.mergefl);
     row.SetField("totsuper", entity.totsuper);
     row.SetField("amounti", entity.amounti);
     row.SetField("rowid-wterah", entity.rowidWterah.ToByteArray());
     row.SetField("rushfl", entity.rushfl);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Wtrrarreptaddnew BuildWtrrarreptaddnewFromRow(DataRow row)
        {
            Wtrrarreptaddnew entity = new Wtrrarreptaddnew();

            entity.shipfmwhse  = row.IsNull("shipfmwhse") ? string.Empty : row.Field <string>("shipfmwhse");
            entity.shiptowhse  = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse");
            entity.newreportno = row.IsNull("newreportno") ? 0 : row.Field <int>("newreportno");
            entity.shipfmname  = row.IsNull("shipfmname") ? string.Empty : row.Field <string>("shipfmname");
            entity.shiptoname  = row.IsNull("shiptoname") ? string.Empty : row.Field <string>("shiptoname");
            entity.duedt       = row.Field <DateTime?>("duedt");
            entity.reqshipdt   = row.Field <DateTime?>("reqshipdt");
            entity.nolines     = row.IsNull("nolines") ? 0 : row.Field <int>("nolines");
            entity.mergefl     = row.Field <bool>("mergefl");
            entity.totsuper    = row.IsNull("totsuper") ? 0 : row.Field <int>("totsuper");
            entity.amounti     = row.IsNull("amounti") ? 0 : row.Field <int>("amounti");
            entity.rowidWterah = row.Field <byte[]>("rowid-wterah").ToStringEncoded();
            entity.rushfl      = row.Field <bool>("rushfl");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }