示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeceserialviewcriteria(ref DataRow row, Apeceserialviewcriteria entity)
 {
     row.SetField("lineno", entity.lineno);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyrcv", entity.qtyrcv);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("apeidrowid", entity.apeidrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Apeceserialviewcriteria BuildApeceserialviewcriteriaFromRow(DataRow row)
        {
            Apeceserialviewcriteria entity = new Apeceserialviewcriteria();

            entity.lineno     = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.shipprod   = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.pono       = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf      = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.qtyord     = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyrcv     = row.IsNull("qtyrcv") ? decimal.Zero : row.Field <decimal>("qtyrcv");
            entity.proddesc   = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.apeidrowid = row.Field <byte[]>("apeidrowid").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }