.net-3.5

Selectively filling a dataset

送分小仙女□ 提交于 2019-12-24 18:27:55
问题 I need to change what rows are grabbed from the database based upon a few flags. How can I do this? My current code is like this: this.tblTenantTableAdapter.Fill(this.rentalEaseDataSet.tblTenant); Say if I wanted only rows that the id was greater than 50, how would I do that? Edit: The code to access the database was autogenerated by the original programmer a long time ago though VisualStudio. I don't know exactly how to get a connection from the autogenerated code. If I could do that I know

Do I need TFS installed on the machine that will use some dlls to communicate remotely to it?

不羁的心 提交于 2019-12-24 17:17:08
问题 I guess not, but here's the catch: I've made a COM+ Object to be used from a machine where neither VisualStudio or TFS are installed. And this COM+ Object has referenced TFS dlls to make a login on a remote TFS server and create Work Items. And I have another additional issue. I used VS2012 and TFS2010, so the dlls referenced say 11.0.0.0 when I think they should say 10.0.0.0 or somethin of that style. I checked on this TFS 2010 build failing because it can't load Microsoft.VisualStudio

Why is this IndexOf call returning -1?

≯℡__Kan透↙ 提交于 2019-12-24 15:26:50
问题 I understand that IndexOf returns -1 when the parameter isn't found, but this doesn't make sense to me. I have this code that iterates over all the DevExpress Checkboxes on my form, checks to see what their tag is, and tries to find it in the "filter" parameter that was passed to the method. If the tag is found in the filter, it should check that checkbox. It is always equating to false. public void FilterChanged(Control.ControlCollection controls, string filter) { filter = filter.Replace("["

transform UT8 to UCS-2

落爺英雄遲暮 提交于 2019-12-24 15:19:33
问题 I have recently learned that sql server 2005 does not support UTF8: UTF8 problem sql server I believe it supports UCS-2 though and look for a way to transform UTF8 to UCS-2 without loss of information if possible. Is it? Any feedback would be very much welcome. Thanks! Christian PS: C# preferred (-: 回答1: It looks like you have a text file encoded in UTF-8 and you want to re-encode it to UCS-2. StreamReader and StreamWriter support encoding automatically; you supply an Encoding object in their

WCF, changing the baseAdress of an endpoint

我们两清 提交于 2019-12-24 12:00:20
问题 i have a few questions about the below config file: <system.serviceModel> <bindings /> <services> <service behaviorConfiguration="WcfReporting.Service1Behavior" name="WcfReporting.Service1"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="" contract="WcfReporting.IService1"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp:/

WPF App Fails With System.MissingMethodException

别来无恙 提交于 2019-12-24 11:44:05
问题 I made a WPF app that uses Web Services. It is failing on all computers except the dev machine with the message -- System.MissingMethodException. I guess the point where it fails is the point where it tried to access the Remote webservice (website). Has anyone had any experience with WPF and webservices? Should I spend 2 more days porting it to .Net Winforms, or should I keep trying to make it run? The problem is, in Vista all I see is 'This application has experienced an error and will shut

What is the best approach upgrading from .NET 2 to 3.5?

久未见 提交于 2019-12-24 10:32:41
问题 We've been developing apps since .NET 2 release and now we are planning to upgrade to .NET 3.5. What is the best approach upgrading from .NET 2.0 to 3.5? BTW ... the external components that we use are: 1. EntitySpace - ORM 2. Microsoft Enterprise Library 3. Microsoft ReportingViewer 9.00 4. Telerik ASP.NET Controls 回答1: .NET Framework 3.5 is a superset of .NET Framework 2.0. You shouldn't have to do anything except re-target your build output. If any third party components require .NET 2.0

Stopping Application Loop in secondary AppDomain

╄→尐↘猪︶ㄣ 提交于 2019-12-24 08:46:35
问题 First off, apologies for the length... I have a Host/Plugin application akin to MAF. We are not using any of the System.Addin or associated namespaces as this is a custom plugin architecture with multiple AppDomains in play. The Host UI (user interface) is running in it's own application loop (AppDomain). When an item in a listview is double-clicked the following occurs: private static void StartPeripheralModule(string modName) { AppDomain domain = AppDomain.CreateDomain(modName); // add to

Flatten nested Dictionary<string, object>

和自甴很熟 提交于 2019-12-24 07:58:21
问题 I am deserializing some nested JSON with the following: string json = @"{ ""name"": ""charlie"", ""someID"": 123, ""level1"" : { ""name"": ""charlie 1"", ""someID"": 456 } }"; JavaScriptSerializer serializer = new JavaScriptSerializer(); Dictionary<string, object> data = serializer.Deserialize<Dictionary<string, object>>(json); Once this is done, the values of each dictionary key may be another Dictionary, and so on, multiple levels deep. What I would like to do is to flatten the multi-level

No PowerShell in System.Management.Automation?

吃可爱长大的小学妹 提交于 2019-12-24 07:07:24
问题 I'm having trouble getting the PowerShell class to resolve. I'm following along with the example in this question. I have a reference added to System.Management.Automation from C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0\System.Management.Automation.dll I have using System.Management.Automation; included at the top of my class. However, when I try to create an instance of powershell: PowerShell ps = PowerShell.Create() , PowerShell won't resolve. Using ctrl + . to