예제 #1
0
        public string GetBidIds(string agency, string category, string location, string title)
        {
            string                        response    = String.Empty;
            AvailBidIdResponse            availBidRes = new AvailBidIdResponse();
            AvailBidIdResponseAvailBidIds availBidIds = new AvailBidIdResponseAvailBidIds();

            try
            {
                availBidIds.Bid   = GovBidsDAL.FetchDataBidIds(agency, category, location, title).ToArray();
                availBidRes.Items = new AvailBidIdResponseAvailBidIds[] { availBidIds };
                response          = Serialize(availBidRes);
            }
            catch (Exception ex)
            {
                AvailBidResponseException exception = new AvailBidResponseException();
                exception.Error = ex.Message;
                response        = Serialize(exception);
            }
            finally
            {
                availBidRes = null;
                availBidIds = null;
            }
            return(response);
        }
예제 #2
0
 public string GetAgencies()
 {
     string response = String.Empty;
     Agency agency = new Agency();
     try
     {
         agency.Items = GovBidsDAL.FetchDataAgencies().ToArray();
         response = Serialize(agency);
     }
     catch (Exception ex)
     {
         AvailBidResponseException exception = new AvailBidResponseException();
         exception.Error = ex.Message;
         response = Serialize(exception);
     }
     return response;
 }
예제 #3
0
        public string GetCategories()
        {
            string   response = String.Empty;
            Category category = new Category();

            try
            {
                category.Items = GovBidsDAL.FetchDataCategories().ToArray();
                response       = Serialize(category);
            }
            catch (Exception ex)
            {
                AvailBidResponseException exception = new AvailBidResponseException();
                exception.Error = ex.Message;
                response        = Serialize(exception);
            }
            return(response);
        }
예제 #4
0
        public string GetLocations()
        {
            string   response = String.Empty;
            Location location = new Location();

            try
            {
                location.Items = GovBidsDAL.FetchDataLocation().ToArray();
                response       = Serialize(location);
            }
            catch (Exception ex)
            {
                AvailBidResponseException exception = new AvailBidResponseException();
                exception.Error = ex.Message;
                response        = Serialize(exception);
            }
            return(response);
        }
예제 #5
0
        public string GetAgencies()
        {
            string response = String.Empty;
            Agency agency   = new Agency();

            try
            {
                agency.Items = GovBidsDAL.FetchDataAgencies().ToArray();
                response     = Serialize(agency);
            }
            catch (Exception ex)
            {
                AvailBidResponseException exception = new AvailBidResponseException();
                exception.Error = ex.Message;
                response        = Serialize(exception);
            }
            return(response);
        }
예제 #6
0
 public string GetBidIds(string agency, string category, string location, string title)
 {
     string response = String.Empty;
     AvailBidIdResponse availBidRes = new AvailBidIdResponse();
     AvailBidIdResponseAvailBidIds availBidIds = new AvailBidIdResponseAvailBidIds();
     try
     {
         availBidIds.Bid = GovBidsDAL.FetchDataBidIds(agency, category, location, title).ToArray();
         availBidRes.Items = new AvailBidIdResponseAvailBidIds[] { availBidIds };
         response = Serialize(availBidRes);
     }
     catch (Exception ex)
     {
         AvailBidResponseException exception = new AvailBidResponseException();
         exception.Error = ex.Message;
         response = Serialize(exception);
     }
     finally
     {
         availBidRes = null;
         availBidIds = null;
     }
     return response;
 }
예제 #7
0
 public string GetLocations()
 {
     string response = String.Empty;
     Location location = new Location();
     try
     {
         location.Items = GovBidsDAL.FetchDataLocation().ToArray();
         response = Serialize(location);
     }
     catch (Exception ex)
     {
         AvailBidResponseException exception = new AvailBidResponseException();
         exception.Error = ex.Message;
         response = Serialize(exception);
     }
     return response;
 }
예제 #8
0
 public string GetCategories()
 {
     string response = String.Empty;
     Category category = new Category();
     try
     {
         category.Items = GovBidsDAL.FetchDataCategories().ToArray();
         response = Serialize(category);
     }
     catch (Exception ex)
     {
         AvailBidResponseException exception = new AvailBidResponseException();
         exception.Error = ex.Message;
         response = Serialize(exception);
     }
     return response;
 }