public TCBMP ValidateTCBMP(String tcbmpid, String inspId) { string[] inputs = { tcbmpid, inspId }; if (inputs.Any(x => string.IsNullOrWhiteSpace(x))) { TCBMP tcresult = new TCBMP(); var message = "Required Fields Missing. Fields required are tcbmpid, inspId"; tcresult.Message = message; log.Info(message); return(tcresult); } var cosdEnv = WebConfigurationManager.AppSettings["cosdEnv"]; String result = AccelaRestServiceSO.AuthenticateRestUser("COSD", cosdEnv); log.Info("In ValidateTCBMP parameter: " + tcbmpid + ":" + inspId); var token = result; log.Info("In SetDetailsRest token: " + token); try { var re = AccelaRestServiceSO.ValidateTCBMP(token, tcbmpid, inspId); return(re); } catch (Exception e) { log.Error("In SetDetailsRest: " + e.Message); } return(null); }
public SOResult SetDetailsRest(String problemCategory, String problemSubcategory, String otherDetails, String customerComments, String firstName, String lastName, String email, String phone1, String address, String city, String xcoordinate, String ycoordinate, String resolvedAddress, String locality, String neighborhood, String postal_code, String route, String street_number, String image) { string[] inputs = { problemCategory, problemSubcategory, customerComments, firstName, lastName,email, phone1, resolvedAddress }; if (inputs.Any(x => string.IsNullOrWhiteSpace(x))) { SOResult soresult = new SOResult(); var message = "Required Fields Missing. Fields required are problemCategory, problemSubcategory, customerComments, firstName, lastName, email, phone1, resolvedAddress"; soresult.Message = message; log.Info(message); return(soresult); } var leamsEmv = WebConfigurationManager.AppSettings["leamsEmv"]; String result = AccelaRestServiceSO.AuthenticateRestUser("LEAMSDPW", leamsEmv); log.Info("In SetDetailsRest parameter: " + problemCategory + " - " + problemSubcategory + " - " + otherDetails + " - " + customerComments + " - " + firstName + " - " + lastName + " - " + email + " - " + phone1 + " - " + address + " - " + city + " - " + xcoordinate + " - " + ycoordinate + " - " + resolvedAddress + " - " + locality + " - " + neighborhood + " - " + postal_code + " - " + route + " - " + street_number); var token = result; log.Info("In SetDetailsRest token: " + token); try { var re = AccelaRestServiceSO.SetDetailsRest(token, problemCategory, problemSubcategory, otherDetails, customerComments, firstName, lastName, email, phone1, address, city, xcoordinate, ycoordinate, resolvedAddress, locality, neighborhood, postal_code, route, street_number, image); return(re); } catch (Exception e) { log.Error("In SetDetailsRest: " + e.Message); } return(null); }