Ejemplo n.º 1
0
        public ActionResult DeleteTimesheet(int TimesheetId, int EmpId)
        {
            TimeTrackerOperations ops = new TimeTrackerOperations();

            ops.DeleteSingleTimesheet(TimesheetId);

            return(RedirectToAction("TimeTrackerSummary", new { empId = EmpId }));
        }
Ejemplo n.º 2
0
        public void DeleteEmpTimesheetTest()
        {
            TimeTrackerOperations ops = new TimeTrackerOperations();

            ops.DeleteSingleTimesheet(14);
            var repo = new TimeTrackerRepository();
            List <Timesheet> listOfSheets = repo.GetAllTimeSheets(5);

            Assert.IsFalse(listOfSheets.Exists(p => p.TimesheetId == 15));
        }