|
Using the .NET Connector from MS page.
|
|
|
|
|
Thanks,
But cud you pls tell me HOW can i call the modules of SAP into C#.NET project.
SAP DOT NET Connector is gonna act as an INTERFACE between SAP and DOT NET, right???
so how to actually call the module of SAP into C#?
Pls help.
Thanks & Regards,
Muskaan.
|
|
|
|
|
I want to format a floating point number with accuracy 2 digits after the point, but if the number is round, to show it more friendly. For example:
if the number is 2.3, show 2.3 and not 2.30
if it's 3, show 3 and not 3.00
and if the number is 4.12345, show 4.12
What' the formatting string that I can achieve this with?
Thanks in advance
|
|
|
|
|
float number = 4.12345;
string result = String.Format("{0:00}", Math.Round(number,2));
|
|
|
|
|
Ahha! Works, but with formatting string "{0}" is better.
Thanks a lot, seems that the Round trick is the keystone here
|
|
|
|
|
I have the OnButtonClick Event inside a Form
btnGetInfo_Click(object sender, System.EventArgs e)
Here is the implementation
System.Reflection.MethodInfo mi = this.oSender.GetType().GetMethod("btnGetInfo_Click", ???);<br />
mi.Invoke(oSender, System.Reflection.BindingFlags.InvokeMethod, null, null???, null);
But how I can implement the parameters - object sender and System.EventArgs e ?
|
|
|
|
|
<br />
System.Reflection.MethodInfo mi = this.oSender.GetType().GetMethod("btnGetInfo_Click", ???);<br />
the overload list for GetMethod provides several possible parameterlists.
if there is only one method btnGetInfo_Click inside your form, you can call GetMethod only with your methodname. otherwise you have to pass the types of your parameters:
<br />
System.Reflection.MethodInfo mi = this.oSender.GetType().GetMethod("btnGetInfo_Click");<br />
or
<br />
System.Reflection.MethodInfo mi = this.oSender.GetType().GetMethod("btnGetInfo_Click", new Type[]{typeof(object),typeof(EventArgs)});<br />
<br />
mi.Invoke(oSender, System.Reflection.BindingFlags.InvokeMethod, null, null???, null);<br />
the forth parameter needs an array of parameters for "sender" and "e".
<br />
mi.Invoke(oSender, System.Reflection.BindingFlags.InvokeMethod, null, new object[]{null,null}, null);<br />
|
|
|
|
|
|
Hi I hope someone can help
I am creating a C# project that stores data into an Access database.
I have created a dataset using an OleDbDataAdapter with a sql select statment
"SELECT table.* FROM table
This table has a long Interger autonumbering ID key field, 1 text field, 1
Long Interger field, and 31 Double fields.
I then use the Commandbuilder object to create the Insert, delete and update
commands.
The Insert command seems to work ok as I can create a new row and use the
OleDbDataAdapter.update( ); with now problems
My problem is that I get Syntax error (missing operator) when I attempt to
update a record set after deleting a row.
After this I introduced a dataGrid control and connected this to the dataset
and all the data seems to be ok.
I have other tables in my project that a treated in a similar mannor and
these seem to delete rows ok. The only thing is that these other tables have
less fields but thats the only differance that I can see.
Any ideas?
--
All the best
Hawkmoth
All the best
Hawkmoth
|
|
|
|
|
Hawkmoth wrote:
My problem is that I get Syntax error (missing operator) when I attempt to
update a record set after deleting a row.
What does your SQL statement look like when you run the update statement? Have you tried to run the update statement within Query Analyzer?
|
|
|
|
|
Hi Nick
Thanks for your help.
The select statment below is from the adaptor right before the updating.
The Delete command is generated from the CommandBuilder.
I will take a look at the analyser. (Not something I've ever used before!!).
SELECT Spex.* FROM Spex
DELETE FROM Spex WHERE ( (spex_id = ?) AND ((? = 1 AND Std_Name IS NULL) OR (Std_Name = ?)) AND ((? = 1 AND ID IS NULL) OR (ID = ?)) AND ((? = 1 AND 400nm IS NULL) OR (400nm = ?)) AND ((? = 1 AND 410nm IS NULL) OR (410nm = ?)) AND ((? = 1 AND 420nm IS NULL) OR (420nm = ?)) AND ((? = 1 AND 430nm IS NULL) OR (430nm = ?)) AND ((? = 1 AND 440nm IS NULL) OR (440nm = ?)) AND ((? = 1 AND 450nm IS NULL) OR (450nm = ?)) AND ((? = 1 AND 460nm IS NULL) OR (460nm = ?)) AND ((? = 1 AND 470nm IS NULL) OR (470nm = ?)) AND ((? = 1 AND 480nm IS NULL) OR (480nm = ?)) AND ((? = 1 AND 490nm IS NULL) OR (490nm = ?)) AND ((? = 1 AND 500nm IS NULL) OR (500nm = ?)) AND ((? = 1 AND 510nm IS NULL) OR (510nm = ?)) AND ((? = 1 AND 520nm IS NULL) OR (520nm = ?)) AND ((? = 1 AND 530nm IS NULL) OR (530nm = ?)) AND ((? = 1 AND 540nm IS NULL) OR (540nm = ?)) AND ((? = 1 AND 550nm IS NULL) OR (550nm = ?)) AND ((? = 1 AND 560nm IS NULL) OR (560nm = ?)) AND ((? = 1 AND 570nm IS NULL) OR (570nm = ?)) AND ((? = 1 AND 580nm IS NULL) OR (580nm = ?)) AND ((? = 1 AND 590nm IS NULL) OR (590nm = ?)) AND ((? = 1 AND 600nm IS NULL) OR (600nm = ?)) AND ((? = 1 AND 610nm IS NULL) OR (610nm = ?)) AND ((? = 1 AND 620nm IS NULL) OR (620nm = ?)) AND ((? = 1 AND 630nm IS NULL) OR (630nm = ?)) AND ((? = 1 AND 640nm IS NULL) OR (640nm = ?)) AND ((? = 1 AND 650nm IS NULL) OR (650nm = ?)) AND ((? = 1 AND 660nm IS NULL) OR (660nm = ?)) AND ((? = 1 AND 670nm IS NULL) OR (670nm = ?)) AND ((? = 1 AND 680nm IS NULL) OR (680nm = ?)) AND ((? = 1 AND 690nm IS NULL) OR (690nm = ?)) AND ((? = 1 AND 700nm IS NULL) OR (700nm = ?)) )
All the best
Hawkmoth
|
|
|
|
|
I've been looking all over for a code sample of a nonvisual control, and searched through MSDN with no luck so far. Does anyone have some sample code or a link to a good article on how to implement a nonvisual control(I think they previously were called invisible-at-runtime.) For those who don't know what I'm talking about, I need the same design time behavoir as the OpenFileDialog where when you drag it onto a form, it gets placed below the form in the designer, and is never seen by the user. Thanks in advance for the help.
|
|
|
|
|
You can simply derive your class from Component. That way you get designer support but don't have a control shown at runtime.
Regards,
mav
|
|
|
|
|
How can i Create a Custom Browser with Internet Browsing facility.it must also have the options for Blocking some websites.
for the above requirement which type of application(a windows application or an ASP.net application)must i use.
i want to do the whole thing in C#.net
|
|
|
|
|
arun_appu wrote:
windows application
|
|
|
|
|
Hello Friends,
I want to create a "Temp" folder at my IIS web server with proper rights, so that any user can upload some files to that folder.
But I don't want to do this manually, I want a pieace of code so that this activity can be done. I tried for :
System.DirectoryServices namespace
but still facing proble for specifing path name in :
De.Path = @"IIS://localhost/W3SVC1/1/ROOT/WebDashboard/temp";
will anybody help me out for this issue?
Thanks in advance.
|
|
|
|
|
Hi Friends I am Fecing Problem for getting Sum of group field.
Explaination:
I have Group field, and in which i am getting recod by using some formula.Like this
------------------------------------------------------------------------------------------------
Room name |Jan05|Feb05|Mar05|...........upto |Dec05| Room name is group field
------------------------------------------------------------------------------------------------
Room1 |12.09|23.09|45.98|.................
------>these values calculated by formula
Room2 |34.00|34.00|90.00|.................
------------------------------------------------------------------------------------------------
Average | ? | ? | ? |
------------------------------------------------------------------------------------------------
When i am going for avg of Jan 05. i would not find these fields for grand total or summary
because its told that it would be calculate at run time.
then i have used this one
WhilePrintingRecords;
NumberVar GrandInvTotal;
numberVar array Input={@RoomOccupancyForMonth1}; --->(RoomOccupancyForMonth1) this field is related to calculate value by using formula
but it only print last record
so please any one find solution help me.
vikram
|
|
|
|
|
I want to help myself improving the code writing process. So I write an application like Visual Assist.
At first, my target is a small module that support suggesting the local variable in a method: when I type "local." all local variable declared for that method appear, so I can select one.
But I don't know how to get reference to the code pade *.cs to get all local variables and catch the event when I typing on that page.
Can anyone help me?
thanks!
|
|
|
|
|
hallo.. i need fast help please iam computer eng student
i design antivirus porgram as graduted project but the problem that i face i need database or small database about each virus includeing ..his signature ... his location ...and any help information that help me to clean the virus
thaaaaaaaaaaaaaaaaaaaaaaaaank you
|
|
|
|
|
I need to know if there is a way to grab the color of a specific pixel on the screen in C#, if there is, how?
|
|
|
|
|
I need to run a cleanup routine before system shutdown. How can I catch the system shutdown event in my C# application?
Martin
|
|
|
|
|
Look at the SystemEvents class.
|
|
|
|
|
I found another way to do it.
protected override void WndProc(ref System.Windows.Forms.Message m)
{
// defined in winuser.h
const int WM_QUERYENDSESSION = 0x0011;
switch(m.Msg)
{
case WM_QUERYENDSESSION:
//////////////////
// cleanup section
//
//////////////////
base.WndProc(ref m);
break;
default:
base.WndProc(ref m);
break;
}
}
Thank you "the last free name" for your suggestion!
|
|
|
|
|
Hi all,
For a while I want to do something with MS Outlook (2003). I have this 'great' idea of adding data from objects which are connected to the email. An example;
If I was writing a email message to John Doe and I wanted to display his working location. Normally I would have to go into his contact details and look it up. This whole process could be done faster. By making a system like the code insight in MS Visual Studio ( you know; when you press 'sys' and a dropdownbox already displays system). People would type something like [recpient].worklocation and when the email is send, my tool replaces the [recpient].workLocation with John Doe's real work location.
Now for my problem. Since I'm new to Office programming I just started reading almost everything on it. I know about the six Outlook API's and the Office addin system. But still I cant get to the email typing part. I know a 'dirty' way with hooks but that’s my last resort. I want to design this clean. So how do I make a Office Add-in which monitors the typed text in MS outlook? And how can I modify the emailed text before sending?
Well that’s it, I hope someone can help me. I would really like to know more about Office development so any hints/tips/urls are welcome.
|
|
|
|
|
I have a checkedlistbox control which i am pupulating from a table.I am saving the value as a string in which all the values selected are concatenated and stored into sa sting feild in database. Saving is no problem. But i want that stored values should be automatically selected on form load but it is'nt doing this.No Error nothing but the values previously seleted are not selected now.
I am posting my both functions
public static string SetValueFromListBoxes(CheckedListBox lst)
{
string strCheckedValues;
strCheckedValues="";
string strStringCheckedValues="";
for(int i=0;i
|
|
|
|