Ejemplo n.º 1
0
        public void Deserialise()
        {
            filename         = Server.MapPath("~/App_Data/dentistslistdata.ser"); //decalring the path to the serializedfile
            dentistslistdesr = new List <Dentist>();                              //am creating an instance variable
            using (FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.None))
            {
                //opening afile stream to readfrom the file in the given path

                BinaryFormatter bf = new BinaryFormatter();
                dentistslistdesr = (List <Dentist>)bf.Deserialize(fs);
                fs.Close();
            }

            GridViewDList.DataSource = dentistslistdesr;
            GridViewDList.DataBind();
        }
Ejemplo n.º 2
0
 public void UpdateDentistGridView()
 {
     GridViewDList.DataSource = dentistslist;
     GridViewDList.DataBind();
 }