با سلام و خدا قوت
در فرم Accounting وقتی می خوام یه تراکنش اضافه کنم خطای زیر میاد
Invalid column name 'CostomerID'.
Invalid column name 'Amount'.
Invalid column name 'DateTitle'.
در ضمن این فیلد ها در دیتابیس هستن
کدی که نوشتم اینه
private void btnSave_Click(object sender, EventArgs e)
{
if (BaseValidator.IsFormValid(this.components))
{
if (rbPay.Checked || rbRecive.Checked)
{
DataLayer.Accounting accounting = new DataLayer.Accounting()
{
CostomerID = db.CustomerRepository.GetCustomerIdByName(txtName.Text),
TypeID = (rbRecive.Checked) ? 1 : 2,
Amount = int.Parse(txtAmount.Value.ToString()),
Description = txtDescription.Text,
DateTitle = DateTime.Now
};
db.AccountingRepository.Insert(accounting);
db.Save();
DialogResult = DialogResult.OK;
}
else
{
RtlMessageBox.Show("لطفا نوع تراکنش را انتخاب کنید");
}
}
سلام
متن ارور مشخصه
میگه این ستون ها درست نیست یا پیدا نمیکنه