需要从数据表中获取值并将值绑定到文本框
DataTable ff = new DataTable();
DataColumn Regno = new DataColumn("Regno");
ff.Columns.Add(Regno);
DataRow row = ff.NewRow();
var rg = (from data in db.receipts
select data.Regno).Max();
row["Regno"] = rg + 1;
ff.Rows.Add(row);
txt_reciptno.DataBindings.Add("text", row, "Regno");