Delete() public method

public Delete ( int empId ) : bool
empId int
return bool
Exemplo n.º 1
0
    public void Delete_StateUnderTest_ExpectedBehaviorNewEmployee()
    {
        // Arrange
        var newEmp = new EmployeeModel()
        {
            Age        = 33,
            Name       = "Test User",
            State      = "Texas",
            Country    = "USA",
            Department = EmployeeDepartment.IT
        };

        // Act

        // Get Current count of employees
        var initResult = employeeDB.EmployeeCollection().ToArray();

        // Add New Employee with Update
        var addResult = employeeDB.Update(newEmp);
        // Get updated count of employees
        var updatedResult = employeeDB.EmployeeCollection().ToArray();
        /// Delete the Employee
        var result = employeeDB.Delete(addResult.id);
        // Get result after delete
        var finalResult = employeeDB.EmployeeCollection().ToArray();

        // Assert
        Assert.IsNotNull(result);
        Assert.AreEqual(finalResult.Length, initResult.Length);
    }
Exemplo n.º 2
0
 /// <summary>
 /// xóa 1 danh sách Employee
 /// </summary>
 /// <param name="EmployeeIDs"></param>
 /// <returns></returns>
 public static int DeleteEmployees(int[] EmployeeIDs)
 {
     return(EmployeeDB.Delete(EmployeeIDs));
 }
Exemplo n.º 3
0
 public JsonResult Delete(int ID)
 {
     return(Json(empDB.Delete(ID), JsonRequestBehavior.AllowGet));
 }
 public void Delete(int ID)
 {
     empDB.Delete(ID);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Xóa các supplier dựa vào DI
 /// </summary>
 /// <param name="supplierIds"></param>
 /// <returns></returns>
 public static int DeleteEmployee(int[] employeeIds)
 {
     return(EmployeeDB.Delete(employeeIds));
 }
Exemplo n.º 6
0
 public void Delete(string Id)
 {
     objDB.Delete(Id);
 }
Exemplo n.º 7
0
 public static int DeleteEmployees(int[] employeeID)
 {
     return(EmployeeDB.Delete(employeeID));
 }
Exemplo n.º 8
0
 public JsonResult Eliminar(int id)
 {
     return(Json(empDB.Delete(id), JsonRequestBehavior.AllowGet));
 }