.net-3.5

Cannot Deserialize a SOAP Message programmatically

狂风中的少年 提交于 2019-12-22 08:09:58
问题 I get the following exception when I try to deserialize a soap message. I am doing it this way cause I have the response files I want to reuse in testing. I cannot use a real service or the like as it does not fit the architecture for the testing framework we have. Test 'MyUnitTestMethod' failed: System.InvalidOperationException : There is an error in XML document (1, 2). ----> System.InvalidOperationException : <MySpecialResponse xmlns='http://xsd.com/msgs/v1'> was not expected. at System

Align the row values in a GridView

浪尽此生 提交于 2019-12-22 08:08:13
问题 I need to right align the values in a column of my gridview in asp.net 3.5 How can I do that? <asp:GridView ID="gvSearchResults" runat="server" onpageindexchanging="gvSearchResults_PageIndexChanging" AutoGenerateColumns="False" CssClass="Grid" AllowPaging="True" PageSize="20" ForeColor="#333333" GridLines="None" Width="99%" Font-Names="Arial" Font-Size="Small"> <Columns> <asp:HyperLinkField Text="Vendor Number" DataNavigateUrlFields="RecID" DataNavigateUrlFormatString="~/Apps/DataForms

A CRM architecture (open source app)

ⅰ亾dé卋堺 提交于 2019-12-22 08:05:12
问题 I need to develop a CRM application, but I don't know how the architecture should be layed out. Can anyone point me to a high level or detailed outline of how such a project can be developed? 回答1: CRM is not really anything magical. It is just a database application that is centered around customers. If I was you I would sign up for trials with some of the big players in the established crm industry. Salesforce, SugarCRM, Saleslogix to randomly name a few (there are thousands more). The best

Nullable DateTime and Dapper Dot Net

只愿长相守 提交于 2019-12-22 08:03:01
问题 I have a Type with a nullable DateTime column. When I try to use Dapper Dot Net to create a collection of that Type, I run into problems. Scenario 1 : If all the rows are null for this column it's fine Scenario 2 : If one or more the rows have a date value for this column, I get the following error: Error parsing column 3 (LastCompleted=2013-12-03 00:00:00 - DateTime) - Invalid cast from 'System.DateTime' to 'System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral,

DataGridView SortCompare event doesn't fire

江枫思渺然 提交于 2019-12-22 07:54:06
问题 Using VS2008, C# and .NET 3.5 I am using databound DataGridView controls to display tabular data read from a web service. In several cases, there is a numeric column that needs to be sorted. I have tried a couple of different ways to get this to work, but the column still ends up sorting alphabetically (ie, 1, 10, 2, 3 instead of 1, 2, 3, 10). Setting the column data type to int doesn't work for databound controls, so the only real way to do this is to provide some custom sort logic. Many

How can I navigate any JSON tree in c#?

白昼怎懂夜的黑 提交于 2019-12-22 06:01:27
问题 I need to navigate a Json structure as I would navigate an XML using XmlDocument . The structure is not known, and I need to iterate over the nodes to parse some data. Is this possible? I know I can use JavaScriptSerializer to deserialize it into a known type, but this is not the case as I can receive any valid json. I'm using .NET 3.5 (SP1) and cannot upgrade to 4.0 at the moment. I upgraded to .NET 4.0 to use dynamic types (which is awesomeness made code) 回答1: Read this article: http://www

How can I navigate any JSON tree in c#?

泄露秘密 提交于 2019-12-22 06:01:26
问题 I need to navigate a Json structure as I would navigate an XML using XmlDocument . The structure is not known, and I need to iterate over the nodes to parse some data. Is this possible? I know I can use JavaScriptSerializer to deserialize it into a known type, but this is not the case as I can receive any valid json. I'm using .NET 3.5 (SP1) and cannot upgrade to 4.0 at the moment. I upgraded to .NET 4.0 to use dynamic types (which is awesomeness made code) 回答1: Read this article: http://www

bool as datasource for a CheckBox (Bool update in an other thread than the one it is impacting)

萝らか妹 提交于 2019-12-22 05:43:11
问题 I try to find how to assign a bool to a checkbox. I want that my checkbox.checked value refresh automatically when my bool data change. I know that for ComboBox there are the DataSource attribute that make it with a list but I am not able to find the equivalent with checkbox. I try with the checkBox.DataBindings but it does not seem to work.On the other hand I don't really know what mean the third attribute. checkBox.DataBindings.Add("Checked", DisableBugWatcher, "check"); I need that because

LINQ query with multiple aggregates

前提是你 提交于 2019-12-22 05:18:14
问题 How would I create the equivalent Linq To Objects query? SELECT MIN(CASE WHEN p.type = "In" THEN p.PunchTime ELSE NULL END ) AS EarliestIn, MAX(CASE WHEN p.type = "Out" THEN p.PunchTime ELSE NULL END ) AS LatestOUt FROM Punches p 回答1: You can't efficiently select multiple aggregates in vanilla LINQ to Objects. You can perform multiple queries, of course, but that may well be inefficient depending on your data source. I have a framework which copes with this which I call "Push LINQ" - it's

Using PowerShell with .NET 3.5 runtime/libraries

夙愿已清 提交于 2019-12-22 05:02:37
问题 Is it possible to run PowerShell 1.0 (or 2.0 CTP) backed by the 3.5 runtime instead of 2.0? We're building a .NET 3.5 solution, and I'd still like to use PowerShell as our scripting engine for scheduled tasks, etc. I don't need LINQ syntax or anything, just the 3.5 libraries and runtime. FOLLOWUP: thank you for the reply about dynamically loading assemblies. But let me clarify my question: is there any way to run PowerShell so that the 3.5 libraries run by default? So that if I enter New