Advertisement
Advertisement
| 08.19.2008 at 03:24PM PDT, ID: 23661440 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: |
Imports System Imports System.Data Imports System.Data.Linq Imports System.Data.Linq.Mapping Imports System.Data.Linq.SqlClient Imports System.Data.DataTableExtensions Imports System.Reflection Public Class Form1 Private re7DataContext As New RE_Linq1DataContext Dim myRecord_ID As Integer = 0 Dim myAddress_ID As Integer = 0 Const automation = 449 Const homePhone = 3667 Const homeAddr = 4808 Private Sub BTN_Search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_Search.Click Dim CID_lookup = From records In re7DataContext.RECORDs Where records.CONSTITUENT_ID = IN_CID.Text Select records.ID Dim CAID_lookup = From CA In re7DataContext.CONSTIT_ADDRESSes Where CA.CONSTIT_ID = myRecord_ID And CA.PREFERRED = "-1" Select CA.ADDRESS_ID Dim ADDR_lookup = From ADDRs In re7DataContext.ADDRESSes Where ADDRs.ID = myAddress_ID Select ADDRs 'set global record information myRecord_ID = CID_lookup.FirstOrDefault OUT_InfoBox.Text = "Global Values:" & vbCrLf & "----------------------------------------" & vbCrLf & "myRecord_ID: " & vbTab & myRecord_ID & vbCrLf myAddress_ID = CAID_lookup.FirstOrDefault OUT_InfoBox.Text = OUT_InfoBox.Text & "myAddress_ID: " & vbTab & myAddress_ID & vbCrLf 'Copy the current preferred address to a new entry Dim addr2copy = ADDR_lookup.FirstOrDefault Dim zorkTable As Table(Of ADDRESS) = re7DataContext.GetTable(Of ADDRESS)() Dim zork As New ADDRESS zork.ADDRESS_BLOCK = addr2copy.ADDRESS_BLOCK zork.CARRIER_ROUTE = addr2copy.CARRIER_ROUTE zork.CITY = addr2copy.CITY zork.COUNTRY = addr2copy.COUNTRY zork.COUNTY = addr2copy.COUNTY zork.INFO_SOURCE = addr2copy.INFO_SOURCE zork.POST_CODE = addr2copy.POST_CODE zork.REGION = addr2copy.REGION zork.STATE = addr2copy.STATE zork.TYPE = addr2copy.TYPE zork.ACADEMY_ID = addr2copy.ACADEMY_ID zork.DPC = addr2copy.DPC zork.FULLADDRESS = addr2copy.FULLADDRESS zork.SYNCFULLADDRESS = addr2copy.SYNCFULLADDRESS zork.NZCITY = addr2copy.NZCITY zork.SUBURB = addr2copy.SUBURB zork.LOT = addr2copy.LOT zork.CERTIFICATION_DATA = addr2copy.CERTIFICATION_DATA zork.ACADEMY_DATE_LAST_CHANGED = addr2copy.ACADEMY_DATE_LAST_CHANGED zork.ACADEMY_LAST_CHANGED_BY = addr2copy.ACADEMY_LAST_CHANGED_BY zork.INTEGRATION_ID = addr2copy.INTEGRATION_ID zork.INTEGRATION_DATE_LAST_CHANGED = addr2copy.INTEGRATION_DATE_LAST_CHANGED zork.DPBARCODE = addr2copy.DPBARCODE zork.DATE_LAST_CHANGED = Now zork.LAST_CHANGED_BY = automation zorkTable.InsertOnSubmit(zork) re7DataContext.SubmitChanges() OUT_InfoBox.Text += "new address ID: " & vbTab & zork.ID & vbCrLf End Sub End Class |
| Answered By: | naspinski |
| Expert Since: | 02/25/2008 |
| Accepted Solutions: | 450 |
| Computer Expertise: | Guru |
| Education: | University of Minnesota, Master's Degree |