Exemple #1
0
        public static string Send(Car car, PolicyType type)
        {
            EMail mail = new EMail();

            mail.sendMailPolicy(car, type);

            DriverCarList driverCarList = DriverCarList.getInstance();
            Driver        driver        = driverCarList.GetDriver(car);

            return(string.Concat("Полис ", type.ToString(), " отправлен на адрес ", driver.email));
        }
Exemple #2
0
        public static string Send(Car car, PolicyType type)
        {
            EMail mail = new EMail();

            mail.sendMailPolicy(car, type);

            DriverCarList driverCarList = DriverCarList.getInstance();
            Driver driver = driverCarList.GetDriver(car);

            return string.Concat("Полис ", type.ToString(), " отправлен на адрес ", driver.email);
        }
        public void SendNotification()
        {
            IEnumerable<Violation> list = ViolationList.getInstance().GetViolationForAccount();

            if (list.Count() > 0)
            {
                Driver driversTo = GetDriverForSending();

                string mailText = CreateMail(list);

                EMail email = new EMail();

                email.SendNotification(driversTo, mailText, false);
            }
        }
Exemple #4
0
        public void SendNotification()
        {
            if (DateTime.Today.Day != SEND_DAY)
                return;

            DiagCardList diagCardList = DiagCardList.getInstance();
            List<DiagCard> list = diagCardList.GetDiagCardEnds().ToList();

            int begin = 0;
            int end = 0;

            if (!ListEmpty(list))
            {
                STSList stsList = STSList.getInstance();

                while (end < list.Count)
                {
                    begin = end;
                    end += ((end + MAILS_COUNT) < list.Count) ? MAILS_COUNT : (list.Count - end);

                    List<DiagCard> listCut = new List<DiagCard>();

                    for (int i = begin; i < end; i++)
                        listCut.Add(list[i]);

                    IEnumerable<Car> carList = diagCardList.GetCarListFromDiagCardList(listCut);
                    List<string> files = new List<string>();

                    foreach (Car car in carList)
                    {
                        STS sts = stsList.getItem(car);
                        if (sts.File != string.Empty)
                            files.Add(sts.File);
                    }

                    string mailText = CreateMail(listCut);

                    EMail email = new EMail();

                    Driver employeeAutoDept = GetDriverForSending();
                    email.SendNotification(employeeAutoDept, mailText, true, files);
                }
            }
        }
        public void SendNotification()
        {
            SendToBoss();

            if (DateTime.Today.Day != SEND_DAY)
                return;

            PolicyList policyList = PolicyList.getInstance();
            IEnumerable<Policy> list = policyList.GetPolicyEnds();

            if (!ListEmpty(list))
            {
                Driver driversTo = GetDriverForSending();

                string mailText = CreateMail(list);

                EMail email = new EMail();

                email.SendNotification(driversTo, mailText);
            }
        }
Exemple #6
0
        public void SendNotification()
        {
            string message = CreateMessageNotification();

            EMail email = new EMail();
            email.SendNotification(Driver, message);

            IsNotificationSent = true;
            if (ID != 0)
                ExecSave();
        }
Exemple #7
0
        public void Agree()
        {
            EMail email = new EMail();
            email.SendMailAccountViolation(this);

            Agreed = true;

            Save();
        }
        private void SendToBoss()
        {
            PolicyList policyList = PolicyList.getInstance();
            IEnumerable<Policy> list = policyList.GetPolicyAccount();

            if (!ListEmpty(list))
            {
                Driver driversTo = GetDriverForSending(RolesList.Boss);

                string mailText = CreateMailToBoss(list);

                var email = new EMail();

                email.SendNotification(driversTo, mailText);
            }
        }
 private void Send()
 {
     EMail mail = new EMail();
     mail.sendMailViolation(_violation);
 }