Epicor Mass Receipts

Does any one know how to query the Epicor 905.702 mass receipt to show Warehouse code that are empty?

Currently I am looping through all the records and it is slow. 

 

              foreach(DataRow row in edvRcvDtlMassReceipt.dataView.Table.Rows)
                 {
                          if(String.IsNullOrEmpty(e.Row.Cells["WareHouseCode"].Value.ToString()))
                 {
                              string myWareHouseCode = getWareHouseFromPO(((int)e.Row.Cells["PONum"].Value));

                     if(String.IsNullOrEmpty(myWareHouseCode))
                     {
                         e.Row.Cells["WareHouseCode"].Value = "NS";
                         e.Row.Cells["BinNum"].Value = "1";
                     }
                     else
                        {
                             e.Row.Cells["WareHouseCode"].Value = myWareHouseCode;
                                      e.Row.Cells["BinNum"].Value = getBinNum(e.Row.Cells["PartNum"].Value.ToString(), myWareHouseCode );
                        }
                 }   
                 }