public void NUnit_WorkDay_Domain_Add() { Att_WorkDayServices service = new Att_WorkDayServices(); string result = string.Empty; int countSC = 0; for (int i = 1; i <= 10; i++) { var model = new Att_WorkDay { ProfileID = 1, WorkDate = DateTime.Parse("10-05-14"), FirstInTime = DateTime.Parse("10-05-14 08:00:00"), LastOutTime = DateTime.Parse("10-05-14 23:00:00"), WorkDuration = 15 }; result = service.Add(model); if (result != string.Empty) { countSC += 1; Console.WriteLine("Process Success >>> Create >>> " + model.Id ); } } Console.WriteLine("Total success record: " + countSC); }
public void NUnit_WorkDay_Domain_Delete() { Att_WorkDayServices service = new Att_WorkDayServices(); int rs = 0; var model = new Att_WorkDay { Id = 3 }; string result = service.Delete <Att_WorkDayEntity>(model.Id); if (result != string.Empty) { rs += 1; Console.WriteLine("Process Success >>> Delete >>> " + model.Id); } }
public void NUnit_WorkDay_Domain_Edit() { Att_WorkDayServices service = new Att_WorkDayServices(); var model = new Att_WorkDay { Id = 5, ProfileID = 1 }; string result = service.Edit(model); if (result != string.Empty) { Console.WriteLine("Process Success >>> Update >>> " + model.Id + " | " + model.ProfileID + " | " + model.WorkDate ); } }
public void NUnit_WorkDay_Domain_GetById() { string status = string.Empty; Att_WorkDayServices service = new Att_WorkDayServices(); var model = new Att_WorkDay { Id = 3 }; var result = service.GetById<Att_WorkDayEntity>(model.Id, ref status) as Att_WorkDayEntity; NUnit.Framework.Assert.IsNotNull(result); Console.Write("SearchResult: " + result.Id + " | " + result.ProfileID + " | " + result.WorkDate + " | " + result.FirstInTime //+ " | " + result.FirstOutTime //+ " | " + result.LastInTime + " | " + result.LastOutTime + " | " + result.WorkDuration + " | " + result.EarlyDuration1 + " | " + result.LateDuration1 + " | " + result.LateEarlyDuration ); }
public void NUnit_WorkDay_Domain_GetById() { string status = string.Empty; Att_WorkDayServices service = new Att_WorkDayServices(); var model = new Att_WorkDay { Id = 3 }; var result = service.GetById <Att_WorkDayEntity>(model.Id, ref status) as Att_WorkDayEntity; NUnit.Framework.Assert.IsNotNull(result); Console.Write("SearchResult: " + result.Id + " | " + result.ProfileID + " | " + result.WorkDate + " | " + result.FirstInTime //+ " | " + result.FirstOutTime //+ " | " + result.LastInTime + " | " + result.LastOutTime + " | " + result.WorkDuration + " | " + result.EarlyDuration1 + " | " + result.LateDuration1 + " | " + result.LateEarlyDuration ); }
public void NUnit_WorkDay_Domain_Delete() { Att_WorkDayServices service = new Att_WorkDayServices(); int rs = 0; var model = new Att_WorkDay { Id = 3 }; string result = service.Delete<Att_WorkDayEntity>(model.Id); if (result != string.Empty) { rs += 1; Console.WriteLine("Process Success >>> Delete >>> " + model.Id); } }