Exemple #1
0
        public static Replclearresults BuildReplclearresultsFromRow(DataRow row)
        {
            Replclearresults entity = new Replclearresults();

            entity.quantityRequested = row.IsNull("quantity_requested") ? 0 : row.Field <int>("quantity_requested");
            entity.quantityCleared   = row.IsNull("quantity_cleared") ? 0 : row.Field <int>("quantity_cleared");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Exemple #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromReplclearresults(ref DataRow row, Replclearresults entity)
 {
     row.SetField("quantity_requested", entity.quantityRequested);
     row.SetField("quantity_cleared", entity.quantityCleared);
     row.SetField("userfield", entity.userfield);
 }