Jump to content
Xtreme .Net Talk

Machaira

Avatar/Signature
  • Posts

    330
  • Joined

  • Last visited

Everything posted by Machaira

  1. Sure, why not.
  2. You should be able to use the code I gave in post #4, you just need to take the namespace into account. Maybe I'm just missing something about exactly why you're trying to do it the way you're doing it. :(
  3. Public Class EmployeeAdder <XmlAttribute("KronosID")> _ Public KronosID As Int32 = 0 <XmlAttribute("Name")> _ Public Name As String = String.Empty <XmlAttribute("ActivityID")> _ Public ActivityID As Int32 = 0 End Class Since you're not doing any validation in the property accessors just make the members public. I still don't understand the reasoning behind making things more difficult than you need to.
  4. If you're using an XML format that the serializer can use you can't use serialization. Since you've already go the XMLDocument object you should just be able to iterate through the nodes and populate the properties of an employee object. I think you're making it harder than it needs to be by introducing things like the stream and XmlTextReader. Try this: Dim lst As New List(Of EmployeeAdder) Dim emp As EmployeeAdder Dim doc As New Xml.XmlDocument Dim node As Xml.XmlNode doc.Load(Application.StartupPath & "\test.xml") For Each node In doc.DocumentElement emp = New EmployeeAdder emp.ActivityID = Convert.ToInt32(node.SelectSingleNode("descendant::ActivityID").InnerText) emp.ID = Convert.ToInt32(node.SelectSingleNode("descendant::ID").InnerText) emp.Name = node.SelectSingleNode("descendant::Name").InnerText lst.Add(emp) Next node If you have to have the "xmlns="http://www.me.com", you'll need to add the code to recognize it.
  5. You're trying to deserialize a list of objects into a single object. It seems list you're also using XML that you created, not XML created by the serialization process. Try: Dim lst As New List(Of EmployeeAdder) Dim ser As New Xml.Serialization.XmlSerializer(GetType(List(Of EmployeeAdder))) Dim reader As New System.IO.StreamReader(New System.IO.FileStream(Application.StartupPath & "\test.xml", IO.FileMode.Open)) lst = CType(ser.Deserialize(reader), List(Of EmployeeAdder)) using XML formatted like this: <?xml version="1.0" encoding="utf-8"?> <ArrayOfEmployeeAdder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <EmployeeAdder> <ID>1</ID> <Name>Test</Name> <ActivityID>1</ActivityID> </EmployeeAdder> <EmployeeAdder> <ID>2</ID> <Name>Test 2</Name> <ActivityID>2</ActivityID> </EmployeeAdder> </ArrayOfEmployeeAdder>
  6. All you ever wanted to know about connection strings - http://www.connectionstrings.com
  7. Google is your friend - http://www.mvps.org/access/queries/qry0002.htm :)
  8. You can't really have any "best practice" guidelines because there's not one set way to do those things. The Standard Items in the menubar and toolbar don't know anything about how data will be input. How you disable/enable those controls depends on how you're inputting data. It could be the keyboard, it could be an on-screen keyboard with a mouse or other controller, it could be voice recognition software, etc.
  9. The problem is, the menu items don't know what events will trigger them being enabled or disabled. It depends on the application. You'll have to handle catching the events for enabling/disabling the items in whatever control you're using with that functionality.
  10. Requery the database for the set of employees you want to view.
  11. You'll have to have the event code written already, but then you would just do: AddHandler myButton.Click, AddressOf btnTest1_click
  12. Why not use the app.config file then?
  13. Any time. :)
  14. 1. http://www.google.com/search?q=c%23+tutorials&rls=com.microsoft:en-us&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1 2. See above :) 3. I didn't find it to be hard at all
  15. Ahh, I didn't see that. Looks like that should work, thanks!
  16. Have you looked at using the Login and LoginView controls? This is handled automatically for you using these.
  17. Unfortunately neither the Response nor Server object is recognized inside a web part (that I can tell). That was the first thing I tried, of course. Sorry, I should have mentioned that.
  18. I'm sure it's something simple that I'm overlooking, but can someone tell me how to do a redirect to another page from within a web part? Thanks!
  19. Is it possible that the null date rows have an extra space or something at the end of the 'Smith'? I can't see how the null value in a field would affect the query.
  20. I'm guessing the jpg is in the same folder as the form? Are you copying the jpg to the bin\debug folder?
  21. Replacing a null with a space is a hack IMO. What is the search criteria that you're using that isn't returning the expected results? Are you saying you're searching on a column that has a value in the search criteria and it's not being returned because another column in that row is null?
  22. Not sure what you mean by this. Can you show an example?
  23. /me wonders why anyone is using managed C++ instead of C# :confused: :(
  24. Check your post here
  25. Machaira

    ClickOnce

    I've used it and it worked very well for what I needed it for. A lot of it depends on what your application does. For simple apps it's great. More complicated apps that have a lot of support files, it becomes more problematic to use ClickOnce. Overall it works for what it's supposed to do. If you're using it in a large company, I would expect that the company would already have some technology in place to update a user's machine with software (ex. SMS).
×
×
  • Create New...