Reading calendar folder in a date range using JACOB - calendar

hi guys is it possible on JACOB on reading only CALENDAR folder with a date range and let me get the subject. If yes please give a sample code for reference. Thanks a lot

This code has two filters
1) first only by date range - start and end date
2) filter by subject = "test"
If you need only date, you can omit second filter.
How to: Filter Recurring Appointments and Search for a String in the Subject
Dispatch namespace = outlokAx.getProperty("Session").toDispatch();
Dispatch calendarFolder = Dispatch.call(namespace, "GetDefaultFolder", new Integer(9)).toDispatch();
Dispatch calItems = Dispatch.get(calendarFolder, "items").toDispatch();
String customFilter = "#SQL=\"urn:schemas:calendar:dtstart\" > '" + DateUtility.dateToUtcString(startDate) + "' and \"urn:schemas:calendar:dtend\" = '" + DateUtility.dateToUtcString(endDate) + "'" ;
String customFindFilter = "#SQL=\"urn:schemas:httpmail:subject\" like '" + "test" + "'" ;
Dispatch restrictedItems = Dispatch.call(calItems, "Restrict", new Variant(customFilter)).toDispatch(); //Works only with dates
Dispatch.call(calItems, "Sort", "[Start]");
Dispatch.put(restrictedItems, "IncludeRecurrences", "False");
int numberOfMatchingItems = 0;
Dispatch lastitemFound = null;
if (restrictedItems != null && restrictedItems.m_pDispatch > 0) {
Dispatch findItem = Dispatch.call(restrictedItems, "Find", customFindFilter).toDispatch(); // Find Works with other attributes
while (findItem != null && findItem.m_pDispatch > 0) {
numberOfMatchingItems++;
lastitemFound = findItem;
findItem = Dispatch.call(restrictedItems, "FindNext").toDispatch();
Variant start = Dispatch.get(findItem, "Start");
Variant end = Dispatch.get(findItem, "End");
Variant subject = Dispatch.get(findItem, "Subject");
System.out.println("# Outlook event fetched: " + subject + " start: '" + start + "' end '" + end + "'");
}
}

Related

Putting a new item in to the calendar overwrites the other item inside

