Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 4.0 使用c ado.net断开连接的体系结构保存按钮代码_C# 4.0 - Fatal编程技术网

C# 4.0 使用c ado.net断开连接的体系结构保存按钮代码

C# 4.0 使用c ado.net断开连接的体系结构保存按钮代码,c#-4.0,C# 4.0,错误:名称“dealerdetailTableAdapter”在当前上下文中不存在 private void btnSave_Click(object sender, EventArgs e) { t = kalliskaBillingDataSet.Tables["DealerDetail"]; r = t.NewRow(); r[0] = txtdealerID.Text; r[1] = txtname.Text;

错误:名称“dealerdetailTableAdapter”在当前上下文中不存在

   private void btnSave_Click(object sender, EventArgs e)
    {
        t = kalliskaBillingDataSet.Tables["DealerDetail"];
        r = t.NewRow();
        r[0] = txtdealerID.Text;
        r[1] = txtname.Text;
        r[2] = txtaddress.Text;
        r[3] = txtphoneno.Text;
        t.Rows.Add(r);
        //'dealerdetailTableAdapter' does not exist in the current context.
        dealerdetailTableAdapter.Update(kalliskaBillingDataSet);
        txtdealerID.Text = System.Convert.ToString(r[0]);
        MessageBox.Show("Data Saved", "DealerDetail", MessageBoxButtons.OK, MessageBoxIcon.Information);

    }