Esempio n. 1
0
        public void positiveResponseConfirm(List <PositiveResponseModel> PositiveResponseConfirm, string connectionString, string sessionTicket, out TransactionalInformation transaction)
        {
            var method = MethodInfo.GetCurrentMethod();
            var ipInfo = Util.GetIPInfo(HttpContext.Current.Request);

            var userSecurityTicket = VerifySessionToken(sessionTicket);

            transaction = new TransactionalInformation();

            P_CAS_CCS_1516 parameter = new P_CAS_CCS_1516();

            parameter.StatusFrom       = 2;
            parameter.StatusTo         = 4;
            parameter.AreCasesFiltered = true;

            try
            {
                parameter.PositionNumbers = PositiveResponseConfirm.Select(t => Convert.ToDouble(t.InvoiceNumberHIP)).ToArray();
                var casesForReportChange = cls_Change_Case_Status.Invoke(connectionString, parameter, userSecurityTicket).Result.caseList;
                Logger.LogInfo(new LogEntry(ipInfo.address, ipInfo.agent, connectionString, method, userSecurityTicket, casesForReportChange));
            }
            catch (Exception ex)
            {
                Logger.LogInfo(new LogEntry(ipInfo.address, ipInfo.agent, connectionString, method, userSecurityTicket, ex));

                transaction.ReturnMessage = new List <string>();
                string errorMessage = ex.Message;
                transaction.ReturnStatus = false;
                transaction.ReturnMessage.Add(errorMessage);
                transaction.ReturnMessage.Add(ex.StackTrace);
                transaction.IsAuthenicated = true;
                transaction.IsException    = true;
            }
        }
Esempio n. 2
0
        public void CreateReportAndChangeStatusToFs2(DateTime?dateFrom, string connectionString, string sessionTicket, out TransactionalInformation transaction)
        {
            var method = MethodInfo.GetCurrentMethod();
            var ipInfo = Util.GetIPInfo(HttpContext.Current.Request);

            var userSecurityTicket = VerifySessionToken(sessionTicket);

            transaction = new TransactionalInformation();
            try
            {
                DateTime       DateForElastic = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
                P_CAS_CCS_1516 parameter      = new P_CAS_CCS_1516();
                parameter.StatusFrom       = 1;
                parameter.StatusTo         = 2;
                parameter.AreCasesFiltered = false;
                parameter.UpdatedCasesSubmittedBeforeDate = dateFrom;
                var casesForReportChange = cls_Change_Case_Status.Invoke(connectionString, parameter, userSecurityTicket).Result.caseList;
                Logger.LogInfo(new LogEntry(ipInfo.address, ipInfo.agent, connectionString, method, userSecurityTicket, casesForReportChange));
            }
            catch (Exception ex)
            {
                Logger.LogInfo(new LogEntry(ipInfo.address, ipInfo.agent, connectionString, method, userSecurityTicket, ex));

                transaction.ReturnMessage = new List <string>();
                string errorMessage = ex.Message;
                transaction.ReturnStatus = false;
                transaction.ReturnMessage.Add(errorMessage);
                transaction.IsAuthenicated = true;
                transaction.IsException    = true;
            }
        }
Esempio n. 3
0
        public bool ChangeCasesPayment(Payment_Model payment, string connectionString, string sessionTicket, out TransactionalInformation transaction)
        {
            var method = MethodInfo.GetCurrentMethod();
            var ipInfo = Util.GetIPInfo(HttpContext.Current.Request);

            var userSecurityTicket = VerifySessionToken(sessionTicket);

            transaction = new TransactionalInformation();
            try
            {
                var caseModelL = new List <CaseForReportModel>();
                var parameter  = new P_CAS_CCS_1516();
                parameter.StatusFrom = 4;
                if (payment.paymentStatusChange)
                {
                    parameter.StatusTo = 7;
                }
                else
                {
                    parameter.StatusTo = 4;
                }
                parameter.AreCasesFiltered = false;
                parameter.AreCasesPositive = true;

                if (!payment.paymentStatusChange)
                {
                    parameter.AreCasesPaymentAndStatus = true;
                }
                if (!String.IsNullOrEmpty(payment.date))
                {
                    parameter.StatusChangedOnDate = DateTime.ParseExact(payment.date, "dd.MM.yyyy", new CultureInfo("de", true));
                }

                var casesForReportChange = cls_Change_Case_Status.Invoke(connectionString, parameter, userSecurityTicket).Result.caseList;
                Logger.LogInfo(new LogEntry(ipInfo.address, ipInfo.agent, connectionString, method, userSecurityTicket, casesForReportChange));
            }
            catch (Exception ex)
            {
                Logger.LogInfo(new LogEntry(ipInfo.address, ipInfo.agent, connectionString, method, userSecurityTicket, ex));

                transaction.ReturnMessage = new List <string>();
                string errorMessage = ex.Message;
                transaction.ReturnStatus = false;
                transaction.ReturnMessage.Add(errorMessage);
                transaction.IsAuthenicated = true;
                transaction.IsException    = true;
            }
            return(payment.paymentStatusChange);
        }