Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. AcceptOrReject isn't being called from anywhere in the code you posted, did you mean to call it from somewhere or did you not post the code that does call it?
  2. Which bit are you having problems with? Populating a listbox or launching the second form and passing the selected event to it?
  3. Is there any code in the page that contains these user controls that references the grid controls?
  4. Have you looke at http://msdn.microsoft.com/en-us/library/ms629361.aspx
  5. What do you mean by is this method not being called? Are parts of it not running?
  6. If the test and production services expose the same functionality then you should be able to just swap endpoints, asuming other considerations (like security) are taken care of. Personally I would only bother to wrap the functionality in my own class library if I was using these services in multiple projects or if these services had a overly complex / confusing API I was trying to encapsulate.
  7. Where is the grid defined?
  8. Could you not simply use a StreamReader and read the file a line at a time and check each line as you read it? If performance suffers a lnie at a time then you might find a FileStream will allow you to read chunks into memory and then use a stream reader over the memory you have just read in. Another possibility is using memory mapped files, however this isn't as straight forward from .Net although google will find several hits that will point you in the right direction.
  9. If I was doing all the work myself I would tend to put the code for creating connections, commands etc. into a class of it's own and call this class from the slightly higher level methods like getReceiptsTotal etc. This class would have fairly simple methods like GetConnection() which would just return a valid connection object and slightly more complex methods such as GetCommand or GetReader which would return the corresponding object based on parameters passed in. Typically I would overload these to cover the most common scenarios. http://www.microsoft.com/downloads/details.aspx?familyid=f63d1f0a-9877-4a7b-88ec-0426b48df275&displaylang=en can be used as a model (or even as is) as it covers the most common scenarios. Opening and closing a connection every time isn't that big an overhead due to connection pooling being used behind the scenes to reduce the actual connections being really created and destroyed - and very slight performance hit is far outweighed by the fact you aren't leaking connections. One thing I would tend towards though is the using statement as this will make sure connections are closed even when exceptions are thrown. Other than that I would really avoid using string concatenation to build your queries, parameterised queries are far safer and can be converted to stored procedures if need be with very little effort. http://www.xtremedotnettalk.com/showthread.php?p=463520#post463520 has a bit more background on other reasons why concatenation is a bad thing...
  10. Multiple copies of the same library are likely to be a maintenance burden though, if these things are genuinely supposed to be reusable then perhaps it is more of a design issue rather than a physical packaging issue. If the interface isn't changing then you should be able to build clients that could be built against the old version but still use the newer versions. If you are changing the interfaces between versions then you could create new interfaces that inherit the old ones to maintain compatibility. If that isn't suitable then perhaps the interfaces themselves aren't being thought out correctly in the first place.
  11. HasErrors is a property not a method so remove the () from it. Is Reconcile a method of your own? If so make sure all the relevant namespaces etc. are in a using clause at the top or that it exists in the current class.
  12. Try http://msdn.microsoft.com/en-us/library/system.data.datatable.acceptchanges.aspx instead
  13. You probably need to add a dsLogging.Tables["roepnummers"].Commit() before the closing } in the if statement.
  14. One way would be to put the common interfaces / base classes into a 3rd library and have both the main project and the extension project reference this common library. In the extension library have your classes implement the interfaces from the common library and in the main project have the application use these interfaces. At runtime the Main project would need to load the extension library dynamically via reflection (not too difficult) and create an instance of the class. One way to make this 'tidier' is to implement a basic factory pattern in the common library and have it do the creation / loading of the real extension library.
  15. Seems odd, I can't really understand how dsLogging.Tables["roepnummers"] can have a value while dsLogging.Tables["roepnummers"].Rows doesn't have a value. Did you put a watch on the full dsLogging.Tables["roepnummers"].Rows expression or just on .Rows?
  16. DateTimeInput.Value returns a date so you could simply use the .AddYears() method to handle the additional year(s) you need to add. Then convert to a string as and when you need to.
  17. http://www.themsteam.com/Casestudies/cr2msreporting_usability.aspx http://stackoverflow.com/questions/168427/compare-sql-server-reporting-services-to-crystal-reports http://www.crystalreportsbook.com/SSRSandCR_ExecSummary.asp http://www.c-sharpcorner.com/UploadFile/john_charles/CrystalReportsandReportingServices05212008144427PM/CrystalReportsandReportingServices.aspx
  18. Did dsLogging.Tables["roepnummers"].Rows not have any value?
  19. Are you using Crystal reports or MS' Reporting Services?
  20. Does dsLogging.Tables["roepnummers"] have a value then?
  21. My bad, I didn't spot that you were using WPF - simply add a reference to System.Windows.Forms.dll and you should be able to use the NotifyIcon in your code.
  22. On the line foreach (DataRow drRoepnrc in dsLogging.Tables["roepnummers"].Rows) What is the value of the .Rows property?
  23. The KeyPreview is a property of the form - simlpy select the form (not a control on the form) and it will apeear in the property grid. If you add a NotifyIcon icon component to your form and assign it an icon then it will show up in the notification area.
  24. If you step through the code in the debugger does it step through the loops as you would expect? Does the if statement equal true?
  25. Are you getting any errors when you are using the above code or is it just not displaying the image? If you step through the code does bytImageData get assigned anything on the line Dim bytImageData() As Byte = dr.Item("object") Have you tried the GetSqlBytes method of the SqlDataReader? This exposes a Stream property you can use directly without needing to copy data into a bytre array etc.
×
×
  • Create New...