Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWtrrarlinechange(ref DataRow row, Wtrrarlinechange entity)
 {
     row.SetField("rowid-wteral", entity.rowidWteral.ToByteArray());
     row.SetField("lineno", entity.lineno);
     row.SetField("seqno", entity.seqno);
     row.SetField("accepttype", entity.accepttype);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("unit", entity.unit);
     row.SetField("prodcost", entity.prodcost);
     row.SetField("rushfl", entity.rushfl);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Wtrrarlinechange BuildWtrrarlinechangeFromRow(DataRow row)
        {
            Wtrrarlinechange entity = new Wtrrarlinechange();

            entity.rowidWteral = row.Field <byte[]>("rowid-wteral").ToStringEncoded();
            entity.lineno      = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.seqno       = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.accepttype  = row.IsNull("accepttype") ? string.Empty : row.Field <string>("accepttype");
            entity.qtyord      = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.unit        = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.prodcost    = row.IsNull("prodcost") ? decimal.Zero : row.Field <decimal>("prodcost");
            entity.rushfl      = row.Field <bool>("rushfl");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }