Exemplo n.º 1
0
        //public static bool OwnerHasContractsInProgress(int ownerID)
        //{
        //    EMMADataSet.ContractsDataTable table = new EMMADataSet.ContractsDataTable();
        //    contractsTableAdapter.FillByStatus(table, ownerID.ToString(), 1);
        //    return table.Count > 0;
        //}
        public static EMMADataSet.IDTableDataTable GetInvolvedStationIDs(List<long> ownerIDs, 
            ContractStationType type)
        {
            StringBuilder ownerIDString = new StringBuilder("");
            foreach (int ownerID in ownerIDs)
            {
                if (ownerIDString.Length != 0) { ownerIDString.Append(","); }
                ownerIDString.Append(ownerID);
            }

            EMMADataSet.IDTableDataTable table = new EMMADataSet.IDTableDataTable();
            lock (contractsTableAdapter)
            {
                if (type == ContractStationType.Pickup)
                {
                    IDTableAdapter.FillStationIDsByContractPickup(table, ownerIDString.ToString());
                }
                else
                {
                    IDTableAdapter.FillStationIDsByContractDest(table, ownerIDString.ToString());
                }
            }
            return table;
        }
Exemplo n.º 2
0
 public static EveDataSet.staStationsDataTable GetContractStations(List<long> ownerIDs,
     ContractStationType type)
 {
     StringBuilder stationIDs = new StringBuilder("");
     EMMADataSet.IDTableDataTable idTable = Contracts.GetInvolvedStationIDs(ownerIDs, type);
     foreach (EMMADataSet.IDTableRow id in idTable)
     {
         stationIDs.Append(" ");
         stationIDs.Append(id.ID);
     }
     EveDataSet.staStationsDataTable retVal = new EveDataSet.staStationsDataTable();
     lock (stationsTableAdapter)
     {
         stationsTableAdapter.FillByIDs(retVal, stationIDs.ToString());
     }
     return retVal;
 }