当前位置: 首页>>代码示例>>C#>>正文


C# ResultSet.GetColumnData方法代码示例

本文整理汇总了C#中ResultSet.GetColumnData方法的典型用法代码示例。如果您正苦于以下问题:C# ResultSet.GetColumnData方法的具体用法?C# ResultSet.GetColumnData怎么用?C# ResultSet.GetColumnData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ResultSet的用法示例。


在下文中一共展示了ResultSet.GetColumnData方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AwardCertificationForm

        public AwardCertificationForm()
        {
            InitializeComponent();

            customerResults = new ResultSet(cyclingDAL.GetDataReader("[CustomerTable]"));

            // Set the suggestions of the SuggestingTextBox to the Customer Names and add a Suggestion clicked listener to call SuggestionChosen
            CustomerNameSuggestingTextBox.SetSuggestions(customerResults.GetColumnData(1));
            CustomerNameSuggestingTextBox.SuggestionClickedEvent += new SuggestingTextBox.SuggestionClickedEventArgs(SuggestionChosen);
            CustomerNameSuggestingTextBox.textBox.TextChanged += new EventHandler(CustomerNameSuggestingTextBox_TextChanged);

            // Read and store the displayedResultSet data
            displayedResults = UpdateResultSet("CertificationBookingsTable JOIN ChildTable ON CertificationBookingsTable.ChildID = ChildTable.ChildID JOIN CustomerTable ON ChildTable.CustomerID = CustomerTable.CustomerID ", "1=1", "[CustomerTable].CustomerID, CustomerName, [ChildTable].ChildID, ChildName, CertificationBookingID, Level, Price");

            if (displayedResults.GetSize() > 0)
            {
                ShowRecord(0); // Shows the first record of this ResultSet.
            }
        }
开发者ID:StefanKennedy,项目名称:NorthCoast,代码行数:19,代码来源:AwardCertificationForm.cs

示例2: CancelBookingForm

        bool settingSuggestedText = false; // Used to prevent the built in WinForms event call of TextChanged changing the Displayed Results

        #endregion Fields

        #region Constructors

        public CancelBookingForm()
        {
            InitializeComponent();

            bookingResults = UpdateResultSet("[dbo].[BookingTable]"); // Extract data from different tables and save them as ResultSets
            customerResults = UpdateResultSet("[dbo].[CustomerTable]");
            campingResults = UpdateResultSet("[dbo].[CampingBookingsTable]");
            pitchResults = UpdateResultSet("[dbo].[PitchBookingsTable]");

            displayedResultSet = UpdateResultSet("BookingTable JOIN CustomerTable ON BookingTable.CustomerID = CustomerTable.CustomerID", "1=1", "BookingID, BookingTable.CustomerID, CustomerName, StartDate, NightsStayed, PricePerNight, TotalPrice"); // Display all of the booking results as we are not yet filtering them

            CustomerNameSuggestingTextBox.SetSuggestions(customerResults.GetColumnData(1)); // Set the customer names as the suggestions for the SuggestingTextBox
            CustomerNameSuggestingTextBox.SuggestionClickedEvent += new SuggestingTextBox.SuggestionClickedEventArgs(CustomerNameSuggestingTextBox_SuggestionChosen); // When a suggestion is chosen run the CustomerNameSuggestingTextBox_SuggestionChosen method
            CustomerNameSuggestingTextBox.textBox.TextChanged += new EventHandler(CustomerNameSuggestingTextBox_TextChanged);

            if (customerResults.GetSize() > 0)
            {
                ShowRecord(0); // Shows the first record of this ResultSet. Does not depend on a bookingID
            }
        }
开发者ID:StefanKennedy,项目名称:NorthCoast,代码行数:26,代码来源:CancelBookingForm.cs

示例3: ReturnEquipmentForm

        public ReturnEquipmentForm()
        {
            InitializeComponent();

            equipmentLoansResults = UpdateResultSet("[dbo].[EquipmentLoansTable]"); // Read and store the data from the EquipmentLoansTable

            // Read and store the displayedResultSet data
            displayedResultSet = UpdateResultSet("[dbo].[EquipmentLoansTable] JOIN [dbo].[CustomerTable] ON EquipmentLoansTable.CustomerID = CustomerTable.CustomerID JOIN [dbo].[EquipmentTable] ON EquipmentLoansTable.EquipmentID = EquipmentTable.EquipmentID", "1=1", "EquipmentLoanID, EquipmentLoansTable.EquipmentID, EquipmentName, CustomerTable.CustomerID, CustomerName, StartDate, Duration, Quantity, RentalPrice, StockLevel");

            originalDisplayedResults = displayedResultSet;

            // Set the suggestions of the SuggestingTextBox to the Customer Names and add a Suggestion clicked listener to call CustomerNameSuggestingTextBox_SuggestionChosen
            CustomerNameSuggestingTextBox.SetSuggestions(displayedResultSet.GetColumnData(4));
            CustomerNameSuggestingTextBox.SuggestionClickedEvent += new SuggestingTextBox.SuggestionClickedEventArgs(CustomerNameSuggestingTextBox_SuggestionChosen);
            CustomerNameSuggestingTextBox.textBox.TextChanged += new EventHandler(CustomerNameSuggestingTextBox_TextChanged);

            if (equipmentLoansResults.GetSize() > 0)
            {
                ShowRecord(0); // Shows the first record of this ResultSet.
            }
        }
开发者ID:StefanKennedy,项目名称:NorthCoast,代码行数:21,代码来源:ReturnEquipmentForm.cs

示例4: SetupBookSightseeingBusForm

        private void SetupBookSightseeingBusForm()
        {
            DateTime currentTime = DateTime.Now;
            DatePicker.MinDate = currentTime; // Set the range in which a customer can book a bus
            DatePicker.MaxDate = currentTime.AddMonths(6);

            DatePicker.Value = currentTime;
            timetableDetails = busDal.GetTimetableDetails(startTime.Date); // Saves the timetableDetails for the specified date

            customerResults = new ResultSet(busDal.GetDataReader("CustomerTable"));

            // Sets the suggestions of the CustomerNameSuggestingTextBox to the customer's names and adds a listener to when a customer name suggestion is chosen
            CustomerSuggestingTextBox.SetSuggestions(customerResults.GetColumnData(1));
            CustomerSuggestingTextBox.SuggestionClickedEvent += new SuggestingTextBox.SuggestionClickedEventArgs(CustomerSuggestionChosen);
        }
开发者ID:StefanKennedy,项目名称:NorthCoast,代码行数:15,代码来源:BookSightseeingBusForm.cs

示例5: SetupBookCyclingCertificationForm

        private void SetupBookCyclingCertificationForm()
        {
            // Store data about the customers
            customerResults = new ResultSet(cyclingDAL.GetDataReader("[CustomerTable]"));

            // Set the suggestions of the CustomerNameSuggestingTextBox to the customer names, and add a listener so that when a suggestion is chosen SuggestionChosen is called
            CustomerNameSuggestingTextBox.SetSuggestions(customerResults.GetColumnData(1));
            CustomerNameSuggestingTextBox.SuggestionClickedEvent += new SuggestingTextBox.SuggestionClickedEventArgs(SuggestionChosen);
        }
开发者ID:StefanKennedy,项目名称:NorthCoast,代码行数:9,代码来源:BookCyclingCertificationForm.cs

示例6: CustomerIDComboBox_SelectedIndexChanged

 // When the CustomerID is changed get the list of corresponding child names for this user
 private void CustomerIDComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     string query = "CustomerID = " + CustomerIDComboBox.Text;
     ResultSet childResults = new ResultSet(cyclingDAL.GetDataReader("[ChildTable]", query, "ChildName"));
     ChildNameSuggestingTextBox.SetSuggestions(childResults.GetColumnData(0));
 }
开发者ID:StefanKennedy,项目名称:NorthCoast,代码行数:7,代码来源:BookCyclingCertificationForm.cs

示例7: SetupBookCyclingTourForm

        private void SetupBookCyclingTourForm()
        {
            currentDate = DateTime.Today;
            DatePicker.MinDate = currentDate; // Sets the range in which a customer can make a booking
            DatePicker.MaxDate = currentDate.AddMonths(6);
            DetermineTimeSlots(currentDate.Date); // Determines the available time slots that the user can choose from

            customerResults = new ResultSet(cyclingDAL.GetDataReader("CustomerTable"));

            // Sets the suggestions to the customer names and adds a listener for when a Customer Name suggestion is chosen
            CustomerSuggestingTextBox.SetSuggestions(customerResults.GetColumnData(1));
            CustomerSuggestingTextBox.SuggestionClickedEvent += new SuggestingTextBox.SuggestionClickedEventArgs(CustomerSuggestionChosen);
        }
开发者ID:StefanKennedy,项目名称:NorthCoast,代码行数:13,代码来源:BookCyclingTourForm.cs

示例8: SetupBookCyclingLessonForm

        private void SetupBookCyclingLessonForm()
        {
            // Add a Listener to update the price when the details of the default ChildLessonInput are changed
            childLessonInput1.DetailsUpdated += new ChildLessonInput.DetailsUpdatedDelegate(UpdatePrice);

            customerResults = new ResultSet(cyclingDAL.GetDataReader("CustomerTable"));

            // Set suggestions to customer names and add a listener for when a suggestion is chosen
            CustomerNameSuggestingTextBox.SetSuggestions(customerResults.GetColumnData(1));
            CustomerNameSuggestingTextBox.SuggestionClickedEvent += new SuggestingTextBox.SuggestionClickedEventArgs(CustomerSuggestionChosen);
        }
开发者ID:StefanKennedy,项目名称:NorthCoast,代码行数:11,代码来源:BookCyclingLessonForm.cs

示例9: SetupHireEquipmentForm

        private void SetupHireEquipmentForm()
        {
            hiredItemInput1.DetailsChanged += new HiredItemInput.DetailsChangedDelegate(UpdatePrice); // When the details of the default HiredItemInput are changed Update the price label

            customerResults = new ResultSet(dal.GetDataReader("[dbo].[CustomerTable]"));
            //dal.CloseConnection();

            //Set the suggestion of the SuggestingTextBox to the Customer names and add the event for choosing a customer name suggestion
            CustomerNameSuggetiveTextBox.SetSuggestions(customerResults.GetColumnData(1));
            CustomerNameSuggetiveTextBox.SuggestionClickedEvent += new SuggestingTextBox.SuggestionClickedEventArgs(NameSuggestionChosen);
        }
开发者ID:StefanKennedy,项目名称:NorthCoast,代码行数:11,代码来源:HireEquipmentForm.cs

示例10: UpdateDisplayedResults

 // Used to Change the results that are displayed to the contents of a ResultSet
 private void UpdateDisplayedResults(ResultSet rs)
 {
     displayedResultSet = rs;
     CustomerNameSuggestingTextBox.SetSuggestions(rs.GetColumnData(2));
     PreviousBookingButton.Enabled = false;
     if (rs.GetSize() == 1) // If there is only one result don't allow the user to move to the next result
     {
         NextBookingButton.Enabled = false;
     }
     else
     {
         NextBookingButton.Enabled = true;
     }
     ShowRecord(0); // Show the first available record
 }
开发者ID:StefanKennedy,项目名称:NorthCoast,代码行数:16,代码来源:CancelBookingForm.cs


注:本文中的ResultSet.GetColumnData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。