Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOmorderundropcartoninfo(ref DataRow row, Omorderundropcartoninfo entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("order", entity.order);
     row.SetField("order_suffix", entity.orderSuffix);
     row.SetField("carton_count", entity.cartonCount);
     row.SetField("carton_list", entity.cartonList);
     row.SetField("id", entity.id);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Omorderundropcartoninfo BuildOmorderundropcartoninfoFromRow(DataRow row)
        {
            Omorderundropcartoninfo entity = new Omorderundropcartoninfo();

            entity.coNum       = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum       = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.order       = row.IsNull("order") ? string.Empty : row.Field <string>("order");
            entity.orderSuffix = row.IsNull("order_suffix") ? string.Empty : row.Field <string>("order_suffix");
            entity.cartonCount = row.IsNull("carton_count") ? 0 : row.Field <int>("carton_count");
            entity.cartonList  = row.IsNull("carton_list") ? string.Empty : row.Field <string>("carton_list");
            entity.id          = row.IsNull("id") ? 0 : row.Field <int>("id");
            entity.rowid       = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }