public void Test_API_Get_StaffClockModelWithStaffMemberExpanded() { var api = new BreezeDataController(); var data = api.StaffClockModelAll(); Assert.IsNotNull(data); Debug.WriteLine(data); }
public void Test_API_Get_Metadata() { var api = new BreezeDataController(); var meta = api.MetaData(); Assert.IsTrue(meta != String.Empty); Debug.WriteLine(meta); }
public void Test_API_Get_JustToProveStaffModelIsNotWorkingWithClockData() { var api = new BreezeDataController(); var data = api.StaffLeave(); Assert.IsNotNull(data); Debug.WriteLine(data); }
public void Test_API_Get_ThoughtRandom() { var api = new BreezeDataController(); var thought = api.ThoughtRandom(); Assert.IsNotNull(thought); Debug.WriteLine(thought.Thought); }
public void Test_API_Get_CurrentUserIsAdmin() { var api = new BreezeDataController(); var data = api.CurrentUserIsAdmin(); Assert.IsNotNull(data); Debug.WriteLine(data); }
public void Test_API_Get_Menu() { var api = new BreezeDataController(); var menuList = api.Menus(); Assert.IsNotNull(menuList); foreach (var menuModel in menuList) { Debug.WriteLine(menuModel.MenuName); } }
public void Test_API_Get_GalleryImageList() { var api = new BreezeDataController(); var data = api.GetGalleryImageList("Testing"); Assert.IsNotNull(data); foreach (var item in data) { Debug.WriteLine(item.FileName); } }
public void Test_API_Get_GalleryList() { var api = new BreezeDataController(); var data = api.GalleryList(); Assert.IsNotNull(data); foreach (var item in data) { Debug.WriteLine(item.GalleryDesc); } }
public void Test_API_Get_StaffSuggestions_BySuggestion() { var api = new BreezeDataController(); var data = api.StaffSuggestions(); Assert.IsNotNull(data); foreach (var item in data) { Debug.WriteLine(item.SuggestionSubject); } }
public void Test_API_Get_Staff() { var api = new BreezeDataController(); var data = api.Staff(); Assert.IsNotNull(data); foreach (var item in data) { Debug.WriteLine(item.StaffFullName); } }
public void Test_API_Get_HolidayList() { var api = new BreezeDataController(); var data = api.HolidaysList(); Assert.IsNotNull(data); foreach (var item in data) { Debug.WriteLine(item.HolidayDescription); } }
public void Test_API_Get_LinkCategories() { var api = new BreezeDataController(); var linkCats = api.LinkCategories(); Assert.IsNotNull(linkCats); foreach (var data in linkCats) { Debug.WriteLine(data.CategoryDesc); } }
public void Test_API_Get_ThoughtList() { var api = new BreezeDataController(); var thoughts = api.ThoughtList(); Assert.IsNotNull(thoughts); foreach (var thoughtModel in thoughts) { Debug.WriteLine(thoughtModel.Thought); } }
public void Test_API_Get_DivisionList() { var api = new BreezeDataController(); var data = api.DivisionList(); Assert.IsNotNull(data); foreach (var item in data) { Debug.WriteLine(item.DivisionName); //Debug.WriteLine(item.DivisionBranch.BranchName); } }
protected override bool BeforeSaveEntity(Breeze.WebApi.EntityInfo entityInfo) { if (entityInfo.Entity is AnnouncementModel) { var announcementModel = (AnnouncementModel)entityInfo.Entity; if (announcementModel != null) { announcementModel.AnnouncementDate = DateTime.Now; } } if (entityInfo.Entity is StaffModel) { var staffModel = (StaffModel)entityInfo.Entity; if (staffModel != null) { staffModel = BreezeDataController.ValidateStaffModel(staffModel); } } else if (entityInfo.Entity is StaffLeaveModel) { var leave = (StaffLeaveModel)entityInfo.Entity; if (leave != null) { leave = BreezeDataController.ValidateLeaveApplication(leave); } } else if (entityInfo.Entity is StaffLeaveCounterModel) { StaffLeaveCounterModel leaveCounter = (StaffLeaveCounterModel)entityInfo.Entity; if (leaveCounter != null) { leaveCounter = BreezeDataController.ValidateLeaveCounterModel(leaveCounter); } } //else if (entityInfo.Entity is StaffClockModel) //{ // StaffClockModel clockData = (StaffClockModel)entityInfo.Entity; // if (clockData != null) // { // clockData = BreezeDataController.ValidateClockModel(clockData); // } //} return(base.BeforeSaveEntity(entityInfo)); }
public void Test_API_Get_BranchList() { var api = new BreezeDataController(); var data = api.BranchList(); Assert.IsNotNull(data); foreach (var branch in data) { Debug.WriteLine(branch.BranchName); foreach (var division in branch.BranchDivisions) { Debug.WriteLine("\t" + division.DivisionName); foreach (var staffMem in division.DivisionStaff) { Debug.WriteLine("\t\t" + staffMem.StaffFullName); } } } }
protected override void AfterSaveEntities(Dictionary <Type, List <EntityInfo> > saveMap, List <KeyMapping> keyMappings) { foreach (KeyValuePair <Type, List <EntityInfo> > valuePair in saveMap) { if (valuePair.Value[0].Entity is StaffModel) { var savedModel = (StaffModel)valuePair.Value[0].Entity; if (valuePair.Value[0].EntityState == EntityState.Added) { if (savedModel != null) { var result = BreezeDataController.RegisterUserToClockingDevice(savedModel); } } else if (valuePair.Value[0].OriginalValuesMap.Any(x => x.Key.Equals("StaffClockCardNumber") || x.Key.Equals("ClockDevice"))) { var result = BreezeDataController.RegisterUserToClockingDevice(savedModel); } } } }
public void Test_API_ProcessClockingData() { var api = new BreezeDataController(); Assert.IsTrue(api.ProcessClockingData()); }