没有记录添加到表中。这些记录不是重复的,也不是pk类型
private void btn_ok_Click(object sender, RoutedEventArgs e)
{
Customer c = new Customer();
c.CustomerName = txt_customername.Text.Trim();
c.CustomerTel = txt_telcustomer.Text.Trim();
c.CustomerAddress = txt_customeraddress.Text.Trim();
c.StartDate = lbl_Data.Content.ToString();
c.UserID = publicvariable.guserId;
database.Customers.Add(c);
database.SaveChanges();
MessageBox.Show("مشتری جدید با موفقیت ثبت شد");
}