DataSource Controls :: Restrict User Not To Insert Data In A Booked Time Slot?
Jun 30, 2010
restrict user not to insert data in a booked time slot,suppose User reserved an item say below dates, now how to restrict other users to reserve that item at the below time.
I'm using Telerik's RadScheduler Control with WebService Binding.
I've used RadScheduler with Server Side Binding which has an event called "OnTimeSlotCreated" which fires every time when a particular time slot creates so that i can access the time slot and get the control (HtmlTableCell Control) to modify it according to the requirement.
But now i'm binding it from client side through WebService which has no such "onClientTimeSlotCreated" event, also these time slots are not having any identity at client side to access.
I'm currently developing a system for booking of discussion room in a college. This system will allow the staff to help the students to make booking in advanced as well as for instant walk in usage.I've got a table to keep track of bookings, another for walk in and one for time slot.
For the time slot table, it includes start time slot and end time slot, which is 30 minutes interval for each.What i'm currently facing is that the system could not display the correct available time slot. I think it's the formula problem which I still can't get it solved.
Example:If the booking time is 8.30am - 9.00am, I have no problem showing the 1st slot as N/A.
But if the time is 8.45am - 9.15am, the system only update the 1st slot as N/A while the 2nd slot still remain as AVAILABLE which is wrong. Because since the time ends at 9.15, I would like the slot 9.00am - 9.30am to be N/A as well.
This would be my code:
[Code]....
I have total 21 time slot count in my table. And the arrCC113Availability is an ArrayList keeping track of the availability of each slot for that particular room.Is there any other formula which can cater for all the conditions?
I have written a SP which maintains users log in and log out history,it works fine when any user logs in or clicks on log out, problem is that as per need its not to allowed to keep the screen idle for 1 minute or more then in the log out column Null value is passed.
SP
Create proc usp_trackuserlogindetails @username varchar(50) = null, @command int = 0 as BEGIN if(@command = 0) begin insert into userlog (USERNAME,LOGIN,LOGOUT) values (@username,Getdate(),Null)
[Code] ....
Here when user manually clicks the log out button then 1(table above) is the output.
When user leaves the screen idle then after 1 minute the page goes to the Login.aspx page if the user tries to do something on the current page,here 2(table above) is the output can i store some hard core value instead of Null like Session expire or the exact session expires time.
I have grid view in ASP.Net 3.5. I need to add multiple blank rows in a gridview and then have to save them in database. How can I do that in most simplest way?
how do i insert date and time together ? what is the format for this. i tried like this but its not working.
string startDtime = TextFromDate.Text + " " + Stime; sql_comm.Parameters.AddWithValue("@StartDate", DateTime.Parse(startDtime)); is this the right way ? dd/mm/yyy +" "+ 00:00 or i need to make a string that contain this : dd/mm/yyy00:00 its not writing any eror it just do nothing .
Is there a way to create a contact form that takes the name. address and other info for the master record; Then, somehow, on the same page, allow the user to enter multiple contact info as chid records (i.e. phone, email, etc.)
All this using the Objec DataSource or SQL DataSource (which ever is easy) and doesn't require writing too much code.
This is the sqlDateTime overflow problem again. Background. As I'm sure you know dates must be between 1/1/1753 and 12/31/2999. If you have an empty date field, it throws and exception. So I created a function (below) that solve the problem when attempting to update or insert a record with a date field. Works great.
Public Shared Function MakeDateField(ByVal pasDate As String) As Nullable(Of DateTime)
If IsDate(pasDate) Then Try If pasDate <= System.DateTime.MinValue Then Return Nothing Else Return CType(pasDate, DateTime) End If Catch ex As NullReferenceException Return Nothing End Try Else Return Nothing End If End Function
So I thought about using a time field. I have the field, have the validator in place and then attempted to test the page. It resulted in my least favorite error message "sqlDateTime overflow".
I can think of several workarounds like adding a date or a fixed date to the time field, or converting it to a string. Each of these is problematic.
IS THERE A BETTER WAY TO UPDATE/INSERT TIME FIELDS.
I have trouble of saving "no time" to a datetime field in my db by using objectdatasource.I am using a formview to insert new record by an insert method in an objectdatasource.
I have two textboxes,one is for fromdate and another one is for todate. I have one more textbox for the question for the quiz(my application)For example in my database : From date is 12/8/10 and To date is 20/8/10.Now i want to restrict the user to edit the question if the quiz is already started.
Lets say today is 12/8/10. If the user comes tomorrow i.e; 13/8/10, he could not change the from date. I tried to disable the date if the date entered in textbox is < todays date. I dont know whether this one is correct or not.
I am using the createuserwizard to create a new user, however, I am also adding data to a custom sql table during the create user process. Everything works great. The new user is created in the aspnet_tables and the extra data is added to my custom table. The issue I am having is adding the current logged in user's ID to the custom table so I know who added the new user. I am able to capture the newly added user's ID and insert it into the custom table to create the link between the aspnet_tables and my custom table, however, the insert places the new user's id into my IDModifiedUser field instead of the currently logged in user.
I want user to enter name in Arabic if the user enter in english it should give Message " Enter Message In Arabic " and same for English if user try to enter in arabic it should give a message "Enter Name in English" ...
when need to insert into Text.boxes details from user (name,e-mail, e.tc.) and to get record of it into DB on other page. I try to get after pressing Submit btn:
i have two sqldatasource controls. one i use to display data in textbox's ,filter'd by a select parameter in page behind code. Once checked, i want to copy this data to the other datasource ,by selecting checkbox.Then display this data in detailsview control.
At present the two datasource controls declared , render data to the page simultaneously during pageload. I want to first check data in textbox's from first source, before second datasource is rendered to screen. note, both are filtered by a page variable. i wish to leave the textbox datasource control in situ, as other controls and code depend on it.The other detailsview datasource is my problem?
'' I try to add an TemplateField to my DetailsView control with calander control, in all modes. but can only add it to cell(0).how can i insert in the middle of the row?
Dim tmpfld As New TemplateField Dim c As Calendar = New Calendar() DetailsView1.Rows(0).Cells(4).Controls.Add(c)
I've got a DetailsView control on the page, which includes a FileUpload control. Both parts work individually e.g. I can upload a file and insert a record but what I'd like to be able to do is do both with one click - either on the Upload Buttton or on the Insert record text.
I have a button click event:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
But I'm not sure how to call the Insert Record event on the detailsView control.
i am making a webform for university students to register projects.there is a dropdown list which will ask how many students have participated, suppose student select 3 students, now my question is how can i restrict user to enter only one students data,i want he/she should fill all three students data than the submit button should enabled.
I have developed a ASP.NET application,I have used sessions for parameter passing.I dont want to let the user to enter data when the session expired.Please suggest me how to do that.