我正在尝试使用 导入ForeignKey
值ComboBox
,但ComboBox
加载string
值和ForeignKey
类型是int
,我尝试转换ToString()
,然后出现错误:
“赋值的左侧必须是变量属性或索引器”
ShippingDocumentDataClassesDataContext dc = new ShippingDocumentDataClassesDataContext();
t_tracking newInvoice = new t_tracking();
newInvoice.SupplierId.ToString() = comboBox1.Text;
dc.t_trackings.InsertOnSubmit(newInvoice);
dc.SubmitChanges();
任何帮助,将不胜感激。