private void GetInputParameters(PVSocketRequest request, out string password) { if (request.InputRecordFieldValues.Count != 1) { throw new Exception(string.Format("Invalid number of inputs supplied to {0}.", request.CommandName)); } password = request[0]; }
private void GetInputParameters(PVSocketRequest request, out int pickListNumber) { if (request.InputRecordFieldValues.Count != 1) { throw new Exception(string.Format("Invalid number of inputs supplied to {0}.", request.CommandName)); } if (!int.TryParse(request[0], out pickListNumber)) { throw new Exception(string.Format("Pick list number {0} cannot be converted to an integer.", request[0])); } }
private void GetInputParameters( PVSocketRequest request, out int pickListNumber, //0 out string sku, //1 out int quantityPicked, //2 out char pickedStatusCode) //3 { if (!int.TryParse(request[0], out pickListNumber)) { throw new Exception(string.Format("Pick list number {0} cannot be converted to an integer.", request[0])); } sku = request[1]; if (!int.TryParse(request[2], out quantityPicked)) { throw new Exception(string.Format("Pick list number {0} cannot be converted to an integer.", request[0])); } if (!char.TryParse(request[3], out pickedStatusCode)) { throw new Exception(string.Format("Pick Status Code {0} cannot be converted to a character.", request[0])); } }