|
Hi,
you are not filling the data into your db variable:
this.powertableTableAdapter.Fill(this.powerdbDataSet.powertable);
this line should be
this.powertableTableAdapter.Fill(tdb.powertable);
Regadrs
Jegan
Think! Don't write a line of code unless you absolutely need to.
|
|
|
|
|
thank you very much ,now it works perfectly
|
|
|
|
|
Hey guys, I am trying to create a matrix which allows a user to either turn a square on or off by clicking it. It needs to be 6X8 squares. So far all I can think of is creating 48 buttons, or maybe even a panel split into 48 sections? I am looking for a solution that is not too complex, so any advice on how to do start this would be much appreciated!
Thank you!
|
|
|
|
|
The answer will depend on which User Interface system you are using: Windows Forms or WPF (or web based...).
|
|
|
|
|
I am using Windows Forms!
Thanks!
|
|
|
|
|
Override panel and override the mouse click and mouse move event and OnPaint event. An array of buttons is simpler but you will be happier with results the other way. Neither Windows Forms nor WPF likes a lot of controls and the correct answer a lot of times is custom controls. With such a simple case you will have the opportunity to learn a valuable tool to put in your toolbox.
|
|
|
|
|
Thanks for your input and your advice, I appreciate it. I will look into how to do what you suggested, I am new to this kind of thing! Thank you!!!
|
|
|
|
|
I'd make a Panel or Group with Buttons. But that's just me.
|
|
|
|
|
Hi All,
I have created a program which extracts metadata out of a PST. This data has then been stored in a text file.
I am trying to create a set of charts/graphs which will represent the data which I have pulled out. Is it possible using Visual Studio 2010 to create a bar chart for example using variables or by reading specific data which I have written to the text file.
I know that VS 2010 does have the inbuilt chart feature; however, I can't seem to get it to work off values held in a variable (only from databases, a service, an object or SharePoint).
I am new to programming in C# and using Visual Studio so I may be missing something very simple! I have googled for days and have had no light.
Any assistance would be much appreciated.
Many thanks,
Katie.
|
|
|
|
|
Member 9873028 wrote: missing something very simple
Quite possibly.... but we cannot see your code to tell you what you might have missed.
|
|
|
|
|
I mean in general. I am trying to use the visual studio 2010 code generator so no code has been created yet.
Are you aware of using the visual studio chart gen by using a datasource as a set of variables?
Many thanks,
Katie.
|
|
|
|
|
Hi,
I am so confused with the research I have done. Please help me upload a file, a csv file from a certain location to a remote http server? I cannot use the file upload control.
I have tried
1. WebClient class - using the simple UploadFile method. It did not work. Kept coming back with 404 or 405 error.
2. Tried REST call with no luck.
Any simple method to transfer a file from one location to remote http server.
Thank you and much appreciated!
|
|
|
|
|
This sounds like a permissions issue. 405 indicates you aren't allowed access, "Resource not allowed".
|
|
|
|
|
Please don't bump your question, it is considered rude. If people know what the problem is they will help.
|
|
|
|
|
vanikanc wrote: I cannot use the file upload control.
Why? Technical limitation, or specs?
vanikanc wrote: Please help me upload a file, a csv file from a certain location to a remote http server?
Is there an ASP.NET (or PHP) page on the server to which to upload a file? If no, you'll need FTP.
vanikanc wrote: Any simple method to transfer a file from one location to remote http server.
FTP it is. Install a server-app, and you can upload a file by executing a DOS-command. Hard to beat that in terms of simplicity, since it can be tested without writing any code.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I do apologise for "bumping" this question.
Thank you - I will be using a bat file, called from process class to upload this file to the required server!
Thanks again!!
|
|
|
|
|
Hi,
I am using a Trackbar in my C# application. It's from DevExpress but i guess the standard one is the same..
It uses 1 as minimum SmallChange but I want the value to be 1, 1.5, 2, 2.5, 3, 3.5, etc...
How can I do this?
Technology News @ www.JassimRahma.com
|
|
|
|
|
|
If the property is and integer you can't do this directly.
What you can do is multiply by 10: 10, 15,20, 25 etc. but it will interfere with any numeric labels you might have obviously.
|
|
|
|
|
HI All,
I'm trying to set up the Unity block and I'm getting the following error:
"Given assembly name or codebase was invalid"
My setup is as follows:
private void btnUnity_Click(object sender, EventArgs e)
{
IUnityContainer container = new UnityContainer();
var section = (UnityConfigurationSection)ConfigurationManager.GetSection("unity");
section.Configure(container);
var transform = container.Resolve<ILabTest> "AddNewLabTest");
}
The App.Config is:
<unity>
<containers>
<container>
<types>
<type type="Interfaces.ILabTest, Interfaces" mapTo="DTO.LabTest.AddNewLabTest, DTO.LabTest" name="DTO.LabTest"/>
</types>
</container>
</containers>
</unity>
Any help would be appreciated. Thanks!
-- modified 5-Mar-13 8:34am.
|
|
|
|
|
Can you please update your question, it is hard to read, especially the config. Use the "code button" to highlight both the code and XML.
I'm just checking the obvious here:
Is the dll that contains the concrete class included in the project?
Does
AddNewLabTest implement
ILabTest
Both Interfaces.ILabTest.dll and DTO.LabTest.AddNewLabTest.dll exist in the target bin folder - if not everything will fail.
|
|
|
|
|
Hi KEith,
I tried the format buttons for code and markup and got the same result. The dll that contains the concrete class is included in the project. I'm not sure I have the namespace portions of the type tag correct. In the first part I have the type of interface and I'm not sure what the second portion is used for. Then in mapTo attribute I have the concrete implementation, the full namespace path to the concrete method and the namespace without the concrete method.
Thanks,
Bill
|
|
|
|
|
Bill Warner wrote: . I'm not sure I have the namespace portions of the type tag correct. In the first part I have the type of interface and I'm not sure what the second portion is used for
This is probably the problem, it makes the most sense. In general
<register type="XXXXX" mapTo="YYYYY, ZZZZZ"/>
XXXX - The name of the interface you want to map from.
YYYY - Type name
ZZZZ - The Assembly name
Lets Say you have an interface IFoo , which is implemented in a class with a name Bar , in namespace MyNamespace contained in Baz.dll:
<register type="IFoo" mapTo="MyNamespace.Bar, Baz"/>
Often the the namespace and the dll name are the same, but not always.
modified 5-Mar-13 10:15am.
|
|
|
|
|
Hi Keith,
Still no luck. In your example I don't see the second portion of the type or a name attribute. Here is what I have right now:
<type type="Frankenstein.Laboratory.Interfaces.ILabTest, Frankenstein.Laboratory.Interfaces" mapTo="Frankenstein.Laboratory.DTO.LabTest.AddNewLabTest, Frankenstein.Laboratory.DTO.LabTest" name="FrankensteinFramework"/>
|
|
|
|
|
Not the tag name should be "register", not "type" I assume this is a copy and paste error (I did this in my last post - apologies).
Type definitions have a standard format in .net:
"TypeName, [Assembly], [OtherStuff]"
I usually fully-qualify the typename (i.e. prefix it with the namespace), I don't think this is strictly necessary if the type is in the executing namespace. The stuff in "[]" is optional, you only need [assembly] if the type is not in the executing assembly IIRC (I always specify it any way) though the other stuff isn't relevant right now, for completeness you can specify something like:
"System.Diagnostics.TextWriterTraceListener, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Defines TextWriterTraceListener type in namespace System.Diagnostics . The Assembly containing the defined type is System.dll, st version 1.0.3300.0 having the neutral culture and can be verified with the supplied public key (to verify it is genuine). This definition format can apply to both your type attribute and <creadode>mapTo attribute.
Reading from your code you need to check:
Interface:
Frankenstein.Laboratory.Interfaces.dll (from the second part of the type) exists in the bin directory
Frankenstein.Laboratory.Interfaces.dll Contains an interface ILabTest in namespace Frankenstein.Laboratory.Interfaces (from the first part of type).
Mapped To Type:
Frankenstein.Laboratory.DTO.LabTest.dll (from the second part of the mapTo) exists in the bin directory
Frankenstein.Laboratory.DTO.LabTest.dll Contains an class AddNewLabTest in namespace Frankenstein.Laboratory.DTO.LabTest (from the first part of mapTo).AddNewLabTest must implement the above interface.
General:
The projects or dlls containing your mapped types need to be referenced in the project
The name is really just an identifier. Strictly you don't need it as you can use a default mapping.
What you have looks right, but without the actual project in front of me it is hard to tell. You might want to look at this article, which sets up a basic mapping step by step: http://netpl.blogspot.co.uk/2011/11/unity-application-block-is-lightweight.html[^]
|
|
|
|