Click here to Skip to main content
15,867,834 members
Home / Discussions / C#
   

C#

 
GeneralRe: Divergences with co workers about IDisposable Pin
User 1106097920-Sep-19 5:37
User 1106097920-Sep-19 5:37 
AnswerRe: Divergences with co workers about IDisposable Pin
#realJSOP22-Sep-19 3:28
mve#realJSOP22-Sep-19 3:28 
QuestionHow to connect to a remote windows service Pin
Mahmoud EL-Shazly18-Sep-19 20:51
Mahmoud EL-Shazly18-Sep-19 20:51 
AnswerRe: How to connect to a remote windows service Pin
F-ES Sitecore19-Sep-19 0:20
professionalF-ES Sitecore19-Sep-19 0:20 
AnswerRe: How to connect to a remote windows service Pin
Afzaal Ahmad Zeeshan19-Sep-19 2:08
professionalAfzaal Ahmad Zeeshan19-Sep-19 2:08 
GeneralRe: How to connect to a remote windows service Pin
Mahmoud EL-Shazly19-Sep-19 5:22
Mahmoud EL-Shazly19-Sep-19 5:22 
GeneralRe: How to connect to a remote windows service Pin
Afzaal Ahmad Zeeshan19-Sep-19 6:34
professionalAfzaal Ahmad Zeeshan19-Sep-19 6:34 
QuestionC# Insert TextBox Text into MS Database Pin
DreyerVorster18-Sep-19 10:20
DreyerVorster18-Sep-19 10:20 
Hi I have a MS Database called Holidays with 2 tables called: Destination and Booking.
I have a web form consisting of:

GridView Displaying the data from Destination Table
Label (Text = Holiday ID) with a TextBox (name = txtHolidayID)
Label (Text = Your Name) with a TextBox (name = txtName)
Label (Text = "") and (Name = lblMessage)
Button (Text = Book) and (Name = btnBook)

When the User clicks the Book Button the Web form should check whether the txtHolidyID (In this case 1 - 4) is one of the Holiday IDs in the GridView(Destination Table), If not the lblMessage should display saying "Invalid ID" and not save the Data.

When the User clicks the Book Button and the txtHolidayID is correct (Meaning 1 - 4 in this case), and the txtName is of string, then the holidayID in the TextBox which is from the Destination Table should be saved in the Booking Table along with the Name provided and the lblMessage should display "Booking Successful".

When the User clicks the Book Button and everything is correct but did not save for some reason the lblMessage should display "Booking Failed".

I have searched the forum for something similar but I'm not finding it.
I will add Captures of my Database and Web Form to make things easier to understand.
Sorry for this rookie question.

Database Capture
Shared album - Dreyer Vorster - Google Photos[^]

Destination Table Capture
Shared album - Dreyer Vorster - Google Photos[^]

Booking Table Capture
Shared album - Dreyer Vorster - Google Photos[^]

WebForm Capture
Shared album - Dreyer Vorster - Google Photos[^]

WebForm with Details Capture
Shared album - Dreyer Vorster - Google Photos[^]
AnswerRe: C# Insert TextBox Text into MS Database Pin
Mycroft Holmes18-Sep-19 12:37
professionalMycroft Holmes18-Sep-19 12:37 
GeneralRe: C# Insert TextBox Text into MS Database Pin
DreyerVorster18-Sep-19 19:27
DreyerVorster18-Sep-19 19:27 
AnswerRe: C# Insert TextBox Text into MS Database Pin
jkirkerx18-Sep-19 12:51
professionaljkirkerx18-Sep-19 12:51 
AnswerRe: C# Insert TextBox Text into MS Database Pin
Gerry Schmitz19-Sep-19 0:38
mveGerry Schmitz19-Sep-19 0:38 
QuestionHighest Number of a folder Pin
Member 1398003216-Sep-19 20:07
Member 1398003216-Sep-19 20:07 
AnswerRe: Highest Number of a folder Pin
OriginalGriff16-Sep-19 20:37
mveOriginalGriff16-Sep-19 20:37 
GeneralRe: Highest Number of a folder Pin
Member 1398003216-Sep-19 21:46
Member 1398003216-Sep-19 21:46 
GeneralRe: Highest Number of a folder Pin
OriginalGriff16-Sep-19 21:59
mveOriginalGriff16-Sep-19 21:59 
GeneralRe: Highest Number of a folder Pin
Member 1398003216-Sep-19 22:05
Member 1398003216-Sep-19 22:05 
GeneralRe: Highest Number of a folder Pin
OriginalGriff16-Sep-19 22:32
mveOriginalGriff16-Sep-19 22:32 
GeneralRe: Highest Number of a folder Pin
Member 1398003217-Sep-19 14:01
Member 1398003217-Sep-19 14:01 
GeneralRe: Highest Number of a folder Pin
Peter_in_278016-Sep-19 22:17
professionalPeter_in_278016-Sep-19 22:17 
GeneralRe: Highest Number of a folder Pin
Member 1398003217-Sep-19 14:26
Member 1398003217-Sep-19 14:26 
AnswerRe: Highest Number of a folder Pin
BillWoodruff17-Sep-19 17:39
professionalBillWoodruff17-Sep-19 17:39 
QuestionHOW TO Auto Install Devexpress Windows PowerShell Pin
Member 1404636316-Sep-19 2:17
Member 1404636316-Sep-19 2:17 
QuestionRe: HOW TO Auto Install Devexpress Windows PowerShell Pin
Richard MacCutchan16-Sep-19 2:44
mveRichard MacCutchan16-Sep-19 2:44 
AnswerRe: HOW TO Auto Install Devexpress Windows PowerShell Pin
OriginalGriff16-Sep-19 3:43
mveOriginalGriff16-Sep-19 3:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.