protected void btnAdd_Click(object sender, EventArgs e)
{
if (!string.IsNullOrWhiteSpace(Request.QueryString["id"]))
{
string kundeID = "-1";
int id = Convert.ToInt32(Request.QueryString["id"]);
int totalsum = Convert.ToInt32(ddlAmount.SelectedValue);
Handlevogn handlevogn = new Handlevogn
{
TotalSum = totalsum,
KundeID = kundeID,
Dato = DateTime.Now,
ErIHandlevogn = true,
ProduktID = id
};
HandlevognModell modell = new HandlevognModell();
lblResult.Text = modell.InsertHandlevogn(handlevogn);
}
不断收到错误无法隐式转换类型“字符串”到“短”
无法隐式转换typre“字符串”到“短”
本地变量kundeID。