using E_contact.econtactClasses; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace E_contact { public partial class Econtact : Form { public Econtact() { InitializeComponent(); } \\ the eror is coming from here contactClass c = new contactClass(); private void textBox1_TextChanged(object sender, EventArgs e) { } private void btnAdd_Click(object sender, EventArgs e) { //get value from the input fields c.FirstName = txtboxFirstName.Text; c.LastName = txtboxLastName.Text; c.ContactNr = txtboxContactNumber.Text; c.Adress = txtboxAdress.Text; c.Gender = cmbGender.Text; bool success = c.Insert(c); if(success==true) { MessageBox.Show("Contact Inserted"); } else { MessageBox.Show("Failed to add New Contact. Please try Agian"); } } private void textboxContactNumber_TextChanged(object sender, EventArgs e) { } } }
Improve Question
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)