コード例 #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
ファイル: AvailBids.asmx.cs プロジェクト: giangonz/GovBids
 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
ファイル: AvailBids.asmx.cs プロジェクト: giangonz/GovBids
 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
ファイル: AvailBids.asmx.cs プロジェクト: giangonz/GovBids
 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
ファイル: AvailBids.asmx.cs プロジェクト: giangonz/GovBids
 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;
 }