public static ObservationResponse getObservations() { var Res = new ObservationResponse(); var Req = new Empty(); Res = client.GetObservations(Req); return(Res); }
public static ObservationResponse getObservations() { var oRes = new ObservationResponse(); var oReq = new Empty(); oRes = client.GetObservations(oReq); Debug.Log("Observations: " + oRes.Observations); return(oRes); }
public static ObservationResponse GetIdObservacao(string command, string userId, string password, string url) { ObservationResponse rr = new ObservationResponse(); using (OracleConnection con = new OracleConnection(string.Format(conString, userId, password, url))) { using (OracleCommand cmd = con.CreateCommand()) { try { con.Open(); cmd.BindByName = true; //Use the command to display employee names from // the EMPLOYEES table cmd.CommandText = command; //// Assign id to the department number 50 //OracleParameter user = new OracleParameter("nome", usuario); //OracleParameter pass = new OracleParameter("senha", senha); //cmd.Parameters.Add(user); //cmd.Parameters.Add(pass); //Execute the command and use DataReader to display the data var dataSet = cmd.ExecuteReader(); if (dataSet.Read()) { int result; var parsed = int.TryParse(dataSet.GetValue(0).ToString(), out result); if (parsed) { rr.IdObservation = result; } else { rr.IdObservation = 0; } } rr.Success = true; return(rr); } catch (Exception ex) { rr.Success = false; throw new Exception(ex.Message); } } } }
public static void Main() { var oRes = new ObservationResponse(); var oReq = new Empty(); oRes = client.GetObservations(oReq); Debug.Log("Observations: " + oRes.Observations); var aRes = new ActionsResponse(); var aReq = new ActionRequest(); aReq.Actions.Add(1f); aReq.Actions.Add(2f); aRes = client.SetActions(aReq); Debug.Log(aRes.ActionsPerformed); }