Click here to Skip to main content
15,887,135 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Add Live TV in Asp.Net Pin
Jak Anil7-Jun-13 1:56
Jak Anil7-Jun-13 1:56 
QuestionValidationExpression complexity Pin
VikramKumarJ4-Jun-13 1:53
VikramKumarJ4-Jun-13 1:53 
AnswerRe: ValidationExpression complexity Pin
Richard Deeming4-Jun-13 1:58
mveRichard Deeming4-Jun-13 1:58 
GeneralRe: ValidationExpression complexity Pin
VikramKumarJ4-Jun-13 18:23
VikramKumarJ4-Jun-13 18:23 
QuestionBackend Image creation and loading in webpage Pin
bigjfunk3-Jun-13 17:18
bigjfunk3-Jun-13 17:18 
AnswerRe: Backend Image creation and loading in webpage Pin
Bernhard Hiller3-Jun-13 21:26
Bernhard Hiller3-Jun-13 21:26 
AnswerRe: Backend Image creation and loading in webpage Pin
Jasmine25015-Jun-13 12:34
Jasmine25015-Jun-13 12:34 
QuestionMini-registration Check if Room is booked or open Pin
WickedFooker2-Jun-13 11:11
WickedFooker2-Jun-13 11:11 
I have been creating a smaller scale MUCH SIMPLIFIED version of a registration system that assumes classes are taught once a week. This system already checks if a teacher has taught 3 classes to not select him for further classes. But I need to make sure it also checks that the room is not already chosen for a class previous during the time it wants.

What I have so far selects rooms and shows them in a drop down list, but I am able to make it show all room less everything chosen so far but it does not take into consideration the time and day of the week and so it is eliminating anything chosen, not just for the day of the week and the start_Hour and end_Hour times.

// Populate Room and add Please Select
            // This shows ALL Rooms ---> string commandText1 = "SELECT * FROM tblRoom";\
            // Below shows ALL rooms minus any chosen before but does not consider day of the week (week_Day) or (start_Time and end_Time) of the class.
            string commandText1 = "SELECT * FROM tblRoom WHERE NOT EXISTS (SELECT * FROM tblClass WHERE tblRoom.room_Num = tblClass.room_Num)";
           


            var ds1 = new DataSet();

            using (var connection = new OleDbConnection(connectionString))
            using (var command = new OleDbCommand(commandText1, connection))
            {
                // OleDbCommand uses positional, rather than named, parameters.
                // The parameter name doesn't matter; only the position.
                command.Parameters.AddWithValue("@p0", ddlRoom.SelectedValue);

                var adapter = new OleDbDataAdapter(command);
                adapter.Fill(ds1);
            }

            ddlRoom.DataSource = ds1;
            ddlRoom.DataTextField = "room_Num";
            ddlRoom.DataValueField = "room_Num";
            ddlRoom.DataBind();
            ddlRoom.Items.Insert(0, new ListItem("Please Select", "0"));
            ddlRoom.Items.Insert(1, new ListItem("TBD", "TBD"));
        }

    }


tblRoom consists of tblRoom.room_Num (Key) TextString with Room#

tblClass consists of tblClass.room_Num (FK) TextString,
CourseID (FK) from tblCourse, week_Day which is the Day Of the Week (Monday, Tueday, Wednesday, Thursday, Friday or Saturday). start_Hour and end_Hour for when the class begins and ends.

What I am looking for is to improve the select command above so it can use week_Day = ? (ddlweekDay.SelectedValue) start_Hour (ddlstarthour.selectedvalue), end_Hour (ddlendHour.SelectedValue) OR to "remove" it from the drop down after it populates but before it shows the user. Hence perhaps a subroutine it can run called checkavailablity() where it might pass these parameters when all the time fields have been filled out or something. I know I can remove a line from the drop down and do it by naming the courseID or something? This is at least my next approach idea.

This is a very simplified version and has simple assumptions, not need to over think this. There is no gym class, and each class room is just that a class room. I just want to be able to schedule the classes -- not adding students as yet.
AnswerRe: Mini-registration Check if Room is booked or open Pin
Bernard Grosperrin8-Jun-13 1:30
Bernard Grosperrin8-Jun-13 1:30 
QuestionLooking for ideas for custom WYSIWYG editor for LED display Pin
Member 1008696031-May-13 10:15
Member 1008696031-May-13 10:15 
AnswerRe: Looking for ideas for custom WYSIWYG editor for LED display Pin
Jasmine25015-Jun-13 12:30
Jasmine25015-Jun-13 12:30 
QuestionWhat is the difference between DBContext class and ObjectContext ? Pin
Rockstar_30-May-13 23:29
professionalRockstar_30-May-13 23:29 
AnswerRe: What is the difference between DBContext class and ObjectContext ? Pin
Richard MacCutchan31-May-13 10:42
mveRichard MacCutchan31-May-13 10:42 
QuestionDispaly picture news widh rss reader Pin
mehdin6930-May-13 22:43
mehdin6930-May-13 22:43 
AnswerRe: Dispaly picture news widh rss reader Pin
mehdin6931-May-13 10:09
mehdin6931-May-13 10:09 
QuestionReturning true/false in a boolean function Pin
WickedFooker30-May-13 13:13
WickedFooker30-May-13 13:13 
AnswerRe: Returning true/false in a boolean function Pin
Joshua Omundson30-May-13 13:29
Joshua Omundson30-May-13 13:29 
AnswerRe: Returning true/false in a boolean function Pin
Muhammed Yaseen5-Jun-13 2:46
Muhammed Yaseen5-Jun-13 2:46 
QuestionHTTP requests and Cookies (HTTP Client) - Help pls!! Pin
expertvision30-May-13 2:43
expertvision30-May-13 2:43 
QuestionResizing a webpage according to the screen size/ Resolution Pin
revathilavi29-May-13 19:37
revathilavi29-May-13 19:37 
AnswerRe: Resizing a webpage according to the screen size/ Resolution Pin
Jasmine250130-May-13 9:57
Jasmine250130-May-13 9:57 
GeneralRe: Resizing a webpage according to the screen size/ Resolution Pin
revathilavi30-May-13 18:16
revathilavi30-May-13 18:16 
AnswerRe: Resizing a webpage according to the screen size/ Resolution Pin
Bernhard Hiller30-May-13 21:40
Bernhard Hiller30-May-13 21:40 
GeneralRe: Resizing a webpage according to the screen size/ Resolution Pin
revathilavi30-May-13 23:15
revathilavi30-May-13 23:15 
AnswerRe: Resizing a webpage according to the screen size/ Resolution Pin
dusty_dex30-May-13 22:59
dusty_dex30-May-13 22:59 

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.