Exemple #1
0
        private Receiver GetOurMail(Receiver receiver)
        {
            var ourReceiver = OurReceivers.OrderBy(a => a.Count).FirstOrDefault();

            if (ourReceiver != null)
            {
                ourReceiver.Bcc                 = receiver.Bcc;
                ourReceiver.CC                  = receiver.CC;
                ourReceiver.CompanyName         = receiver.CompanyName;
                ourReceiver.FieldAddress        = receiver.FieldAddress;
                ourReceiver.FieldContractAmount = receiver.FieldContractAmount;
                ourReceiver.FieldDate1          = receiver.FieldDate1;
                ourReceiver.FieldDate2          = receiver.FieldDate2;
                ourReceiver.FieldDate3          = receiver.FieldDate3;
                ourReceiver.FieldInn            = receiver.FieldInn;
                ourReceiver.FieldOkvd           = receiver.FieldOkvd;
                ourReceiver.FieldPhone          = receiver.FieldPhone;
                ourReceiver.FieldRecord1        = receiver.FieldRecord1;
                ourReceiver.FieldRecord2        = receiver.FieldRecord2;
                ourReceiver.FieldRecord3        = receiver.FieldRecord3;
                ourReceiver.Letter              = receiver.Letter;
                ourReceiver.PersonName          = receiver.PersonName;
                ourReceiver.Time                = receiver.Time;
            }
            return(ourReceiver);
        }
Exemple #2
0
        private Receiver GetHidden()
        {
            if (countToHidden < SendToHidden)
            {
                return(new Receiver());
            }
            var ourReceiver = OurReceivers.OrderBy(a => a.Count).FirstOrDefault();

            _logger.InfoSender($"Hidden send to {ourReceiver.Email}");
            countToHidden = 0;
            return(ourReceiver);
        }