private void button1_Click(object sender, EventArgs e) { FileClass f1 = new FileClass(); var db = new List <FileDbStructure>(); db.Add(new FileDbStructure("Chirag Shah", "Chirag", "Shah", Usertype.Manager)); if (f1.WriteToDbFile(db)) { //Now I change the comment. MessageBox.Show("Success"); } else { MessageBox.Show("Failed"); } }
public void SaveUser(string nme, string uname, string pwd, Usertype utype) { db.Add(new FileDbStructure(nme, uname, pwd, utype)); fc.WriteToDbFile(db); }