Esempio n. 1
0
File: Program.cs Progetto: coni2k/SS
        static void FillSquare(string parameters)
        {
            //Get square id & number
            int id = int.Parse(parameters.Split(',')[0]);
            int number = int.Parse(parameters.Split(',')[1]);

            var squareContainer = new SquareContainer();
            squareContainer.SquareId = id;
            squareContainer.Number = number;

            //Fill
            GetWebApiClient("fillsquare").Post<SquareContainer>(currentSudokuId, squareContainer);
        }
Esempio n. 2
0
        public void FillSquare(int id, SquareContainer square)
        {
            var container = ValidateAndGetSudokuContainer(id);

            try
            {
                container.FillSquare(square.SquareId, square.Number);
            }
            catch (Exception)
            {
                //TODO Correct code?
                //Return a message !!!!!
                throw new HttpResponseException(HttpStatusCode.InternalServerError);
            }
        }