|
DataRow row = dataTable.Select( "ID = 5" );
|
|
|
|
|
Actually what I m trying to do is I m firing a query in SQL Server 2005 to retrieve records for selected criteria.
Based on the selection the query result I m taking that in a datatable and I have a GridView where this list of results is displayed.
Now there is a hyperlink in the Grid to select the detailed information about a particular result.
eg. In the query result I get 5 records matching the selection criteria, which are stored in a datatable.
now these reults are displayed in the grid and when i click on the hyperlink of a particular row then the records of that row should get selected and the detailed info should get displayed in another page.
For this particular row selection I want a row from the datatable.
|
|
|
|
|
Hello everyone,
I want to convert an object instance to XML string, and later read the XML string to construct the object again. Any samples?
(I find some serialization samples, but all about binary format, I prefer to use XML format.)
thanks in advance,
George
|
|
|
|
|
XmlSerializer[^]
Basically the same as binary serialization but to/from xml as requested.
|
|
|
|
|
Cool, J4amieC!
This is what I am looking for.
regards,
George
|
|
|
|
|
We have an application that polls active directory for a list of e-mail accounts. Until recently, all accounts were housed in Exchange. Recently, a merger with another company has introducted Lotus Notes into the mix.
Can anyone assist me in determining whether an e-mail account is defined in Exchange or defined in Lotus Notes programmatically?
From my perspective, all data is being retrieved via the Exchange server, but, all users, regardless of system of origin, show up in the global address list. As well, users have the same OU values.
Thanks in advance for any help provided.
Tim
P.S. - And, yes, I have searched forums, arcticles, MSDN, and Google.
modified on Wednesday, May 7, 2008 9:36 AM
|
|
|
|
|
Does both Exchange and Lotus Notes using Same AD ?
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
Hi,
I want to generate some automated code when I implement an interface in a class.
For example if I have an interface i.e.
using System;
using System.Collections.Generic;
using System.Text;
namespace Foo
{
public interface IFoo
{
bool DoSomething();
}
}
Now what I want to do is when I implement the interface in a class normally it defines the method in the class. I want to extend this so that I can have some automated code in the defined method as well. Please help me and guide me how to do this.
Regards;
Uttam Kumar
|
|
|
|
|
You cannot do what you are thinking of. There are other options...
1. You could change the class from a type interface to a type class and make the function a public virutal method so that any base classes can have the option of overriding that function.
2. You could create code snippets so that when you type something code (like: dosomething) then the code you want is automatically placed into the file for you.
Chris
|
|
|
|
|
Thanks for quick reply. Is it not even possible to write some commented code or some sort of comment?
Regards;
Uttam Kumar
|
|
|
|
|
Either way (using an base class with a public virtual function or a code snippet) you can have a comments.
Chris
|
|
|
|
|
Thanks again. code snippet is OK but in that case I need to tell user to call snippet but I'm not sure that by implementing virtual function I would be able to generate automated code or code template if possbile can you please send me a quick example.
Regards;
Uttam Kumar
|
|
|
|
|
I think instead of Interface you better go for Abstract class. This will serve your wish.
Anindya Chatterjee
|
|
|
|
|
If all you want is to run some code before allowing the derived class's method to run, you can use the Template Method pattern. It looks like
abstract class BaseFoo
{
public bool DoSomething()
{
BaseFooDoSomething();
DoSomethingInternal();
}
protected abstract void DoSomethingInternal();
}
Clients can only override DoSomethingInternal and you'll always get to run BaseFooDoSomething before executing the derived class code.
Does this help?
|
|
|
|
|
Sorry but that's not my question. What is want is a method when you implement a method some how a wizard would give you a templete code. I also don't want to use snippet as it would be additional step for the consumer.
Regards;
Uttam Kumar
|
|
|
|
|
Uttam Kumar Unik! wrote: What is want is a method when you implement a method some how a wizard would give you a templete code.
So you don't care if the developer deletes the autogenerated code?
|
|
|
|
|
That's correct. Let me explain what I want to do. I'm writing a pluin to do some sort of auditing. Now who ever consume the plugin would be setting different types of value as per need. Now I want to give them an automated sample code so that without going through the document he would know how to setup the configuration etc. Just wanted to make my plugin smart enough so that I would go even 80% - 90% client coding it's own. Ofcourse one way is code Snippet but the problem with code snippet is user can easily forget to call the snippet and it's an addition step for the user as well. So I want to physically do some coding for the user through the plugin.
Regards;
Uttam Kumar
|
|
|
|
|
|
The C# forums are not a place advertising, no matter how good you think it is.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
|
Please report his original post.
|
|
|
|
|
I have some custom controls which contains a System.Windows.Forms.Label control. I would like to be able to swap out those label controls with a third party label control. What I would like to do is the following...
#if UsingThirdPartyControls
namespace WindowsApplication4 {
public class MyCustomLabel : ThirdPartyLabel {
}
}
#else
namespace WindowsApplication4 {
public class MyCustomLabel : Label {
}
}
#endif
Now I can use MyCustomLabel in my custom controls and based on the type of build (one build will have UsingThirdPartyControls defined and another will not).
The problem is removing the reference to the third party controls. Is there a way I can programatically tell the C# compiler to remove the references to the third party assemblies. That way when I deploy my custom control the third party assemblies are not deployed because they are not required?
Chris
|
|
|
|
|
I never tried, but as of my understanding,
The Solution file ( *.csProj ) contains the sections to add reference
under ItemGroup tag these references are listed. This tag supports condition attribute.
So you can write a custom task, which executes under target BeforeCoreGet and sets the condtion attribute of reference ItemGroup accordingly.
Try to search for CustomTask for MSBuild, you found many pre built tasks contributed by communities.
Regards,
Vythees
Miles to go before sleep...
|
|
|
|
|
Wow thanks alot. I found this web site which shows that you can have a condition where if the build is set to a certain type then you can include or exclude references. Then in the build I can define something like UsingThirdPartyControls and in my code I can place #if UsingThirdPartyControls #endif.
I think this could work. Thanks alot.
Chris
|
|
|
|
|
I have an object graph that abstracts the operation of a machine. It will calculate paths, so there are several large lists of points. Currently I am using Zedgraph to plot these lists.
Originally I was using Zedgraph's PointPairList for these points. Everything worked OK. But it didn't seem proper to be so closely coupled to Zedgraph.
As an interim solution I have created PointPairLists that are identical to Zedgraph (but in my own namespace). I am having trouble casting these to Zedgraph PointPairLists. (I was hoping to avoid having to iterate through these rather large lists.)
Here is my question: Is there an elegant solution? Any helpful references or search terms would be helpful. (I did find an MSDN reference to writing custom casting operators.)
I feel like I am missing something obvious.
Thank you-
Squeak
|
|
|
|