Ejemplo n.º 1
0
        public bool DeleteEmployee(int empID)
        {
            SqlParameter[] parameter = new SqlParameter[]
            {
                new SqlParameter("@empId", empID)
            };

            return(DataAccessSQL.ExecuteNonQuery("DeleteEmployee", CommandType.StoredProcedure, parameter));
        }
Ejemplo n.º 2
0
        public bool AddNewEmployee(Employee employee)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@LastName", employee.LastName),
                new SqlParameter("@FirstName", employee.FirstName),
                new SqlParameter("Title", employee.Title),
                new SqlParameter("@Address", employee.Address),
                new SqlParameter("@City", employee.City),
                new SqlParameter("@Region", employee.Region),
                new SqlParameter("@PostalCode", employee.PostalCode),
                new SqlParameter("@Country", employee.Country),
                new SqlParameter("@Extension", employee.Extension)
            };

            return(DataAccessSQL.ExecuteNonQuery("AddNewEmployee", CommandType.StoredProcedure, parameters));
        }