Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        public String TCBMPSetDocument(String token, String image, String inspId, String recordId)
        {
            string[] inputs = { token, image, inspId };
            if (inputs.Any(x => string.IsNullOrWhiteSpace(x)))
            {
                var message = "Required Fields Missing. Fields required are  token, image, inspId, recordId";
                return(message);
            }

            log.Info("In TCBMPSetDocument parameter: " + image + ":" + inspId);
            log.Info("In TCBMPSetDocument token: " + token);
            try
            {
                var re = AccelaRestServiceSO.TCBMPSetDocument(token, image, inspId, recordId);
                return(re);
            }
            catch (Exception e)
            {
                log.Error("In SetDetailsRest: " + e.Message);
            }
            return(null);
        }