public void SetDetails(string prName, string prSpeciality, string prPhone, byte prSortOrder, clsWorksList prWorksList, clsArtistList prArtistList) { txtName.Text = prName; txtSpeciality.Text = prSpeciality; txtPhone.Text = prPhone; theArtistList = prArtistList; theWorksList = prWorksList; sortOrder = prSortOrder; UpdateDisplay(); }
private void frmMain_Load(object sender, EventArgs e) { try { _ArtistList = clsArtistList.Retrieve(); } catch (Exception ex) { MessageBox.Show(ex.Message); } UpdateDisplay(); }
private void Retrieve() { try { System.IO.FileStream lcFileStream = new System.IO.FileStream(fileName, System.IO.FileMode.Open); System.Runtime.Serialization.Formatters.Soap.SoapFormatter lcFormatter = new System.Runtime.Serialization.Formatters.Soap.SoapFormatter(); theArtistList = (clsArtistList)lcFormatter.Deserialize(lcFileStream); UpdateDisplay(); lcFileStream.Close(); } catch (Exception e) { MessageBox.Show(e.Message, "File Retrieve Error"); } }
public static clsArtistList Retrieve() { clsArtistList lcArtistList; try { System.IO.FileStream lcFileStream = new System.IO.FileStream(_fileName, System.IO.FileMode.Open); System.Runtime.Serialization.Formatters.Binary.BinaryFormatter lcFormatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); lcArtistList = (clsArtistList)lcFormatter.Deserialize(lcFileStream); lcFileStream.Close(); } catch (Exception e) { lcArtistList = new clsArtistList(); throw new Exception(e.Message + " File Retrieve Error"); } return(lcArtistList); }
public clsArtist(clsArtistList prArtistList) { theWorksList = new clsWorksList(); theArtistList = prArtistList; EditDetails(); }