public bool AddDesignation(EmployeeAddDesignation designation) { try { return(_employeeRepository.AddDesignation(designation)); } catch (Exception ex) { throw ex; } }
public bool AddDesignation(EmployeeAddDesignation designation) { try { SqlConnection sqlconn = new SqlConnection(connectionString); SqlCommand sqlComm = new SqlCommand("newDesignation"); sqlconn.Open(); sqlComm.Connection = sqlconn; sqlComm.CommandType = CommandType.StoredProcedure; sqlComm.Parameters.AddWithValue("@employeeType", designation.Designation); sqlComm.ExecuteNonQuery(); sqlconn.Close(); return(true); } catch (Exception e) { throw e; } }