Hi,
I just added the following to a web page in Visual Studio 2008 using VB.
AccessDataSource
WebScheduleInfo
WebScheduleOleDbProvider
WebCalendarView
WebDayView
WebWeekView
Everything seems to work ok and they are all work together but I don't know how to add data to the database. Do you need to do it with code? Are there any controls that I can use to add the calendar data? I see that there is an Access WebSchedule Data Model available from Microsoft for $99. Does that work to add data? Is there something similar from Infragistics?
Additionally, I would have preferred to use SQL Server 2008 but all the instructions I found are for Access. Although I just found something on this forum to wire the controls to the SQL database. I may try that but I still need to know how to add data. Would the process be the same for Access or SQL Server?
Thanks
it depends...
for activities the view controls offer a double-click pop-up
there is also a .net object model for managing resuorces, activities, etc
and a javascript object model
also you can call the IG stored procedures directly from your application
or you can use your own data structures and wire them up to the IG object model.
It looks like a real-world solution will need to use mroe than one of these appraoches depending on the function. For example for managing resources I have written a C# data access layer that wraps the IG stored procedures. For managing appointments I let the users have access to day week and month view controls. For some specialized features (schedule excel upload and some system-created activities) I am using the IG C# classes.
So if you are still following this thread, how's it going?
Hi Frank,
Thank you for your reply. I'm still having problems connecting to the SQLServer version of WebSchedule2 rather than the Access version. I got some help from Infragistics and was able to create the SQL Server database running the query but I now cannot connect to it. I can't find it in Server Explorer or in App_Data, Add existing item. I also cannot find it when running the smart tag for SQLDataSource. I do see it when I run SQL Server but can't find it anywhere else.
The problem may be something I caused. I recently did a clean install of Windows 7 and all my software. Prior to that I had 2 versions of SQLServer (2005 & 2008) so insteal of my Server Name being ComputerName\SQLExpress it was ComputerName\MSSMLBIZ. I found MSSMLBIZ in my web.config and changed it to SQLExpress but it doen't help.
So I need to figure out how to connect to WebSchedule2 that I just created.
I'm still getting help from Infragistics.
I’m making a little more progress. I may have found the database. I found WebSchedule2.mdf in C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLExpress\MSSQL\DATA.
But I still cannot get to it using the smart tag in SQLDataSource, Add Existing Item in App_Data, Add Connection in Server Express. I also cannot copy it to App_Data.
I either get Access Denied or cannot find it when trying the above. I even changed my user to Admin and still get the same problem.
I haven't used the smart tag, I've coded my data connection in the code-behind.
Then in my aspx page I have an asp:Placeholder which gets replaced by teh viewer control later, the WebScheduleInfoControl, and the WebSceduleSqlClientProvider. These have minimal options set here, most of the work is done in code-behind:
<asp:PlaceHolder runat="server" ID="CalendarViewPlaceholder"/>
<igsch:WebScheduleInfo ID="WebScheduleInfo1" runat="server" EnableSmartCallbacks="true" EnableUnassignedResource="False" EnableMultiResourceView="true" EnableMultiResourceCaption="false" EnableRecurringActivities="true" AppointmentFormPath="~/WebSchedule/AppointmentAdd.aspx" ReminderFormPath="~/WebSchedule/Reminder.aspx"/>
<ig_scheduledata:WebScheduleSqlClientProvider ID="WebScheduleSqlClientProvider1" runat="server" />
in the code-behind, I have this declaration
private static String connString = ConfigurationManager.AppSettings["InteractiveImpactConnectionString"];
which gets the connection string for my database from web.config. It looks like this:
"Data Source=mysqlserver.name;Initial Catalog=databaseName;User Id=theuserName;Password=thePassword;"
so then in Page_Load I set it all up
protected void Page_Load(object sender, EventArgs e)
{
WebScheduleSqlClientProvider1.Connect(connString);
WebScheduleSqlClientProvider1.WebScheduleInfo = WebScheduleInfo1;
WebScheduleInfo1.ActiveResourceName = CurrentUser.ResourceName;
WebScheduleInfo1.LoggedOnUserName = CurrentUser.ResourceName;
CreateCalendarControl();
}
Creating the calendar control itself is done like this:
private void CreateCalendarControl()
System.Globalization.DateTimeFormatInfo format = new System.Globalization.DateTimeFormatInfo();
WebScheduleViewBase myCalendarViewControl = CalendarUtility.GetCalendarViewControl ((CalendarUtility.CalendarViewType)CalendarView);
myCalendarViewControl.EnableAppStyling = Infragistics.WebUI.Shared.DefaultableBoolean.True;
//myCalendarViewControl.StyleSetPath = "~/ig_res";
//myCalendarViewControl.StyleSetName = "XpSilver";
myCalendarViewControl.ID = "theView";
myCalendarViewControl.WebScheduleInfo = WebScheduleInfo1;
myCalendarViewControl.Width = new Unit("900px");
myCalendarViewControl.Height = new Unit("400px");
WebScheduleInfo1.WorkDayStartTime = new Infragistics.WebUI.Shared.SmartDate(DateTime.Today.Date.AddHours(7.0F));
WebScheduleInfo1.WorkDayEndTime = new Infragistics.WebUI.Shared.SmartDate(DateTime.Today.Date.AddHours(17.0F));
CalendarViewPlaceholder.Controls.Clear();
CalendarViewPlaceholder.Controls.Add(myCalendarViewControl);