Click here to Skip to main content
15,914,780 members
Home / Discussions / C#
   

C#

 
AnswerRe: read from serial port Pin
Alaric_26-May-10 4:09
professionalAlaric_26-May-10 4:09 
GeneralRe: read from serial port Pin
genieabdo27-May-10 22:13
genieabdo27-May-10 22:13 
QuestionStreaming images using TCP help Pin
TimSWatson26-May-10 3:32
TimSWatson26-May-10 3:32 
AnswerRe: Streaming images using TCP help Pin
Luc Pattyn26-May-10 10:47
sitebuilderLuc Pattyn26-May-10 10:47 
GeneralRe: Streaming images using TCP help Pin
TimSWatson26-May-10 21:29
TimSWatson26-May-10 21:29 
GeneralRe: Streaming images using TCP help Pin
Luc Pattyn27-May-10 2:59
sitebuilderLuc Pattyn27-May-10 2:59 
QuestionNew Bluetooth Profile Pin
ika226-May-10 3:03
ika226-May-10 3:03 
QuestionWorking with list(Please help) [modified] Pin
future383926-May-10 2:36
future383926-May-10 2:36 
Hi every1,

I am working with lists and faced with a problem.

this is the method in my first class which has implemented in DAL


 namespace Assignmnet2
  {
    [Serializable]
    class Student_Manipulation
  {
      public void ReadStudentFile(string Fr_Name, string Sr_Name, string St_Id, int Lb_Mark, int Ass1, int Ass2, int     
         Fnl)
        {
            FileStream flstream = new FileStream("c:\\student.dat",FileMode.Open,FileAccess.Read);
            BinaryFormatter BnFrmt = new BinaryFormatter();
            List<ITECH3219Student> list = (List<ITECH3219Student>)BnFrmt.Deserialize(flstream);
            foreach (ITECH3219Student ITECH3219Student in list)
            {
                Fr_Name = ITECH3219Student.Fr_name;
                Sr_Name = ITECH3219Student.Sr_Name;
                St_Id = ITECH3219Student.St_Id;
                Lb_Mark = ITECH3219Student.Lb_Mark;
                Ass1 = ITECH3219Student.Ass1;
                Ass2 = ITECH3219Student.Ass2;
                Fnl = ITECH3219Student.Fnl;
            }           
        }
}



-------------------

In BLL I have this class



namespace Assignmnet2.BLL
  {
     class Finalization
     {
       public void read(string Fr_Name, string Sr_Name, string St_Id, int Lb_Mark, int Ass1, int Ass2, int Fnl)
       {
           Assignmnet2.Student_Manipulation read = new Assignmnet2.Student_Manipulation();
           read.ReadStudentFile(Fr_Name, Sr_Name, St_Id, Lb_Mark, Ass1, Ass2, Fnl);
       }
     }
  }



----------------------

Now, in peresentation layer I have this code


private void Form1_Shown(object sender, EventArgs e)
       {
           Assignmnet2.BLL.Finalization ReadStudent = new Assignmnet2.BLL.Finalization();

           LstBox.Items.Add(ReadStudent(ITECH3219Student.Fr_name + " " + ITECH3219Student.Sr_Name + " " +

            ITECH3219Student.St_Id));





----------------
Frankly, I don't really know what I supposed to write in this layer in order to show file's information in listbox.


Could you please help me?thanx

modified on Wednesday, May 26, 2010 8:52 AM

AnswerRe: Working with list(Please help) Pin
Henry Minute26-May-10 2:40
Henry Minute26-May-10 2:40 
GeneralMessage Removed Pin
26-May-10 2:46
future383926-May-10 2:46 
GeneralRe: Working with list(Please help) Pin
Henry Minute26-May-10 2:50
Henry Minute26-May-10 2:50 
GeneralRe: Working with list(Please help) Pin
future383926-May-10 3:04
future383926-May-10 3:04 
AnswerRe: Working with list(Please help) Pin
Henry Minute26-May-10 3:36
Henry Minute26-May-10 3:36 
GeneralRe: Working with list(Please help) Pin
Alaric_26-May-10 4:02
professionalAlaric_26-May-10 4:02 
GeneralRe: Working with list(Please help) Pin
Henry Minute26-May-10 4:08
Henry Minute26-May-10 4:08 
GeneralRe: Working with list(Please help) Pin
future383926-May-10 4:17
future383926-May-10 4:17 
GeneralRe: Working with list(Please help) Pin
Henry Minute26-May-10 4:24
Henry Minute26-May-10 4:24 
GeneralRe: Working with list(Please help) Pin
future383926-May-10 18:20
future383926-May-10 18:20 
Questionreplace Winlogon Pin
einsteinmow26-May-10 1:35
einsteinmow26-May-10 1:35 
AnswerRe: replace Winlogon PinPopular
Simon P Stevens26-May-10 1:58
Simon P Stevens26-May-10 1:58 
AnswerRe: replace Winlogon Pin
Richard MacCutchan26-May-10 1:59
mveRichard MacCutchan26-May-10 1:59 
AnswerRe: replace Winlogon Pin
Dave Kreskowiak26-May-10 2:04
mveDave Kreskowiak26-May-10 2:04 
Questionread file Pin
tek 200926-May-10 1:17
tek 200926-May-10 1:17 
AnswerRe: read file Pin
Richard MacCutchan26-May-10 1:54
mveRichard MacCutchan26-May-10 1:54 
GeneralRe: read file Pin
tek 200926-May-10 2:45
tek 200926-May-10 2:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.