public int UpdateTechnicalQualification(TechnicalQualificationModel tech_qualification) { sqlConnection = OpenConnection(); sqlConnection.Open(); sqlCommand = sqlConnection.CreateCommand(); sqlCommand.CommandText = "UPDATE TechnicalDetails SET " + "[UserInterface] = @UserInterface," + "[Programming Languages] = @ProgrammingLanguages," + "[ORM Technologies] = @OrmTechnologies," + "[DataBases] =@DataBases,";; sqlCommand.Parameters.AddWithValue("@UserInterface", tech_qualification.UserInterface); sqlCommand.Parameters.AddWithValue("@ProgrammingLanguages", tech_qualification.ProgrammingLanguage); sqlCommand.Parameters.AddWithValue("@OrmTechnologies", tech_qualification.ORM_Technology); sqlCommand.Parameters.AddWithValue("@DataBases", tech_qualification.Database); int result = sqlCommand.ExecuteNonQuery(); sqlConnection.Close(); return(result); }
protected void TechnicalDetailsEditButton_Click(object sender, EventArgs e) { TechnicalQualificationModel technical_details_edit = new TechnicalQualificationModel() { UserInterface = UserInterfaceTextBox.Text, ProgrammingLanguage = ProgrammingLanguageTextBox.Text, ORM_Technology = OrmTechnologiesTextBox.Text, Database = DatabaseTextBox.Text }; EmployeeDataAccessLayer employeeDataAccessLayer = new EmployeeDataAccessLayer(); employeeDataAccessLayer.UpdateTechnicalQualification(technical_details_edit); }
public int AddtoTechnicalQualification(TechnicalQualificationModel tech_qualification) { sqlConnection = OpenConnection(); sqlConnection.Open(); sqlCommand = new SqlCommand("INSERT INTO TechnicalDetails VALUES(" + "'" + tech_qualification.UserInterface + "','" + tech_qualification.ProgrammingLanguage + "','" + tech_qualification.ORM_Technology + "','" + tech_qualification.Database + "'," + tech_qualification.EmployeeID + "[WHERE EmployeeID IS NULL];" + ")", sqlConnection); int result = sqlCommand.ExecuteNonQuery(); sqlConnection.Close(); return(result); }