|
Looks like you are in an infinite loop - is this what you are trying to do?
DataTable dt = new DataTable();
string[] arrEmpIDs = strEmpID.Split(',');
DataRow dr = dt.NewRow();
for (int q=0; q < arrEmpIDs.Length; q++)
{
dr[q] = objDSPHContribRep.fgetEmpPhilHealthInfo(arrEmpIDs[q]);
}
dt.Rows.Add(dr);
return dt;
Jon Humphreys
ActivePlanet Software
Bangkok, Thailand
|
|
|
|
|
Hi! Thanx for the post!
Im not arguing or anything i was just wondering if i remove
dt.Rows.Add(dr);<br /> from the loop won't the program just add 1 long row instead of 10 short rows? oh yeah and since the program originaly hangs at dr[q] = objDSPHContribRep.fgetEmpPhilHealthInfo(arrEmpIDs[q]); upon debugging what would prevent it from stalling this time? pardon me for asking so much questions im still new at this and im thankful for al your helps
Aim small, miss small...
|
|
|
|
|
Hi Friends,
I am creating MDI(Multiple Document Interface) windows application. In the starting I show a login form while my main Menu of the parent form is disabled(I had set enabled property of menu items to false).
After successful login, I want to enable the Main menu items.
The problem is that I am unable to access the enabled property of the menu items of my main menu from my code.
Plz suggest the way to access the Enabled property of menu items.
Thanks,
Sandeep
+919891027854
|
|
|
|
|
MudkiSekhon wrote: The problem is that I am unable to access the enabled property of the menu items of my main menu from my code.
Huh? Why is that so?
Alternatively, you could try leaving the menu items enabled by default and making the login dialog modal.
Cheers,
Vikram.
|
|
|
|
|
I want that in the starting, the user will not see any menu item enabled and when the child form(Login form), the login button is clicked In that I could apply the logic that if the logic is successful, then the menu items will be enabled at run time.
I want to access the enabled property of the menu of Parent form in the Login button click event of the child form.
Thanks,
Sandeep
+919891027854
|
|
|
|
|
#1 If the login dialog is made modal, how does it matter if the menu is enabled or not?
If you do not want to make the login dialog modal for some reason:
#2 Instead of trying to access the controls from the login dialog, why don't you do it once the dialog is closed? Depending on the return value (which I suppose you use to indicate login success/failure), you can enable the menu or anything you want.
HTH.
Cheers,
Vikram.
|
|
|
|
|
I am sending u the whole scenario what I am doing.
In the declarations of Parent form, I am declaring:
private Form2 LoginForm;
public static int CustomerID;
and I had set "IsMdiContainer" property to true
In the Form Load event of Parent Form Form1:
this.LoginForm = new Form2();
LoginForm.MdiParent = this;
LoginForm.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade);
LoginForm.Show();
Now in the button click event of Child form Login Form:
string Username = txtUserName.Text;
string Password = txtPassword.Text;
Form1.CustomerID = authenticateCustomer(Username,Password);
this.Close();
Thanks,
Sandeep
+919891027854
|
|
|
|
|
Sandeep, I saw your post below saying you were successful, but it never hurts to learn new ways... right?
From within the password dialog, this.MdiParent will give you a reference to your main form. You can use this to enable/disable the menu.
Alternatively, when you authenticate the user, set the form's DialogResult property to DialogResult.Yes or DialogResult.No. In your main form, after the line where you show the login dialog, check the return value and enable the menu again.
Cheers,
Vikram.
|
|
|
|
|
Thanks Vikram,
ur idea of making the login dialog modal worked very well. Initially I also had the same idea, but at that time I got the error, I dont remember what was that. I think i had not set IsMdiContainer prperty true at that time.
But now ur idea worked very well...........
Thanks,
Sandeep
+919891027854
|
|
|
|
|
Hi,
I would like to diplay ToolTip for the items in the ComboBox in ASP.NET. The ToolTip should be same as that of the items in the ComboBox.
Can any one Help on this probnelm.
Advance Thanks to Everyone
Sahu
|
|
|
|
|
Hi
I have one Solution file(.sln) which consists of 3 projects files,in that many number of .cs files
so let me know i want to execute only one file in one project,,in Visual studio 2005 beta 2 version..
cheers
Sridevi
Sridevi
|
|
|
|
|
What kind of file?
You can never execute a single file in a project. If you are creating a windows application, you can only execute the application itself. If you are creating a web application, you can execute any of the pages, but a page normally is the result of several files.
---
b { font-weight: normal; }
|
|
|
|
|
ok thank u sir,I created windows application ,which i added class files(.cs) so i want to indidual class file execution?
possible or not?
or
-->how to add/write class files in C# template without using windows application or console applications?
Sridevi
|
|
|
|
|
sridevi2005 wrote: i want to execute only one file in one project
So, you want to execute just one cs file within one project? Is that right?
For what purpose? If it is just for testing then you might like to look at a testing framework like NUnit. While it won't execute the single file you can use it to invoke methods in the class in the file through a test fixture that you build.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
yaaa exactly sir for testing & i am asked indidual file(.cs) execution also this is not possible naa?
already i wrote class with TextFixtures & test cases,,so i used NUnit but how to execute single class file in testing
sorry for the distbance
Thanks & Regards
Sridevi
Sridevi
|
|
|
|
|
NUnit comes with a number of samples to show you how it works, an a quick start tutorial[^]
You create a TestFixture class in a test assembly. This class will have a number of Tests. The test methods create the class you want to test, called the class-under-test (CUT) and invoke methods on it. You can then set up various assertions to see if the test ran as expected. If you are unsing NUnits GUI runner then you get a nice green bar if everything went okay. Or a red bar if it failed.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Thank you very much,actually my test class is in windows application,i think ,i have problem,now i have changed to class library which added to class so that is the dll naa
ok i will proceed further thanks for good suggestions gave to me with intime..
Thanks & regards
Sridevi
Sridevi
|
|
|
|
|
Hi all,
Someone say that, C# is stronger than VB.Net.
What do you think?
Can you help me to list the strength of C# that VB.Net hasn't.
Nice day.
Thanks.
inew
|
|
|
|
|
How do I retrieve a list of all the objects created in the currently running application?
I want to perform some resource validation routines as our application is running.
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
|
|
|
|
|
use this.Controls[]
i hope it can help you.
|
|
|
|
|
I doubt it. I think he wants a reference to *each and every* object that his program creates. AFAIK, there's no way to do this.
Cheers,
Vikram.
|
|
|
|
|
hey you guys know any nice approach in providing helps with my windows application? I saw the microsoft word help. and it's really nice. but I'm not sure how you have those links if it's in a richtextbox control.
any suggestions much appreciated!
thanks!
|
|
|
|
|
FieldInfo[] fi44 = obj.GetType().GetFields();
for(int j = 0; j < fi1.Length; j++)
{
object obj3 = fi44[j].GetValue(obj);
}
I am using this code to retrieve objects using reflection. For certain values of j the object is of type System.Array. I want to retrieve the individual elements in the array. If i use the quick watch tool i see that the obj3 has elements defined as obj3[0] in the quick watch window.
How do i go about converting the object obj3 into an array if it is of type system.array.
Any help or references will be greatly appreciated.
thanks
subbu
|
|
|
|
|
I'm getting an exception that looks like below when my debug C# app calls
into my debug C++ dll (which uses the MS CRT, debug dll).
Apparently if I go to the Menu>Debug>Exceptions>Managed Debugging Assistants
and unchecked Loader Lock checkbox, the exception goes away but I get a
message saying that I'm trying to use a dll that's loading the CRT without a
manifest file.
This must all be part of this new manifest side-by-side stuff that is
introduced in VS2K5. However I am not getting this problem when I run the
release build of my solution and I cannot for the life of me figure out what
Microsoft wants you to do here. All I want to do is call into my dll, why has
this become so hard to do in the new version of VS.NET ??
Loader Lock was detected:<br />
Attempting managed execution inside OS Loader lock. Do not attempt to run <br />
managed code inside a DllMain or image initialization function since doing so <br />
can cause the application to hang.<br />
-- modified at 18:14 Monday 5th December, 2005
|
|
|
|
|