title: C# error Must declare the scalar variable
body: <p>I am getting the following error and I have been doing a lot of research online to re-solve but i can't seem to find the right answer , A bit of help would be much appreciated.
  Many Thanks</p>
  
  <blockquote>
    <p>Error:  Additional information: Must declare the scalar variable
    "@Username@DepartmentName".</p>
  </blockquote>
  
  <pre><code>//DepartmentName and Username are both foreign key from LoginDetails table and Department table
  
  SqlConnection cn = new SqlConnection(@"Data Source=PRINCENICHOLAS;Initial Catalog=Kids Company IT Asset;Integrated Security=True");
  SqlCommand sqlcmdLogin = new SqlCommand("Insert into LoginDetails(Username,Password,PrivilegeCode) Values(@Username,@Password,@PrivilegeCode)", cn);
  
  sqlcmdLogin.Parameters.AddWithValue("@Username", txtEmpFirstName.Text + '.' + txtEmpSurname.Text);
  sqlcmdLogin.Parameters.AddWithValue("@Password", txtEmpPassword.Text);
  sqlcmdLogin.Parameters.AddWithValue("@PrivilegeCode", cboPrivilege.SelectedItem.ToString());
  cn.Open();
  sqlcmdLogin.ExecuteNonQuery();
  cn.Close();
  //Insert Employee Table
  SqlCommand sqlcmdEmp = new SqlCommand("Insert into Employee(FirstName,LastName,DOB,Email,PhoneNumber,JobRole,Username,DepartmentName) Values(@FirstName,@LastName,@DOB,@Email,@PhoneNumber,@JobRole,@Username@DepartmentName)", cn);
  sqlcmdEmp.Parameters.AddWithValue("@FirstName", txtEmpFirstName.Text);
  sqlcmdEmp.Parameters.AddWithValue("@LastName", txtEmpSurname.Text);
  sqlcmdEmp.Parameters.AddWithValue("@DOB", dtpEmpDOB.Text);
  sqlcmdEmp.Parameters.AddWithValue("@Email", txtEmpEmail.Text);
  sqlcmdEmp.Parameters.AddWithValue("@PhoneNumber", txtEmpPhone.Text);
  sqlcmdEmp.Parameters.AddWithValue("@JobRole", txtJobRole.Text);
  sqlcmdEmp.Parameters.AddWithValue("@Username", txtEmpFirstName.Text + '.' + txtEmpSurname.Text);
  sqlcmdEmp.Parameters.AddWithValue("@DepartmentName", cboDeptName.SelectedItem.ToString());
  cn.Open();      
  sqlcmdEmp.ExecuteNonQuery();
  cn.Close();​    
  </code></pre>