예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOrdercartoncriteria(ref DataRow row, Ordercartoncriteria entity)
 {
     row.SetField("ch_co", entity.chCo);
     row.SetField("ch_wh", entity.chWh);
     row.SetField("ch_tracking", entity.chTracking);
     row.SetField("ch_carton", entity.chCarton);
     row.SetField("ch_status", entity.chStatus);
     row.SetField("ch_ord", entity.chOrd);
     row.SetField("ch_suf", entity.chSuf);
     row.SetField("ch_pallet", entity.chPallet);
     row.SetField("carrier", entity.carrier);
     row.SetField("additional", entity.additional);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("ordercartoncriteriauserfield", entity.ordercartoncriteriauserfield);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Ordercartoncriteria BuildOrdercartoncriteriaFromRow(DataRow row)
        {
            Ordercartoncriteria entity = new Ordercartoncriteria();

            entity.chCo                         = row.IsNull("ch_co") ? string.Empty : row.Field <string>("ch_co");
            entity.chWh                         = row.IsNull("ch_wh") ? string.Empty : row.Field <string>("ch_wh");
            entity.chTracking                   = row.IsNull("ch_tracking") ? string.Empty : row.Field <string>("ch_tracking");
            entity.chCarton                     = row.IsNull("ch_carton") ? string.Empty : row.Field <string>("ch_carton");
            entity.chStatus                     = row.IsNull("ch_status") ? string.Empty : row.Field <string>("ch_status");
            entity.chOrd                        = row.IsNull("ch_ord") ? string.Empty : row.Field <string>("ch_ord");
            entity.chSuf                        = row.IsNull("ch_suf") ? string.Empty : row.Field <string>("ch_suf");
            entity.chPallet                     = row.IsNull("ch_pallet") ? string.Empty : row.Field <string>("ch_pallet");
            entity.carrier                      = row.IsNull("carrier") ? string.Empty : row.Field <string>("carrier");
            entity.additional                   = row.IsNull("additional") ? string.Empty : row.Field <string>("additional");
            entity.recordcountlimit             = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.ordercartoncriteriauserfield = row.IsNull("ordercartoncriteriauserfield") ? string.Empty : row.Field <string>("ordercartoncriteriauserfield");
            entity.userfield                    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }