Esempio n. 1
0
        static void Main(string[] args)
        {
            var setup   = new SetUpService();
            var catalog = setup.CreateCatalogue();

            var scanService  = new ScanService(catalog);
            var totalService = new TotalUpService(catalog);

            Console.WriteLine("Checkout service");
            Console.WriteLine("Please enter the code for each item and press enter. Entering 'DONE' will return the total");

            var checkOut = false;

            while (!checkOut)
            {
                var line = Console.ReadLine();
                if (line == "DONE")
                {
                    checkOut = true;
                    Console.WriteLine("Total: " + totalService.TotalUp(scanService.ScannedItems).ToString());
                    Console.ReadLine();
                }
                else
                {
                    try
                    {
                        scanService.Scan(line);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                    }
                }
            }
        }
Esempio n. 2
0
        public async Task <IHttpActionResult> AddUser(UserViewModel model)
        {
            model.Id = Guid.NewGuid();
            SetUpService.AddUser(model.ToServiceRequestModel());
            await UserManager.SendPasswordResetEmail(model, Mailing.Models.EmailTemplate.SetUpPassword, "MBOS : Password setup");

            return(Ok());
        }
Esempio n. 3
0
        public async Task <IHttpActionResult> UpdateAgent(AgentViewModel model)
        {
            var response = SetUpService.UpdateAgent(model.ToServiceRequestModel());

            if (!response.IsNewUser)
            {
                return(Ok());
            }
            var user = SetUpService.GetUser(response.UserId);
            await UserManager.SendPasswordResetEmail(user, Mailing.Models.EmailTemplate.SetUpPassword, "MBOS : Password setup");

            return(Ok());
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            Cell test  = new Cell(3, 5, 4, 0);
            var  setUp = new SetUpService();
            var  grid  = setUp.InitialiseGrid();

            var solver = new SolverService(grid);

            Console.WriteLine("Sudoku solver\n");
            Console.WriteLine("Grid to be solved\n");
            Console.WriteLine(grid.ToString());

            grid = solver.Solve();

            Console.WriteLine("\nGrid solved\n");
            Console.WriteLine(grid.ToString());
        }
Esempio n. 5
0
 public IHttpActionResult ListSourceType(KendoDataRequest kendoDataRequest)
 {
     return(Ok(SetUpService.ListSourceType(kendoDataRequest)));
 }
Esempio n. 6
0
 public IHttpActionResult GetDocumentProcessingSetting(int id)
 {
     return(Ok(SetUpService.GetDocumentProcessingSetting(id)));
 }
Esempio n. 7
0
 public IHttpActionResult DeleteMIPLimit(Guid id)
 {
     SetUpService.DeleteMIPLimit(id.ToServiceRequestModel());
     return(Ok());
 }
Esempio n. 8
0
 public IHttpActionResult UpdateAocaObservation(List <AocaObservationMapViewModel> model)
 {
     SetUpService.UpdateAocaObservation(model.ToServiceRequestModel());
     return(Ok());
 }
Esempio n. 9
0
 public IHttpActionResult DeleteExpenseItem(Guid id)
 {
     SetUpService.DeleteExpenseItem(id.ToServiceRequestModel());
     return(Ok());
 }
Esempio n. 10
0
 public IHttpActionResult ListUserGroup(KendoDataRequest kendoDataRequest)
 {
     return(Ok(SetUpService.ListUserGroup(kendoDataRequest)));
 }
Esempio n. 11
0
 public IHttpActionResult GetUserGroup(UserGroupType userGroupType)
 {
     return(Ok(SetUpService.GetUserGroup(userGroupType)));
 }
Esempio n. 12
0
 public IHttpActionResult ListDocumentProcessingSetting(KendoDataRequest kendoDataRequest)
 {
     return(Ok(SetUpService.ListDocumentProcessingSetting(kendoDataRequest)));
 }
Esempio n. 13
0
 public IHttpActionResult ListNotificationSetting(KendoDataRequest kendoDataRequest)
 {
     return(Ok(SetUpService.ListNotificationSetting(kendoDataRequest)));
 }
Esempio n. 14
0
 public IHttpActionResult GetHoliday(Guid id)
 {
     return(Ok(SetUpService.GetHoliday(id)));
 }
Esempio n. 15
0
 public IHttpActionResult DeleteHoliday(Guid id)
 {
     SetUpService.DeleteHoliday(id.ToServiceRequestModel());
     return(Ok());
 }
Esempio n. 16
0
 public IHttpActionResult UpdateHoliday(HolidayViewModel model)
 {
     SetUpService.UpdateHoliday(model.ToServiceRequestModel());
     return(Ok());
 }
Esempio n. 17
0
 public IHttpActionResult ListHoliday(KendoDataRequest kendoDataRequest)
 {
     return(Ok(SetUpService.ListHoliday(kendoDataRequest)));
 }
Esempio n. 18
0
 public IHttpActionResult DeleteDocumentProcessingSetting(int id)
 {
     SetUpService.DeleteDocumentProcessingSetting(id.ToServiceRequestModel());
     return(Ok());
 }
Esempio n. 19
0
 public IHttpActionResult UpdateSourceType(SourceTypeViewModel model)
 {
     SetUpService.UpdateSourceType(model.ToServiceRequestModel());
     return(Ok());
 }
Esempio n. 20
0
 public IHttpActionResult UpdateNotificationSetting(List <NotificationSettingViewModel> model)
 {
     SetUpService.UpdateNotificationSetting(model.ToServiceRequestModel());
     return(Ok());
 }
Esempio n. 21
0
 public IHttpActionResult GetSourceType(int id)
 {
     return(Ok(SetUpService.GetSourceType(id)));
 }
Esempio n. 22
0
 public IHttpActionResult GetNotificationSetting(NotificationSettingType notificationSettingType)
 {
     return(Ok(SetUpService.GetNotificationSetting(notificationSettingType)));
 }
Esempio n. 23
0
 public IHttpActionResult UpdateUserGroup(List <UserGroupViewModel> model)
 {
     SetUpService.UpdateUserGroup(model.ToServiceRequestModel());
     return(Ok());
 }
Esempio n. 24
0
 public IHttpActionResult GetExpenseItem(Guid id)
 {
     return(Ok(SetUpService.GetExpenseItem(id)));
 }
Esempio n. 25
0
 public IHttpActionResult ListAocaObservation()
 {
     return(Ok(SetUpService.ListAocaObservation()));
 }
Esempio n. 26
0
 public IHttpActionResult UpdateMIPLimit(MIPLimitViewModel model)
 {
     SetUpService.UpdateMIPLimit(model.ToServiceRequestModel());
     return(Ok());
 }
Esempio n. 27
0
 public IHttpActionResult GetDbCurrentDateTime()
 {
     return(Ok(SetUpService.GetDbCurrentDateTime()));
 }
Esempio n. 28
0
 public IHttpActionResult GetMIPLimit(Guid id)
 {
     return(Ok(SetUpService.GetMIPLimit(id)));
 }
Esempio n. 29
0
 public IHttpActionResult ListMIPLimit(KendoDataRequest kendoDataRequest)
 {
     return(Ok(SetUpService.ListMIPLimit(kendoDataRequest)));
 }
Esempio n. 30
0
 public IHttpActionResult UpdateDocumentProcessingSetting(DocumentProcessingSettingViewModel model)
 {
     SetUpService.UpdateDocumentProcessingSetting(model.ToServiceRequestModel());
     return(Ok());
 }