|
You don't need the parameters because you aren't using them.
As I said in my previous reply, you are not passing any data in them and they are not configured to return any data.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
Hi Every One,
I write this code and as you said I fixed it up(Follow your instruction).
but I got a problem
Error1: Cannot implicitly convert type 'string' to 'System.Collections.Generic.List<Assignmnet2.ITECH3219Student>' C:\Assignmnet2\Frm_View.cs
Error2: 'Assignmnet2.BLL.Finalization.read()': not all code paths return a value C:\Assignmnet2\BLL\Finalization.cs
Error3: Since 'Assignmnet2.Student_Manipulation.ReadStudentFile()' returns void, a return keyword must not be followed by an object expression C:\Assignmnet2\DAL\Student_Manipulation.cs
this is the code which I have modified it.
class studentmanipulation which is in DAL
public void ReadStudentFile()
{
FileStream flstream = new FileStream("c:\\student.dat", FileMode.Open, FileAccess.Read);
BinaryFormatter BnFrmt = new BinaryFormatter();
List<ITECH3219Student> list = (List<ITECH3219Student>)BnFrmt.Deserialize(flstream);
return list;
}
------------------------------------
Class finalization which is in BLL
public string read()
{
Assignmnet2.Student_Manipulation read = new Assignmnet2.Student_Manipulation();
read.ReadStudentFile();
}
----------------------------
and Presentation Layer which is my form
private void Form1_Shown(object sender, EventArgs e)
{
Assignmnet2.BLL.Finalization ReadStudent = new Assignmnet2.BLL.Finalization();
List<ITECH3219Student> studentList = ReadStudent.read();
foreach (ITECH3219Student student in studentList)
{
LstBox.Items.Add(student.Fr_name + " " + student.Sr_Name + " " + student.St_Id);
}
}
|
|
|
|
|
I just finished a graphical password system and want to use it on my computer instead of the winlogon. Can anyone offer help
|
|
|
|
|
Windows XP, 2000 and server 2003 use a system called Graphical Identification and Authentication (or GINA). It is possible to replace the default MSGina.dll with a custom dll to customize the login and authentication process.
You can read more about GINA and the Winlogon system on MSDN[^].
Windows Vista, 7 and server 2008 no longer use GINA. Instead Winlogon controls the logon process and allows custom credential providers.
Again, there is lots of information about custom credential providers on MSDN[^].
You might also want to read the wikipedia articles on Winlogon[^] and GINA[^] for some basic background info.
You are asking this in the C# forum, but this kind of windows integration is going to need to be done largely (if not completely) in an unmanaged language. There is an MSDN magazine article on custom credential providers that should get you started[^].
Simon
|
|
|
|
|
Some useful information here[^]; it's amazing what you can find when you try looking.
It's time for a new signature.
|
|
|
|
|
and you cannot replace GINA with managed code, i.e.: a C# .DLL.
|
|
|
|
|
I would like to fill a class from a text file as struture:
1000, n, km 5
description
and so on
knowing that the two lines represents a line of Class
then how to assign each value (1000, n ,...) for each variable in the class???
thank you in advance
|
|
|
|
|
Read the text file, parse the data, and add it to objects of your class. You can create your objects either by a constructor or by setters for specific properties.
Which part of this are you having difficulty with?
It's time for a new signature.
|
|
|
|
|
in the parse the data where I have the problem, I used to read the file:
string[] lines = System.IO.File.ReadAllLines(@"file.txt");
foreach (string line in lines)
{
Console.WriteLine("\t" + line);
}
|
|
|
|
|
Well that's very interesting but what is the problem?
It's time for a new signature.
|
|
|
|
|
i d'ont know how to parse the data from de file line by line, if you can complete the code , thank you
|
|
|
|
|
tek 2009 wrote: i d'ont know how to parse the data from de file line by line, if you can complete the code , thank you
Good try, but we are not here to write your programs for you. Take a look at the System.String[^] class and make use of some of its methods to get the results you are looking for. If you really don't know how to get started then try working through this book[^] which contains lots of useful tutorials.
It's time for a new signature.
|
|
|
|
|
Hi All,
I have a Form with a Datagridview. The datagridview contains more columns than in the visible area.
Now to my problem:
If I scroll to the right of the datagridview and then select a row or multiple rows the datagridview moves to the left so that the first columns are in the visible area. I would like to keep the columns currently shown to stay in the visible area.
I hope my question is clear and someone can help me.
Thanks
Andre
|
|
|
|
|
It is default behavior of datagridview control.
You cannot change it.
There are two tricks to avoid it.
1. You need to minimize the number of columns to display by hiding some of the columns.
DataGridView1.Columns[2].Visible=False;
2. You can change the order of columns so that the columns that require to be visible
for selecting rows comes first so no need to scroll to right side of the grid.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
|
Do not cross post in multiple forums. It is considered rude and make it very difficult to colaborate on answers.
I already answered your question in the VB.NET forum.
|
|
|
|
|
And I have in Q&A
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
Thank you both...
I removed the message.
|
|
|
|
|
i'm trying to trigger the mouse right click event on a from control , and i know we can use the context menu, but i don't need a context menu i just want get some data when mouse right click is done on a record of the gridview , how can i catch the mouse right click, any idea ...
|
|
|
|
|
Use the mousedown event and check the eventarguments to see if it's the right button that is clicked.
Good Luck
|
|
|
|
|
Both left and right click can be trapped by using the MouseDown event.
Various mouse down events are trapped in the code below.
private void form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) <br />
{<br />
Point mouseDownLocation = new Point(e.X, e.Y);<br />
<br />
string eventString = null;<br />
switch (e.Button) {<br />
case MouseButtons.Left:<br />
eventString = "L";<br />
break;<br />
case MouseButtons.Right:<br />
eventString = "R";<br />
break;<br />
case MouseButtons.Middle:<br />
eventString = "M";<br />
break;<br />
case MouseButtons.XButton1:<br />
eventString = "X1";<br />
break;<br />
case MouseButtons.XButton2:<br />
eventString = "X2";<br />
break;<br />
case MouseButtons.None:<br />
default:<br />
break;<br />
}
My signature "sucks" today
|
|
|
|
|
How to Split a DataGridView using C#?
|
|
|
|
|
How you want to split datagridview ?
Do you want to provide paging in datagridview ??
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Hi all,
I have an scenario, I have to merge some dynamic content (to say data retrived from DB) in an existing word document without losing the existing content in that document. So that when ever there is a new conent, i use the same word document file and append my content. Please suggest me how to do this, else provide me some URL to learn and do using C#.
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|