Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCarriercriteria(ref DataRow row, Carriercriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("carrier_id", entity.carrierId);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("carrieruserfield", entity.carrieruserfield);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Carriercriteria BuildCarriercriteriaFromRow(DataRow row)
        {
            Carriercriteria entity = new Carriercriteria();

            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.carrierId        = row.IsNull("carrier_id") ? string.Empty : row.Field <string>("carrier_id");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.carrieruserfield = row.IsNull("carrieruserfield") ? string.Empty : row.Field <string>("carrieruserfield");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }