예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOesfsearchresults(ref DataRow row, Oesfsearchresults entity)
 {
     row.SetField("recordtype", entity.recordtype);
     row.SetField("srcrowpointer", entity.srcrowpointer);
     row.SetField("billingcd", entity.billingcd);
     row.SetField("autosubmitcd", entity.autosubmitcd);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("whselistfl", entity.whselistfl);
     row.SetField("mostavailinvfl", entity.mostavailinvfl);
     row.SetField("quickdeliveryfl", entity.quickdeliveryfl);
     row.SetField("byregionfl", entity.byregionfl);
     row.SetField("mainwhse", entity.mainwhse);
     row.SetField("srcwhse", entity.srcwhse);
     row.SetField("priority", entity.priority);
     row.SetField("region", entity.region);
     row.SetField("whsegroup", entity.whsegroup);
     row.SetField("whselistty", entity.whselistty);
     row.SetField("whselistpointer", entity.whselistpointer);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Oesfsearchresults BuildOesfsearchresultsFromRow(DataRow row)
        {
            Oesfsearchresults entity = new Oesfsearchresults();

            entity.recordtype      = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype");
            entity.srcrowpointer   = row.IsNull("srcrowpointer") ? string.Empty : row.Field <string>("srcrowpointer");
            entity.billingcd       = row.IsNull("billingcd") ? string.Empty : row.Field <string>("billingcd");
            entity.autosubmitcd    = row.IsNull("autosubmitcd") ? string.Empty : row.Field <string>("autosubmitcd");
            entity.custno          = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto          = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.whselistfl      = row.Field <bool>("whselistfl");
            entity.mostavailinvfl  = row.Field <bool>("mostavailinvfl");
            entity.quickdeliveryfl = row.Field <bool>("quickdeliveryfl");
            entity.byregionfl      = row.Field <bool>("byregionfl");
            entity.mainwhse        = row.IsNull("mainwhse") ? string.Empty : row.Field <string>("mainwhse");
            entity.srcwhse         = row.IsNull("srcwhse") ? string.Empty : row.Field <string>("srcwhse");
            entity.priority        = row.IsNull("priority") ? 0 : row.Field <int>("priority");
            entity.region          = row.IsNull("region") ? string.Empty : row.Field <string>("region");
            entity.whsegroup       = row.IsNull("whsegroup") ? string.Empty : row.Field <string>("whsegroup");
            entity.whselistty      = row.IsNull("whselistty") ? string.Empty : row.Field <string>("whselistty");
            entity.whselistpointer = row.IsNull("whselistpointer") ? string.Empty : row.Field <string>("whselistpointer");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }