本文整理汇总了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.
}
}
示例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
}
}
示例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.
}
}
示例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);
}
示例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);
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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
}