internal void DoRequest(ERP_DB ctx, ref Dictionary <string, string> holders, int notificationID, string plant) { var userFromPlaceHolders = holders.SingleOrDefault(holder => holder.Key != null && holder.Key.Equals("user")).Value; var phoneNumber = ctx.SpisPracownikow.FirstOrDefault(user => user.ImieNaziwsko != null && user.ImieNaziwsko.Equals(userFromPlaceHolders)).Telefon; var typWezwania = ctx.SpisWezwania.SingleOrDefault(sw => sw.ID == notificationID).TypyWezwanID; var voiceType = 2; //tmp if (typWezwania == voiceType) { var notifVoice = new NotificationVoice(); notifVoice.GetAndFillTemplate(ctx, holders, notificationID); VoiceRequest(phoneNumber, notifVoice.NotificationBody); } else { var notifSms = new NotificationSMS(); notifSms.GetAndFillTemplate(ctx, holders, notificationID); SmsRequest(phoneNumber, notifSms.NotificationBody); } }