|
Hi,
How apply comman Scrollbar for Two Treview control in C#
Please Replay me Asoon as possible
Thanks
|
|
|
|
|
Why not put both the treeview in a single panel and implement scroll bar
for that panel.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Good Morning All
Am a vb.net Developer and i have been here for sometime, but on vb.net and SQl forums, its my first time in C# Forum. Am new to C#, i want to learn C# as well. i have done some C++ and Java academicaly but never used them for Professional purposes. so C# doesnt look strange to me. i have Books on C# and have Downloaded some good E-books on C#.The question i want to ask is OOP's related. In vb.net i separate my application in Tiers, i will have a DAL ---> BLL-->PL(Presentation Layer), i create functions that will return or manupilate data in the DAL and Call them from a BLL and again Call them from PL by creating an object of a class, to do that in vb, we add a reference to a Project, i have tried that in C# and its there. Now my Problem is like this. Lets say i have the following DAL Project in my Solution that has a class that looks like this
<br />
<br />
namespace DAL<br />
{<br />
public class DAL<br />
{<br />
<br />
<br />
string GetInfo()<br />
{<br />
string name = "Vuyiswa";<br />
<br />
return name ;<br />
<br />
}<br />
}<br />
}<br />
<br />
And another Project in BLL, that a class that looks like
<br />
namespace BLL<br />
{<br />
public class BLL : DAL <br />
{<br />
<br />
DAL.DAL objref = new DAL.DAL() ;<br />
<br />
<br />
string Fname;<br />
<br />
Fname = objref.Getinfo()
<br />
<br />
}<br />
}<br />
<br />
As you can see the BLL code is not Complete, i have created an object of a class and i have set a reference to a DAL Project and i have inherited from the DAL , but when i try to use the method of a DAL class from the DAL Project in the Code. i know in C# we have the Main method, lets say where methods and function are called used. Do i have to create a main function for every Project, as in this case, the project DAL will not execute those functions they will be executed from the BLL
What is the difference between the C# and Vb.net in that matter
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
you don't have to inherit BLL from DAL
just add a reference of your DAL in your BLL and than declare a object of DAL class... and there you go..
but first confirm that DAL class functions have public access modifier.
|
|
|
|
|
Thanks man,
Look at thing
<br />
<br />
namespace DAL<br />
{<br />
public class DAL<br />
{<br />
<br />
<br />
public string GetInfo()<br />
{<br />
string Fname = "Vuyiswa";<br />
<br />
return Fname ;<br />
<br />
}<br />
}<br />
}<br />
<br />
And i have referenced it and see and never worried about inheritance, and try to call the DAL Functions like
<br />
namespace BLL<br />
{<br />
public class BLL<br />
{<br />
string Fname ;<br />
<br />
DAL.DAL objDAl = new DAL.DAL() ;<br />
<br />
objdal.GetInfo();<br />
<br />
<br />
}<br />
}<br />
<br />
From the Above Code, am Successfully creating an object of a class DAL and i want to call the DAL Function Getinfo() and the intelisense does not even popup to give me confidence that the object is realy referenced
to the DAL Class.
what is wrong that am doing?
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Is that a direct copy paste? Unlike VB, C# identifiers are case sensitive... objDAl and objdal are not the same thing
|
|
|
|
|
hi
you are right i have changed it to be the same, but still intellisense has not Confidence in that line. look at the way i created the Objected of a class. do you see anything wrong.
i know difference between vb and C# it will be like this
vb.net
<br />
<br />
dim objDAL as new DAL.DAL <br />
objDAL.GetInfo()<br />
<br />
C#
DAL.DAL objDAl = new DAL.DAL() ;<br />
<br />
objDAl.GetInfo();
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
You only need a main method in the project that is the actual application. The main method is the starting point of the application, so a library project doesn't have a main method.
It works exactly the same way in VB.NET, but there the file with the main method might not be visible by default.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks man
i think that nice.
Now for in case in this Situation i want to call the Functions of a BLL in my front end (form) and if double click the form to see the code i will see the same thing i used to see in vb, i means the form load event or so on, what happens to the main Function, should i create my own or should i continue the way i did in vb and code on events ?
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
When you create an application project, the main method is created for you. For a windows form application, the main method creates a form and runs it.
As long as the application uses that form as main form (simply runs as long as that form is open), you don't have to bother with the main method at all, just use the events in that form.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi man
Then it will be very easy to convert to C# from vb.net. thanks man, am still wondering whats happening to that object of the DAL class that does not give me an option to use the function in the DAL
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
If you compile the code, the error message will tell you that you can't call the method because it's private.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks man
i saw the Problem,and i have been doing a lot of reading on C# i understand better than last week, hey if i have Problems i will contact you guys .
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi ppl,
I am working on a project where excel sheet has to be generated.
In the end i have added this piece of code.
theWorkbook.SaveAs(SourceFile, Type.Missing, "", "", false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlExclusive, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
ExcelObj.Quit();
Marshal.ReleaseComObject(ExcelObj);
theWorkbook = null;
ExcelObj = null;
but somehow its not removing the excel frm TM. and when i try to generate Excel again it gives error "Its already used by some program"
--Naina
Still Debugging the past?..I have already coded the future..
|
|
|
|
|
|
No..
I did not get the clue how to solve this problem....
--Naina Still Debugging the past?..I have already coded the future..
|
|
|
|
|
You are trying to release only the excel object. Whcih actually houses the workbook object which again houses the sheet objects.
Just by releasing the excel object the other object may not be releases and the excel object remains in the memory.
If you can have a look in this article by antony100
(http://www.codeproject.com/KB/office/ReleaseExcelObject.aspx)
He is calling the Marshal.ReleaseComObject(Reference); against workbooks then against the excel object.
You will need to do the same to get the excel disposed from the mem.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
<asp:hyperlinkcolumn>
HeaderText="Employee ID"
DataNavigateUrlField="EmployeeID"
DataNavigateUrlFormatString="./thispage.aspx?EmployeeID={0}"
DataTextField="EmployeeID"
Target="_self"
/>
if i know the name replay to me
|
|
|
|
|
You ought to be more clear with your query to get a quicker and faster resilent response.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
<asp:buttonfield buttontype="Link" commandname="Click" headertext="TT Number" datatextfield="tickno" controlstyle-font-underline="false">
when i click a link Button,particular text -->how to pass ?
in grid view..if u konw the code replay to me..
|
|
|
|
|
What you are looking is not clear
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
<asp:gridview id="GridView1" runat="server" onrowcommand="GridView1_RowCommand" autogeneratecolumns="false" datakeynames="tickno">
<columns>
<asp:buttonfield buttontype="Link" commandname="Click" headertext="TT Number" datatextfield="tickno" controlstyle-font-underline="false">
----> this button display my table field but when i click this button
how to be get that field date.it is clear.....
<asp:boundfield datafield="tickno" headertext="TT Number" sortexpression="TT Number" visible="false">
<headerstyle forecolor="#022602">
|
|
|
|
|
You can store the value in a Session variable if you are working with web application.
|
|
|
|
|
I am trying to do it with des algorithm, but while decrypting that encrypted string correpting. If any on have any examples please post here it is very urgent
Thanks and Regards,
sudhakar venati,
Mob: 0 984 55 989 71.
|
|
|
|
|
Hey Guys!
I downloaded the source code to Paint.Net by Rick Brewster. While browsing the code, I noticed that some the classes are being passed by Type. The method that accepts the type then must cast it into a physical class. Here's an example:
private void SetPage(Type pageType)
{
ConstructorInfo ci = pageType.GetConstructor(Type.EmptyTypes);
object obj = ci.Invoke(new object[0]);
WizardPage page = (WizardPage)obj;
...
If this method more efficient, I'll be making some changes to my code. Can anybody give the scoop on this?
Thanks,
Richard
If you could rent a programmer a hour and a half for a dollar and a half, how much would he charge for 10 hours?
|
|
|
|