Example #1
0
        public AcceptMaterialCallResponse AcceptMaterialCall(AcceptMaterialCallRequest acceptMaterialCall)
        {
            var response = new AcceptMaterialCallResponse
            {
                Succeeded = true,
                Error     = string.Empty
            };
            UAFConnector uafConnector = null;

            try
            {
                uafConnector = new UAFConnector(acceptMaterialCall.User, acceptMaterialCall.Password);
            }
            catch (Exception e)
            {
                response.Succeeded = false;
                response.Error     = e.Message;
                return(response);
            }
            var uafResponse = uafConnector.CallCommand <DABAcceptMaterialCall, DABAcceptMaterialCall.Response>(new DABAcceptMaterialCall
            {
                Id         = acceptMaterialCall.CallId,
                TeamLeader = acceptMaterialCall.User
            });

            if (!uafResponse.Succeeded)
            {
                response.Succeeded = false;
                response.Error     = $"Errore {uafResponse.Error.ErrorCode}: {uafResponse.Error.ErrorMessage}";
                return(response);
            }
            CallHub.Static_MaterialCallAccepted(acceptMaterialCall.Equipment, acceptMaterialCall.CallId.ToString());
            //SmartWatchConnector.TeamLeaderComing(acceptMaterialCall.Equipment);
            return(response);
        }
Example #2
0
        public AcceptMaterialCallResponse AcceptMaterialCall(AcceptMaterialCallRequest acceptMaterialCall)
        {
            var response = new AcceptMaterialCallResponse
            {
                Succeeded = true,
                Error     = string.Empty
            };

            return(response);
        }