Advertisement
Guest User

Untitled

a guest
May 26th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. void ZapiszProdukt(Produkt pr,string nazwaL)
  2. {
  3.  
  4. FileStream fs = File.Create("listy/"+nazwaL+"/"+pr.Nazwa+".prod");
  5. DodajTekst(fs, pr.Nazwa + "\r\n" + pr.Kategoria + "\r\n" + pr.Priorytet + "\r\n" + pr.Cena.ToString());
  6. fs.Close();
  7.  
  8. StreamReader sr = new StreamReader("listy/" + nazwaL + ".lista");
  9. int ilosc = Convert.ToInt16(sr.ReadLine());
  10. sr.Close();
  11.  
  12. FileStream filestream = File.Open("listy/" + nazwaL + ".lista",FileMode.Open);
  13.  
  14. DodajTekst(filestream, (ilosc + 1).ToString());
  15. filestream.Close();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement