private void SavebtnClick(object sender, EventArgs e) { var data = new Sqlmanager.Dbentry { Id = _id, Name = namebox.Text, Email = emailbox.Text, Adress = adressbox.Text, Zipcode = zipbox.Text, Country = countrybox.Text, Area = areabox.Text, Office = officebox.Text, Mobile = mobilebox.Text, Home = homebox.Text, Company = companybox.Text, Other = otherbox.Text.Replace(Environment.NewLine, "\\n") }; if(string.IsNullOrEmpty(_id)) Main.Sql.AddContact(data); else { Main.Sql.UpdContact(data); Main.ShowLast(true, _id); } _id = ""; }
private void SavebtnClick(object sender, EventArgs e) { var data = new Sqlmanager.Dbentry { Id = _id, Name = namebox.Text, Email = emailbox.Text, Adress = adressbox.Text, Zipcode = zipbox.Text, Country = countrybox.Text, Area = areabox.Text, Office = officebox.Text, Mobile = mobilebox.Text, Home = homebox.Text, Company = companybox.Text, Other = otherbox.Text.Replace(Environment.NewLine, "\\n") }; if (string.IsNullOrEmpty(_id)) { Main.Sql.AddContact(data); } else { Main.Sql.UpdContact(data); Main.ShowLast(true, _id); } _id = ""; }