Exemplo n.º 1
0
        private void SaveFile(OnlinePayment payment)
        {
            string path;
            var    communityId = new Matter.Matter(payment.MatterId).Find().CommunityAssociationId;
            var    ca          = new Matter.CommunityAssociation {
                CommunityAssociationId = communityId
            };
            var clientNumber = ca.Find().ClientNumber;

            path = string.Format(ConfigurationManager.AppSettings["DocumentArchive"] + "{0}\\{1}\\Acctng {2}\\OnlinePayment_{3}.txt", clientNumber, payment.MatterId, payment.MatterId, payment.TransactionId);

            try
            {
                Directory.CreateDirectory(Path.GetDirectoryName(path));
                using (StreamWriter writer =
                           new StreamWriter(path))
                {
                    writer.WriteLine("Payment Id: " + payment.TransactionId);
                    writer.WriteLine("Matter Id: " + payment.MatterId);
                    writer.WriteLine("Payment: " + payment.Amount);
                    writer.WriteLine("Convenience Fee: " + payment.Fee);
                    writer.WriteLine("Total Amount: " + payment.TotalAmount);
                    writer.WriteLine("Payment Type: " + payment.PaymentType);
                    writer.WriteLine("Date: " + DateTime.Now.ToString("MM-dd-yyyy"));
                }
            }
            catch (Exception e)
            {
                throw;
            }
        }
Exemplo n.º 2
0
 public bool IsLoginAllowed()
 {
     using (var ProLiveContext = new ProLiveDbContext())
     {
         Matter record = ProLiveContext.Matter.FirstOrDefault(x => x.MatterId == MatterId && x.IsActive && x.CloseDate == null && x.IsOwnerWebAccessible);
         return(record != null);
     }
 }
Exemplo n.º 3
0
 public Tuple <bool, string> IsValid(long registrationId)
 {
     using (var ProLiveContext = new ProLiveDbContext())
     {
         Matter record = ProLiveContext.Matter.FirstOrDefault(x => x.MatterId == MatterId);
         if (record == null)
         {
             return(new Tuple <bool, string>(false, "This Matter Id is not recognized.  Please verify you've typed in the correct Id and contact Customer Support if the problem continues."));
         }
         else if (!record.IsOwnerWebAccessible || record.CloseDate != null || !record.IsActive)
         {
             return(new Tuple <bool, string>(false, "This Matter Id is not eligible for access.  Please contact Customer Support."));
         }
         var sourceRegistrationId = record.CreateDt.ToString("yyyyMMddhhmm");
         if (registrationId.ToString() != sourceRegistrationId.ToString())
         {
             return(new Tuple <bool, string>(false, "Matter Id / Registration Id mismatch.  Please verify you have typed the correct numbers"));
         }
         return(new Tuple <bool, string>(true, null));
     }
 }