Hello can someone please tell me what could be the problem in my calendar. So let me explain whats happening. So first im trying to make a scheduler application and im using a WPF scheduler in VB, so to begin with, the tab of a calendar needs to display 3 items (Subject, Professor Name, Courses) so what i need to do is to choose a room first and then drag a subject name from the listbox (like this Sample1) and then next i need to drag a professors name (Sample2) and then heres where the problems starts
So it already displays two items (Subject and Professor) now i need to drag an item from Course listbox, but the problem is whenever I put a course to the tab of a calendar, it becomes like this instead
So the goal here is to show 3 dragged items but instead, it only shows 2 and the course is overwriting the name of the subject. Please help me, thank you! If you want to see the whole codes, heres the link https://drive.google.com/file/d/1fWKisPr9qDh54B4EMdwWJbY3KFgi_xfc/view?usp=sharing
Heres the code of where you can drag the items
'Dragging Data to Calendar
Sub Add_list_item(ByVal list As String)
Delay.Delay(1)
Dim count = 0
For Each item As CalendarItem In Calendar1.GetSelectedItems()
count += 1
If count > 1 Then
Return
Else
Dim get_item_end_time As DateTime = item.EndDate.AddHours(2)
get_item_end_time = get_item_end_time.AddMinutes(30)
Dim item_start_time = item.StartDate
Dim item_end_time = get_item_end_time
Dim item_tooltip = item.StartDate.ToString()
Dim start_time = item.StartDate.ToString("HH:mm tt")
Dim end_time = item.EndDate.ToString("HH:mm tt")
Dim dat_start As Date = item_tooltip
Dim ci As CultureInfo = CultureInfo.CreateSpecificCulture("en-US")
Dim dtfi As DateTimeFormatInfo = ci.DateTimeFormat
dtfi.AbbreviatedDayNames = {"Sun", "1", "2", "3", "4",
"5", "6"}
Dim output_start As String = String.Format(ci, "{0:ddd}", dat_start.AddDays(0))
Dim item_text = CStr(item.Text)
Dim parts As String() = item_text.Split(New String() {Environment.NewLine},
StringSplitOptions.None)
Dim get_item_total_hours = (item.EndDate - item.StartDate).TotalHours
Dim get_start_time As DateTime
Dim get_end_time As DateTime
If get_item_total_hours = 1 Then
get_start_time = item.StartDate.AddMinutes(-30)
get_end_time = item.EndDate.AddMinutes(30)
ElseIf get_item_total_hours = 1.5 Then
get_start_time = item.StartDate.AddHours(-1)
get_end_time = item.EndDate.AddHours(1)
ElseIf get_item_total_hours = 2 Then
get_start_time = item.StartDate.AddHours(-1).AddMinutes(-30)
get_end_time = item.EndDate.AddHours(1).AddMinutes(30)
ElseIf get_item_total_hours = 2.5 Then
get_start_time = item.StartDate.AddHours(-2)
get_end_time = item.EndDate.AddHours(2)
ElseIf get_item_total_hours = 3 Then
get_start_time = item.StartDate.AddHours(-2).AddMinutes(-30)
get_end_time = item.EndDate.AddHours(2).AddMinutes(30)
ElseIf get_item_total_hours = 3.5 Then
get_start_time = item.StartDate.AddHours(-3)
get_end_time = item.EndDate.AddHours(3)
ElseIf get_item_total_hours = 4 Then
get_start_time = item.StartDate.AddHours(-3).AddMinutes(-30)
get_end_time = item.EndDate.AddHours(3).AddMinutes(30)
ElseIf get_item_total_hours = 4.5 Then
get_start_time = item.StartDate.AddHours(-4)
get_end_time = item.EndDate.AddHours(4)
ElseIf get_item_total_hours = 5 Then
get_start_time = item.StartDate.AddHours(-4).AddMinutes(-30)
get_end_time = item.EndDate.AddHours(4).AddMinutes(30)
ElseIf get_item_total_hours = 5.5 Then
get_start_time = item.StartDate.AddHours(-5)
get_end_time = item.EndDate.AddHours(5)
ElseIf get_item_total_hours = 6 Then
get_start_time = item.StartDate.AddHours(-5).AddMinutes(-30)
get_end_time = item.EndDate.AddHours(5).AddMinutes(30)
End If
If (ListBox1_Instructor.Items.Contains(list) = True) Then
Call Check_if_instructor(list)
End If
If parts.Count >= 3 Then
If (instructor_name = True) Then
Call Get_instructor_code(instructor_gender + list)
Call Get_course_name(corSec_id)
Call checkInstructorSchedule(start_time, end_time, output_start, instructor_id)
If (instructor_name = True) Then
If instructor_gender = "Male" Then
instructor_gender = "Mr. "
Else
instructor_gender = "Ms. "
End If
If item.Text <> "" Then
item.Text = parts(0) + vbNewLine + vbNewLine + instructor_gender + list
item.ApplyColor(Color.RoyalBlue)
End If
instructor_name = False
End If
Else
item.ApplyColor(Color.RoyalBlue)
item.Text = list + vbNewLine + vbNewLine + parts(2) + vbNewLine + vbNewLine
End If
ElseIf parts.Count = 1 Then
If (instructor_name = True) Then
Call Get_instructor_code(instructor_gender + list)
Call Get_course_name(corSec_id)
Call checkInstructorSchedule(start_time, end_time, output_start, instructor_id)
If (instructor_name = True) Then
If instructor_gender = "Male" Then
instructor_gender = "Mr. "
Else
instructor_gender = "Ms. "
End If
If item.Text <> "" Then
item.Text = parts(0) + vbNewLine + vbNewLine + instructor_gender + list
item.ApplyColor(Color.RoyalBlue)
End If
instructor_name = False
End If
Else
item.ApplyColor(Color.RoyalBlue)
item.Text = list + vbNewLine + vbNewLine + parts(parts.Count - 1) + vbNewLine + vbNewLine
End If
End If
Calendar1.Invalidate(item)
End If
Next
End Sub

Possible to download JPA repository in Vaadin as CSV file?

Assume that we have defined a entity and it's connected to a database. Now we can access the database by using a repository.
#Autowired
private DataLoggRepository dataLoggRepository;
If I want to get all the rows from the database and download it. Then I can write this code:
List<DataLogg> dataLoggers = dataLoggRepository.findAll();
Now, how can I donwload the object dataLoggers as a CSV file in Vaadin in a proper way?
Here you can see how to create a link to download a file:
Anchor csvLink = new Anchor(new StreamResource("file.csv",
() -> {
String csvString = ...// create the csv
return new ByteArrayInputStream(csvString.getBytes());
}), "Download CSV");
csvLink.getElement().setAttribute("download", true);
To create the CSV you have various options like OpenCSV or directly create the CSV from the SQL query.
Here is a working example
// Download all data
Anchor download = new Anchor(); // Add this to the layout
loggerId.addValueChangeListener(e-> {
String fileName = String.valueOf(loggerId.getValue()) + ".csv";
List<DataLogg> selectedLogger = dataLoggRepository.findByLoggerId(loggerId.getValue());
download.setHref(getStreamResource(fileName, selectedLogger));
});
download.getElement().setAttribute("download",true);
download.add(new Button("Download", new Icon(VaadinIcon.DOWNLOAD_ALT)));
Function
public StreamResource getStreamResource(String filename, List<DataLogg> selectedLogger) {
// Create a large CSV file in a form of StringBuilder and then convert it all to bytes
StringWriter stringWriter = new StringWriter();
stringWriter.write("id, dateTime, DO0, DO1, DO2, DO3, AI0, AI1, AI2, AI3, loggerId, samplingTime\n");
for (int i = 0; i < selectedLogger.size(); ++ i) {
DataLogg dataLogg = selectedLogger.get(i);
String row = dataLogg.getId() + "," +
dataLogg.getDateTime() + "," +
dataLogg.getDO0() + "," +
dataLogg.getDO1() + "," +
dataLogg.getDO2() + "," +
dataLogg.getDO3() + "," +
dataLogg.getAI0() + "," +
dataLogg.getAI1() + "," +
dataLogg.getAI2() + "," +
dataLogg.getAI3() + "," +
dataLogg.getLoggerId() + "," +
dataLogg.getSamplingTime() + "\n";
stringWriter.write(row);
}
// Try to download
try {
byte[] buffer = stringWriter.toString().getBytes("UTF-8");
return new StreamResource(filename, () -> new ByteArrayInputStream(buffer));
} catch (UnsupportedEncodingException e) {
byte[] buffer = new byte[] {0};
return new StreamResource(filename, () -> new ByteArrayInputStream(buffer));
}
}

How to search in an array with npgsql?

I have an array column i would like to search.
The search term is like :
WHERE ARRAY['tag1','tag2'] <# tags
If i search like this (where donnee is the string of the text to search):
string variable1 = string.Empty;
string[] tags = donnee.Split(',');
if (tags.Length > 1)
{
foreach (string item in tags)
{
variable1 = variable1 + "'" + item + "',";
}
variable1 = variable1.Remove(variable1.Length - 1);
}
else
{
variable1 = variable1 + "'" + tags[0] + "'";
}
NpgsqlCommand cmd = new NpgsqlCommand("SELECT id,name FROM wincorrespondants WHERE (name ILIKE #donnee) OR (ARRAY[#var] <# tags) LIMIT 100", conn);
cmd.Parameters.AddWithValue("donnee", "%" + donnee + "%");
cmd.Parameters.AddWithValue("var", variable1);
the search don't work on the tag array but the program does not crash if there is a ' in the search string
If i search like this:
string variable1 = string.Empty;
string[] tags = donnee.Split(',');
if (tags.Length > 1)
{
foreach (string item in tags)
{
variable1 = variable1 + "'" + item + "',";
}
variable1 = variable1.Remove(variable1.Length - 1);
}
else
{
variable1 = variable1 + "'" + tags[0] + "'";
}
NpgsqlCommand cmd = new NpgsqlCommand("SELECT id,name FROM wincorrespondants WHERE (name ILIKE #donnee) OR (ARRAY["+variable1+"] <# tags) LIMIT 100", conn);
cmd.Parameters.AddWithValue("donnee", "%" + donnee + "%");
the program crash if there is a ' in the search string but work in other case (the program find the name the user is looking for or the user with the tags)
How do i format my search ?
Rather than trying to pass elements of the array, you should be sending the array itself as a parameter from Npgsql. For example:
var cmd = new NpgsqlCommand("SELECT id,name FROM wincorrespondants WHERE (name ILIKE #donnee) OR (#arr <# tags) LIMIT 100", conn);
cmd.Parameters.AddWithValue("arr", new[] {"tag1", "tag2" });

Microsoft VBScript runtime error '800a01a8'

I have website which is working on my one server now I have migrated to another server changed the connection string. But one weird thing is some pages working fine but some page show me " page can not be displayed error message. I am new in VBscript Can anyone help me what am missing"
Below is the code of page which is not working on new server but working on old server
Microsoft VBScript runtime error '800a01a8' : object required
<%#LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% if session("MM_Username") = "" or isnull(session("MM_Username")) then
response.redirect("/login.asp")
end if
%>
<%
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Update Record: set variables
If (CStr(Request("MM_update")) = "form1" And CStr(Request("MM_recordId")) <> "") Then
MM_editConnection = MM_v3_STRING
MM_editTable = "dbo.custMessage"
MM_editColumn = "id"
MM_recordId = "" + Request.Form("MM_recordId") + ""
MM_editRedirectUrl = "Change.asp"
MM_fieldsStr = "textarea|value"
MM_columnsStr = "message|',none,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Update Record: construct a sql update statement and execute it
If (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "") Then
' create the sql update statement
MM_editQuery = "update " & MM_editTable & " set "
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_editQuery = MM_editQuery & ","
End If
MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal
Next
MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId
If (Not MM_abortEdit) Then
' execute the update
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<%
Dim change__MMColParam
change__MMColParam = "1"
If (Request("MM_EmptyValue") <> "") Then
change__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim change
Dim change_numRows
Set change = Server.CreateObject("ADODB.Recordset")
change.ActiveConnection = MM_v3_STRING
change.Source = "SELECT * FROM dbo.custMessage WHERE id = " + Replace(change__MMColParam, "'", "''") + ""
change.CursorType = 0
change.CursorLocation = 2
change.LockType = 1
change.Open()
change_numRows = 0
%>
<%
'setup database connection
dim conn
set conn = server.CreateObject ("ADODB.Connection")
conn.ConnectionString = "Provider=SQLOLEDB;User ID=***;Password=***;Initial Catalog=heart_Test;Data Source=****;"
conn.Open
%>
So here is the answer.
Start Internet Services Manager.
Click Default Web Site, and then click Properties.
Double-click ASP in the Features pane.
Expand Behavior.
Click Enable Parent Paths.
Click True for Enable Parent Paths.
Click Apply.

In Visual Studio 2013 I simply want to pass data to a sql table using VB?

I am designing an application which is my forte but now have to code the back end. I am using Visual Studio 2013 with DevExpress and SQL Server 2014. It may be a simple question but I have struggled to find a straight answer anywhere. I have an asp.net book but I still cant find an answer. I think I have connected my whole solution with a connection string in that I can populate the tables and stored procedures into my dataclass. I simply want to add any user input into a table on SQL Server using a button with an onclick event. Surely it cant be that difficult but remember I am a bit of newbie so any help would be greatly appreciated. If there is any questions you need answered to assist then let me know. I am writing in VB script but am struggling to get it to work. Any advice would be appreciated. Thanks in advance!
Protected Sub btnAddNewSource_Click(sender As System.Object, e As EventArgs) Handles btnAddNewSource.Click
'ErrDetails.Text = ""
'ErrDetails.Visible = False
'FocusSet = False
'errCount = 0
'ErrDetails.Text = ""
'If txtSourceFunding.Text = "" Then
' ErrDetails.Text = ErrDetails.Text + "Did you enter the funding source?" + vbNewLine
' ErrDetails.Visible = True
' txtSourceFunding.Focus()
' FocusSet = True
' errCount = errCount + 1
'End If
'If txtContributionFunding.Text = "" Then
' ErrDetails.Text = ErrDetails.Text + "Did you enter the contribution?" + vbNewLine
' ErrDetails.Visible = True
' txtContributionFunding.Focus()
' FocusSet = True
' errCount = errCount + 1
'End If
'If cmbStatus.Value = -1 Then
' ErrDetails.Text = ErrDetails.Text + "Did you inform us of the status?" + vbNewLine
' ErrDetails.Visible = True
' cmbStatus.Focus()
' FocusSet = True
' errCount = errCount + 1
'End If
'If FocusSet = True Then
' ErrDetails.ForeColor = Drawing.Color.Red
' ErrDetails.Height = 20 * errCount
' ErrDetails.Visible = True
' Return
'End If
'Dim btnSource = (From o In dc1.Update_GrantApplicationCycleFunding Where o.GrantApplicationID = Session("CurrentProjectID").ToString).FirstOrDefault
'If Not IsNothing(btnSource) Then
' btnSource.GrantApplicationID = Session("CurrentProjectID")
' btnSource.GrantApplicationCycleFundingSource = txtSourceFunding.ToString
' btnSource.GrantApplicationCycleFundingContribution = txtContributionFunding.ToString
' btnSource.GrantApplicationCycleFundingStatusID = cmbStatus.ToString
' btnSource.GrantApplicationCycleFundingNotes = memFundingNotes.ToString
'Else
' Dim NewGrantApplicationCycleFundings As New GrantApplicationCycleFunding
' With NewGrantApplicationCycleFundings
' .GrantApplicationID = Session("CurrentProjectID")
' .GrantApplicationCycleFundingSource = txtSourceFunding.ToString
' .GrantApplicationCycleFundingContribution = txtContributionFunding.ToString
' .GrantApplicationCycleFundingStatusID = cmbStatus.ToString
' .GrantApplicationCycleFundingNotes = memFundingNotes.Text
' End With
' dc1.GrantApplicationCycleFundings.InsertOnSubmit(NewGrantApplicationCycleFundings)
' dc1.SubmitChanges()
' End If
'dc1.SubmitChanges()
Hey I have now managed to make the button add data to the datagrid. The big thing I missed was the declarations of the fields values at the bottom of the code and of course the databind! Never forget the correct DATABIND. You can adapt and use this in your own code if you are having similar problems! If you need help or explanation and I can help you then I will. Just add comment. Thanks
** ErrDetails.Text = ""
ErrDetails.Visible = False
FocusSet = False
errCount = 0
ErrDetails.Text = ""
If spnTotalEstimatedCost.Value <= 0 Then
ErrDetails.Text = ErrDetails.Text + "Please enter the cost." + vbNewLine
ErrDetails.Visible = True
If FocusSet = False Then
spnTotalEstimatedCost.Focus()
FocusSet = True
End If
errCount = errCount + 1
End If
If txtSourceFunding.Text = "" Then
ErrDetails.Text = ErrDetails.Text + "Please........?" + vbNewLine
ErrDetails.Visible = True
txtSourceFunding.Focus()
FocusSet = True
errCount = errCount + 1
End If
If spnContributionFunding.Value = 0 Then
ErrDetails.Text = ErrDetails.Text + "Please......" + vbNewLine
ErrDetails.Visible = True
spnContributionFunding.Focus()
FocusSet = True
errCount = errCount + 1
End If
If FocusSet = True Then
ErrDetails.ForeColor = Drawing.Color.Red
ErrDetails.Height = 20 * errCount
ErrDetails.Visible = True
Return
End If
Dim NewGrantApplicationMatchFundings As New GrantApplicationMatchFunding
With NewGrantApplicationMatchFundings
.GrantApplicationID = Session("CurrentProjectID")
.GrantApplicationMatchFundingName = txtSourceFunding.Text
.GrantApplicationMatchFundingContribution = spnContributionFunding.Value
.GrantApplicationMatchFundingStatus = cmbStatus.SelectedItem.Value
.GrantApplicationMatchFundingNotes = memFundingNotes.Text
End With
dc1.GrantApplicationMatchFundings.InsertOnSubmit(NewGrantApplicationMatchFundings)
dc1.SubmitChanges()
'End If
'dc1.SubmitChanges()
txtSourceFunding.Text = ""
spnContributionFunding.Value = ""
cmbStatus.Value = ""
memFundingNotes.Text = ""
grdFunding.DataBind()
Dim btnTotal = (From o In dc1.Select_GrantApplicationMatchFundingTotal(Session("CurrentProjectID").ToString)).FirstOrDefault
If Not IsNothing(btnTotal) Then
spnTotalMatchFunding.Text = btnTotal.TotalFunding
txtGrantFunding.Text = (spnTotalMatchFunding.Value / spnTotalEstimatedCost.Value) * 100
Else
spnTotalMatchFunding.Text = 0
txtGrantFunding.Text = 0
End If
Dim cafChange = (From o In dc1.GrantApplicationCostsAndFundings Where o.GrantApplicationID.ToString = Session("CurrentProjectID").ToString).FirstOrDefault
If Not IsNothing(cafChange) Then
cafChange.GrantApplicationID = Session("CurrentProjectID")
cafChange.GrantApplicationProjectCostsYear1 = spnTotalEstimatedCost.Value
cafChange.GrantApplicationMatchedFundingNotesYear1 = memNotesMatchFunding.Text
cafChange.GrantApplicationProjectRequestedYear1 = txtGrantFunding.Value
dc1.SubmitChanges()
Else
Dim NewGrantApplicationCostsAndFundings As New GrantApplicationCostsAndFunding
With NewGrantApplicationCostsAndFundings
.GrantApplicationID = Session("CurrentProjectID")
.GrantApplicationProjectCostsYear1 = spnTotalEstimatedCost.Value
.GrantApplicationMatchedFundingNotesYear1 = memNotesMatchFunding.Text
.GrantApplicationProjectRequestedYear1 = txtGrantFunding.Value
End With
dc1.GrantApplicationCostsAndFundings.InsertOnSubmit(NewGrantApplicationCostsAndFundings)
dc1.SubmitChanges()
End If
End Sub

Resources