thanks Poils, It works fine.
faisal khanani
Posts
-
Windows Form -
Windows FormI have come across with a little problem that must be simpler for you guys; As a matter of fact, i m new in .Net/C# environment, hence i m facing a little bit difficulty in writing code. I have a form (Non-MDI); on its next button after successfull execution of a method i have to open a new form and for doing this i have written the following code: DBSecurity.DBSecurity msecure=new DBSecurity.DBSecurity(strServer,strUser,strPwd,strDatabase); if (msecure.Generate(txtCompany.text,txtLocation.Text)==true) { SecurityGUI.frmGUI frm=new frmGUI(); frm.ShowDialog(); this.Close(); } this code works fine as far as frmGUI form opening is concerned but it do not close the existing form and it still open on back. Am i writing wrong code? or do you have another solution?
-
Problem with function argumentthanks Matt but i can not declare Agent type in this function, because it is defined in data layer that do not have reference of business layer. therefore, i have to declare object type. :)
-
Problem with function argumenti am working on a project in which i'm dealing with business layer and data layer where business layer has a reference of data layer. when business layer call a function of data layer sending ref object variable as parameter function signature in data layer is: "public bool add(ref object objagent)" this ref object variable is actually an instance of business layer class, but when i proceed with function assigning values like: string stragentname; stragentname=objagent.agentname; upon complilation it gives me error:"object doesnot contain a definition for agentname"