コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWteilineupdate(ref DataRow row, Wteilineupdate entity)
 {
     row.SetField("nonstockty", entity.nonstockty);
     row.SetField("sortbinloc", entity.sortbinloc);
     row.SetField("qtyrcv", entity.qtyrcv);
     row.SetField("qtyunavail", entity.qtyunavail);
     row.SetField("reasunavty", entity.reasunavty);
     row.SetField("poeirowid", entity.poeirowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Wteilineupdate BuildWteilineupdateFromRow(DataRow row)
        {
            Wteilineupdate entity = new Wteilineupdate();

            entity.nonstockty = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty");
            entity.sortbinloc = row.IsNull("sortbinloc") ? string.Empty : row.Field <string>("sortbinloc");
            entity.qtyrcv     = row.IsNull("qtyrcv") ? decimal.Zero : row.Field <decimal>("qtyrcv");
            entity.qtyunavail = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail");
            entity.reasunavty = row.IsNull("reasunavty") ? string.Empty : row.Field <string>("reasunavty");
            entity.poeirowid  = row.Field <byte[]>("poeirowid").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }