操作已超时
objdbconn.OpenConn()
msSQL = " select google_name,google_password from hrm_mst_temployee " & _
" where employee_gid='" & Session("employee_gid") & "'"
objOdbcDataReader = objdbconn.GetDataReader(msSQL)
If objOdbcDataReader.HasRows = True Then
objOdbcDataReader.Read()
Try
user_password = objcmnfunctions.HttpDecodeFilePath(objOdbcDataReader.Item("google_password").ToString)
Catch
radnote.Text = "Problem Occurred While Decoding Password"
radnote.Show()
connect = 0
End Try
user_name = objOdbcDataReader.Item("google_name").ToString
End If
objOdbcDataReader.Close()
objdbconn.CloseConn()
Try
Dim contactser As New ContactsService("test")
contactser.setUserCredentials(user_name, user_password)
Dim newEntry As New ContactEntry()
newEntry.Title.Text = "(L)" & cbocompanyname.Text & "-" & txtcontactpersonname.Text
Dim primaryEmail As New EMail(txtEmail_ID.Text)
primaryEmail.Primary = True
primaryEmail.Rel = ContactsRelationships.IsWork
newEntry.Emails.Add(primaryEmail)
Dim phoneNumber As New PhoneNumber(txtcountrycode.Text & "-" & txtcontacttelephonenumber.Text)
phoneNumber.Primary = True
phoneNumber.Rel = ContactsRelationships.IsMobile
newEntry.Phonenumbers.Add(phoneNumber)
Dim name As New Name
name.FullName = "(L)" & cbocompanyname.Text & "-" & txtcontactpersonname.Text
newEntry.Name = name
Dim ims As New IMAddress
ims.Primary = True
Dim feedUri As New Uri(ContactsQuery.CreateContactsUri("default"))
Dim createdEntry As ContactEntry = DirectCast(contactser.Insert(feedUri, newEntry), ContactEntry)
Dim value As String = createdEntry.ExternalIds.ToString
Catch
radnote.Text = "Problem in Accessing Google Account"
radnote.Show()
End Try
End Sub