I'm working with doctor patient portal in asp.net where patient need to book appointment for that when any patient choose one slot for appointment it need color change to green and it should show an alert message book successfully , when any other patient choose same slot it should change color red and show alert message it is booked already. Moreover appointment id should be auto generated how can I write simple code for that.
Loading
Madhu VPosted Nov 3, 2022, 9:48 AM
Column name : Datatype
Appointment_id : int (set as primary key and idenitity specification is yes)
patient_name : varchar(50)
doctor_name : varchar(50)
treat_for : varchar(50)
date :date
time: time
Here appointment_id should be auto generated by the system... how can i do that
when i click check button it should show the doctor availability and when patient click a particular doctor and book it should change the color green and an alert booked successfully should be display, when other patient click the same doctor and time it should change into red color and it should pop up a alert message it is already booked. how to write this in code only using c# asp.net
Sachin SinghPosted Nov 3, 2022, 9:21 AM
You need to use 2 things
1. On slot booking click a request to database gainst the selected doctor for selected time.
2. On success change the seat to green using jquery.
For this to achieve we will need your database schema, otherwise it is impossible to answer.