private void cmdSave_Click(object sender, EventArgs e) { dt = hRDataSet.Tables["empdetails"]; dr = dt.NewRow(); dr[0] = txtccode.Text; //argumentexception was unhandled dr[1] = txtEmployeeName.Text; dr[2] = txtAddress.Text; dr[3] = txtState.Text; dr[4] = txtCountry.Text; dr[5] = cbDepartment.SelectedItem; dr[6] = cbDesignation.SelectedItem; dt.Rows.Add(dr); empdetailsTableAdapter.Update(hRDataSet); txtccode.Text = System.Convert.ToString(dr[0]); txtccode.Enabled = false; txtEmployeeName.Enabled = false; txtAddress.Enabled = false; txtState.Enabled = false; txtCountry.Enabled = false; cbDepartment.Enabled = false; cbDesignation.Enabled = false; this.empdetailsTableAdapter.Fill(this.hRDataSet.empdetails); cmdAdd.Enabled = true; cmdSave.Enabled = false; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)