Beispiel #1
0
        private void GetListCount(ref PendingStatusCompareResult result)
        {
            try
            {
                var request = string.Format(SearchRequestListingCount, GetLoginText(_loginTrace), result.ModuleId,
                                            DateTime.Now.AddYears(-10).ToString("MM/dd/yyyyTHH:mm:ss") + "-" +
                                            DateTime.Now.ToString("MM/dd/yyyyTHH:mm:ss"));
                result.QaListingCount        = PsaHelper.GetListingCount(request, ConfigurationManager.AppSettings["TcsQaUrl"]);
                result.ProdutionListingCount = PsaHelper.GetListingCount(request, "");

                if (result.QaListingCount > 0 && result.ProdutionListingCount > 0)
                {
                    result.IncreaseInActiveCounts = ((int)(0.5f + 100f * (result.QaListingCount - result.ProdutionListingCount) / result.ProdutionListingCount)).ToString(CultureInfo.InvariantCulture) + "%";
                }
                if (!string.IsNullOrEmpty(result.CurrentRdcPendingStatus))
                {
                    result.RdcCurrentPendingListingCount = SearchByTmkCountRequest(result,
                                                                                   result.CurrentRdcPendingStatus,
                                                                                   _loginTrace);
                }
            }
            catch (Exception ex)
            {
                Log.Error(typeof(PsaManager), "Failed to get list count for Module ID: " + result.ModuleId + ex.Message + ex.StackTrace);
            }
        }
Beispiel #2
0
        private int SearchByTmkCountRequest(PendingStatusCompareResult compareResult, string status, LoginInfo loginInfo)
        {
            try
            {
                string statusName;
                string statusValue;
                string lastModidfyFieldName;
                string lastMoidfyFieldValue;
                var    helper = new PsaHelper();
                PsaHelper.GetStatusInfo(compareResult, status, out statusName, out statusValue, out lastModidfyFieldName,
                                        out lastMoidfyFieldValue);

                if (!string.IsNullOrEmpty(compareResult.CurrentRdcPendingStatus))
                {
                    var request = string.Format(SearchTMKCountRequest, GetLoginText(loginInfo),
                                                compareResult.BoardId.ToString(CultureInfo.InvariantCulture),
                                                PsaHelper.EncodeXml(compareResult.PropertyClass), statusName,
                                                statusValue, loginInfo.ByPassAuthentication);
                    return(PsaHelper.GetListingCount(request, ""));
                }
            }
            catch (Exception ex)
            {
                Log.Error(typeof(PsaManager), ex.Message);
            }

            return(0);
        }