Esempio n. 1
2
	public SmsHandler()
	{	
	    clientNo = ConfigurationManager.AppSettings["ClientNo"];
        clientPass = ConfigurationManager.AppSettings["ClientPass"];
        serviceType = Convert.ToInt32(ConfigurationManager.AppSettings["ServiceType"]);
        upiSrv = new ServiceSoapClient("ServiceSoap");
	} 
 public void GetWorkouts()
 {
     TrainingPeaks.ServiceSoapClient client = new ServiceSoapClient("ServiceSoap12");
     var workouts = client.GetWorkoutsForAthlete(Config.TrainingPeaksUserName, Config.TrainingPeaksPassword, DateTime.Now.AddDays(-1),
         DateTime.Now.AddDays(1));
     
 }
Esempio n. 3
0
        private void searchStudent()
        {
            string strName   = txtName.Text;
            string strAdress = txtAdress.Text;
            string strEmail  = txtEmail.Text;

            Student stuSearch = new Student()
            {
                Name = strName, Adress = strAdress, Email = strEmail
            };

            ServiceSoapClient serviceSql = new ServiceSoapClient();
            var listStudent = serviceSql.SearchStudent(stuSearch);

            listView1.Columns.Add("Name", 100, System.Windows.Forms.HorizontalAlignment.Left);
            listView1.Columns.Add("Email", 100, System.Windows.Forms.HorizontalAlignment.Left);
            listView1.Columns.Add("Adress", 100, System.Windows.Forms.HorizontalAlignment.Left);
            foreach (var student in listStudent)
            {
                string[] studentArray = new string[3] {
                    student.Name, student.Email, student.Adress
                };
                listView1.Items.Add(new ListViewItem(studentArray));
            }
        }
Esempio n. 4
0
        /// <summary>Invia il viaggio a TXTango e ritorna l'evento relativo all'aggiornamento.</summary>
        /// <param name="login">L'oggetto login da inviare a TXTango per l'autenticazione della richiesta.</param>
        /// <returns>Eventi</returns>
        public Eventi TXUpdate(TXTango.Login login)
        {
            PlanningInsert       planning = this.TXCreateObject();
            ServiceSoapClient    service  = new ServiceSoapClient();
            PlanningResultInsert result   = service.Update_Planning(login, planning);

            Eventi evento = new Eventi();

            evento.SyncData = DateTime.Now;
            evento.SyncTask = ConfigurationManager.AppSettings["TXTANGO_TASK_INSERT"];
            evento.SyncTipo = ConfigurationManager.AppSettings["TXTEMP_TO_TXTANGO"];
            if (result.Errors.Length > 0)
            {
                log.Error("Errore TXTango: " + result.Errors[0].ErrorCode.ToString());
                evento.Stato     = ConfigurationManager.AppSettings["TXTANGO_STATO_NOT_DELIVERED"];
                evento.SyncStato = ConfigurationManager.AppSettings["TXTEMP_STATO_ERRORE"];
                evento.Note      = "Vedi XmlResponse per i dettagli sugli errori";
            }
            else
            {
                evento.Stato     = ConfigurationManager.AppSettings["TXTANGO_STATO_DELIVERED"];
                evento.SyncStato = ConfigurationManager.AppSettings["TXTEMP_STATO_SINCRONIZZATO"];
            }
            evento.XmlRequest  = Serializer.SerializeObject(planning, SerializationType.XML);
            evento.XmlResponse = Serializer.SerializeObject(result, SerializationType.XML);

            return(evento);
        }
Esempio n. 5
0
        /// <summary>Cancella il viaggio da TXTango e ritorna l'evento relativo all'eliminazione.</summary>
        /// <param name="login">L'oggetto login da inviare a TXTango per l'autenticazione della richiesta.</param>
        /// <returns>Eventi</returns>
        public Eventi TXDelete(TXTango.Login login)
        {
            PlanningItemSelection planning = new PlanningItemSelection();

            planning.PlanningSelectionType = enumPlanningItemSelectionType.TRIP;
            planning.ID = ConfigurationManager.AppSettings["TXTANGO_ID_PREFIX"] + this.Id;
            ServiceSoapClient service = new ServiceSoapClient();
            ExecutionResult   result  = service.Cancel_Planning(login, planning);
            Eventi            evento  = new Eventi();

            evento.SyncData = DateTime.Now;
            evento.SyncTask = ConfigurationManager.AppSettings["TXTANGO_TASK_DELETE"];
            evento.SyncTipo = ConfigurationManager.AppSettings["TXTEMP_TO_TXTANGO"];
            if (result.Errors.Length > 0)
            {
                log.Error("Errore TXTango: " + result.Errors[0].ErrorCode.ToString());
                evento.Stato     = ConfigurationManager.AppSettings["TXTANGO_STATO_NOT_DELIVERED"];
                evento.SyncStato = ConfigurationManager.AppSettings["TXTEMP_STATO_ERRORE"];
                evento.Note      = "Vedi XmlResponse per i dettagli sugli errori";
            }
            else
            {
                evento.Stato     = ConfigurationManager.AppSettings["TXTANGO_STATO_CANCELED"];
                evento.SyncStato = ConfigurationManager.AppSettings["TXTEMP_STATO_SINCRONIZZATO"];
                // setto a "CANCELED anche tutte le spedizioni)
                this.CancellaSpedizioni();
            }
            evento.XmlRequest  = Serializer.SerializeObject(planning, SerializationType.XML);
            evento.XmlResponse = Serializer.SerializeObject(result, SerializationType.XML);

            return(evento);
        }
Esempio n. 6
0
        // GET: Order
        public ActionResult Import(HttpPostedFileBase file)
        {
            if (file == null || file.ContentLength == 0)
            {
                ViewBag.StatusClass   = "alert alert-warning";
                ViewBag.StatusMessage = "O campo não pode estar vazio.";

                return(View());
            }

            var filePath = Path.Combine(Server.MapPath("~/TempImportFiles"), Path.GetFileName(file.FileName));

            try
            {
                file.SaveAs(filePath);

                var client = new ServiceSoapClient();
                client.ImportFile(filePath);

                ViewBag.StatusClass   = "alert alert-success";
                ViewBag.StatusMessage = "Arquivo importado com sucesso.";
            }
            catch (Exception e)
            {
                string message = InnerException(e).Message;

                ViewBag.StatusClass   = "alert alert-danger";
                ViewBag.StatusMessage = $"Erro ao importar o arquivo. Erro: {message}";
            }

            return(View());
        }
        public async Task<IList<JourneyResult>> GetJourneys(string stopCode)
        {
            ServiceSoapClient client = new ServiceSoapClient();
            using (new OperationContextScope(client.InnerChannel))
            {
                OperationContext.Current.OutgoingMessageHeaders.Add(new CtsMessageHeader());
                var result = await client.rechercheProchainesArriveesWebAsync(new rechercheProchainesArriveesWebRequest
                {
                    CodeArret = stopCode,
                    Heure = DateTime.Now.ToString("HH:mm"),
                    Mode = 0,
                    NbHoraires = 3
                });

                var lignes = Ligne.GetLignes();

                return result.rechercheProchainesArriveesWebResult.ListeArrivee.Select(journey =>
                {
                    int indexWhiteSpace = journey.Destination.IndexOf(" ");
                    string number = journey.Destination.Substring(0, indexWhiteSpace);

                    return new JourneyResult
                    {
                        Direction = journey.Destination.Remove(0, indexWhiteSpace).Trim(),
                        Mode = journey.Mode,
                        Time = journey.Horaire.Remove(journey.Horaire.Length - 3).Replace(':', 'h'),
                        Ligne = lignes.Single(ligne => ligne.Number.Equals(number))
                    };
                }).ToList();
            }
        }
        public MapaPosicionesActuales()
        {
            InitializeComponent();
            this.DataContext    = this;
            this.servicioMobile = new ServiceSoapClient();
            this.Vendedores     = new ObservableCollection <Vendedor>();

            this.FechaDesde = DateTime.Today.AddHours(8);
            this.FechaHasta = DateTime.Today.AddDays(1);

            var mdp = ControladorMapa.ObtenerCordenadasPorDireccion("Mar del Plata, Buenos Aires");

            if (mdp.HasValue)
            {
                this.mapa.Position = mdp.Value;
            }
            else
            {
                this.mapa.Position = new PointLatLng(-38.0042615, -57.6070055);
            }

            this.actualizadorDePosiciones          = new Timer(45000);
            this.actualizadorDePosiciones.Elapsed += actualizadorDePosiciones_Elapsed;
            this.actualizadorDePosiciones.Start();

            this.listaDeElementos.SelectionChanged += listaDeElementos_SelectionChanged;

            this.CmdVerClientesPorRuta   = new RelayCommand(e => this.VerClientesDelVendedor(e));
            this.CmdDibujarZona          = new RelayCommand(e => this.VerZonasDelVendedor(e));
            this.CmdVerCaminoPreventista = new RelayCommand(e => this.VerCaminoDelVendedor(e));
            //this.CmdVerificarPreventistaDentroDeZona = new RelayCommand(e => this.VerificarPreventistaDentroDeZona(e));
            this.CmdVerDomicilioVendedor = new RelayCommand(e => this.VerDomicilioVendedor(e));
        }
Esempio n. 9
0
        public async Task <IList <JourneyResult> > GetJourneys(string stopCode)
        {
            ServiceSoapClient client = new ServiceSoapClient();

            using (new OperationContextScope(client.InnerChannel))
            {
                OperationContext.Current.OutgoingMessageHeaders.Add(new CtsMessageHeader());
                var result = await client.rechercheProchainesArriveesWebAsync(new rechercheProchainesArriveesWebRequest
                {
                    CodeArret  = stopCode,
                    Heure      = DateTime.Now.ToString("HH:mm"),
                    Mode       = 0,
                    NbHoraires = 3
                });

                var lignes = Ligne.GetLignes();

                return(result.rechercheProchainesArriveesWebResult.ListeArrivee.Select(journey =>
                {
                    int indexWhiteSpace = journey.Destination.IndexOf(" ");
                    string number = journey.Destination.Substring(0, indexWhiteSpace);

                    return new JourneyResult
                    {
                        Direction = journey.Destination.Remove(0, indexWhiteSpace).Trim(),
                        Mode = journey.Mode,
                        Time = journey.Horaire.Remove(journey.Horaire.Length - 3).Replace(':', 'h'),
                        Ligne = lignes.Single(ligne => ligne.Number.Equals(number))
                    };
                }).ToList());
            }
        }
Esempio n. 10
0
        internal static void EmailContactsWithNullModules(ref Customer currentCustomer, string role)
        {
            string custKey = currentCustomer == null ? "cust = null" : currentCustomer.Key.ToString();
            string summary = string.Format($@"These contacts have titles = null. {Environment.NewLine} {Environment.NewLine} 
                                              Current CustKey: {custKey} {Environment.NewLine} {Environment.NewLine}");

            var contactsWithNullTitles = currentCustomer.Contacts.Where(c => c.Module == null).ToList();

            contactsWithNullTitles.ForEach(c =>
            {
                c.Module = role;
                summary += string.Format($"Contact Key: {c.Key} - Contact Name: {c.Name} {Environment.NewLine}");
            });


            if (contactsWithNullTitles.Count > 0)
            {
                if (Debugger.IsAttached)
                {
                    MessageBox.Show(summary); return;
                }

                ServiceSoapClient client = new ServiceSoapClient();
                client.Email("*****@*****.**", "*****@*****.**", "ContactManager Error", summary, false, "", "");
            }
        }
Esempio n. 11
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            ProgressIndicator indicator = new ProgressIndicator();

            indicator.IsIndeterminate = true;
            indicator.IsVisible       = true;
            indicator.Text            = "Seferler yükleniyor..";
            string whereFrom = NavigationContext.QueryString["whereFrom"];
            string whereTo   = NavigationContext.QueryString["whereTo"];

            dateFrom       = NavigationContext.QueryString["dateFrom"];
            passengerCount = NavigationContext.QueryString["passengerCount"];
            actionType     = NavigationContext.QueryString["actionType"] == "Satış" ? "0" : "1";
            string requestFrom = "<Sefer>" +
                                 "<FirmaNo>0</FirmaNo>" +
                                 "<KalkisAdi>" + whereFrom + "</KalkisAdi>" +
                                 "<VarisAdi>" + whereTo + "</VarisAdi>" +
                                 "<Tarih>" + dateFrom + "</Tarih>" +
                                 "<AraNoktaGelsin>1</AraNoktaGelsin>" +
                                 "<IslemTipi>" + actionType + "</IslemTipi>" +
                                 "<YolcuSayisi>" + passengerCount + "</YolcuSayisi>" +
                                 "</Sefer>";
            ServiceSoapClient client = new ServiceSoapClient();

            client.StrIsletAsync(requestFrom, Database.Admin);
            client.StrIsletCompleted += client_StrIsletCompleted;
            SystemTray.SetProgressIndicator(this, indicator);
            WhereFrom.Text      = whereFrom;
            WhereTo.Text        = whereTo;
            TimeGrid.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x33, 0x99, 0xFF));
            TimeText.Foreground = new SolidColorBrush(Colors.White);
            TimeImage.Source    = new BitmapImage(new Uri("/Assets/down.png", UriKind.Relative));
            orderType           = 3;
            base.OnNavigatedTo(e);
        }
Esempio n. 12
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            ProgressIndicator indicator = new ProgressIndicator();

            indicator.IsIndeterminate = true;
            indicator.IsVisible       = true;
            indicator.Text            = "Şehirler yükleniyor..";
            ServiceSoapClient client = new ServiceSoapClient();

            client.StrIsletAsync("<Kalkis><FirmaNo>0</FirmaNo><IlceleriGoster>1</IlceleriGoster></Kalkis>", Database.Admin);
            client.StrIsletCompleted += client_StrIsletCompleted;
            SystemTray.SetProgressIndicator(this, indicator);
            if (string.IsNullOrEmpty(DateFrom.Text))
            {
                DateFrom.Text = DateTime.Now.ToString("d MMMMMMM yyyy");
            }
            if (string.IsNullOrEmpty(PassengerCount.Text))
            {
                PassengerCount.Text = "1";
            }
            if (string.IsNullOrEmpty(ActionType.Text))
            {
                ActionType.Text = "Rezervasyon";
            }
            base.OnNavigatedTo(e);
        }
        public RegisterationBusiness()
        {
            BasicHttpBinding binding = new BasicHttpBinding();
            EndpointAddress  address = new EndpointAddress("http://ws_xdsl.tce.local/service.asmx");

            _service = new ServiceSoapClient(binding, address);
        }
Esempio n. 14
0
        public static void GetJourneys(Journey journey)
        {
            IsJourneysCompleted = false;
            string xml;

            if (journey.From.Type == StationType.Bus)
            {
                xml = JourneyParsing.GetJourneys(journey);
            }
            else
            {
                xml = JourneyParsing.GetFlights(journey);
            }
            var client = new ServiceSoapClient();

            client.StrIsletAsync(xml, Global.Authorization);
            client.StrIsletCompleted += (s, e) =>
            {
                string xmlResult = e.Result;
                if (journey.From.Type == StationType.Bus)
                {
                    PopulateJourneys(xmlResult);
                }
                else
                {
                    PopulateFlights(xmlResult);
                }
            };
        }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            ProgressIndicator indicator = new ProgressIndicator();

            indicator.IsIndeterminate = true;
            indicator.IsVisible       = true;
            indicator.Text            = "Koltuklar yükleniyor..";
            ServiceSoapClient client = new ServiceSoapClient();
            string            query  = "<Otobus>" +
                                       "<FirmaNo>" + Database.SeferDetaylari.Firma.No + "</FirmaNo>" +
                                       "<KalkisAdi>" + Database.SeferDetaylari.KalkisYeri + "</KalkisAdi>" +
                                       "<VarisAdi>" + Database.SeferDetaylari.VarisYeri + "</VarisAdi>" +
                                       "<Tarih>" + Database.SeferDetaylari.Tarih.ToString("yyyy-MM-dd") + "</Tarih>" +
                                       "<Saat>" + Database.SeferDetaylari.Saat + "</Saat>" +
                                       "<HatNo>" + Database.SeferDetaylari.HatNo + "</HatNo>" +
                                       "<IslemTipi>" + Database.SeferDetaylari.IslemTipi + "</IslemTipi>" +
                                       "<SeferTakipNo>" + Database.SeferDetaylari.TakipNo + "</SeferTakipNo>" +
                                       "</Otobus>";

            client.StrIsletAsync(query, Database.Admin);
            client.StrIsletCompleted += client_StrIsletCompleted;
            SystemTray.SetProgressIndicator(this, indicator);
            passengerCount      = Convert.ToInt32(NavigationContext.QueryString["passengerCount"]);
            MaleGrid.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x33, 0x99, 0xFF));
            MaleText.Foreground = new SolidColorBrush(Colors.White);
            Database.Cinsiyet   = Cinsiyet.Bay;
            base.OnNavigatedTo(e);
        }
Esempio n. 16
0
        public static int SendSms_new(EmployeeMarketslidesendmail Mobj)
        {
            int intStatus = 0;

            if (!string.IsNullOrEmpty(Mobj.strbody))
            {
                ServiceSoapClient cc = new ServiceSoapClient();
                try
                {
                    if (Mobj.strMobileCountryCode != "91" && Mobj.strMobileCountryCode != null && Mobj.strMobileCountryCode != "undefined")
                    {
                        string strMobileOther = Mobj.strMobileCountryCode + Mobj.strMobileNumber.Trim();
                        string result         = cc.SendTextSMS("yrd", "01291954", strMobileOther, "Dear " + Mobj.strName.Trim() + "," + Mobj.strbody + " Support:" + Mobj.strEmpname + " : 91-" + Mobj.strEmpmobileNumber + " ", "smscntry");
                    }
                    else
                    {
                        string result = cc.SendTextSMS("ykrishna", "summary$1", Mobj.strMobileNumber.Trim(), "Dear " + Mobj.strName.Trim() + "," + Mobj.strbody + " Support:" + Mobj.strEmpname + " : 91-" + Mobj.strEmpmobileNumber + "   www.kaakateeya.com ", "smscntry");
                    }
                }
                catch (Exception ee)
                {
                }
                return(intStatus);
            }

            return(intStatus);
        }
Esempio n. 17
0
        // 07_03_2018 Employee sms

        public int?Employeesmsformatchfollowup([FromBody] employeesmsmatchfollowup Mobj)
        {
            ServiceSoapClient cc      = new ServiceSoapClient();
            string            result1 = cc.SendTextSMS("ykrishna", "summary$1", Mobj.Mobilenumber, Mobj.Matchfollouptext, "smscntry");

            return(1);
        }
Esempio n. 18
0
        public void PopulaListaDeSubSecoes()
        {
            //WebService = CriaObjetoConexaoWS();
            WebService = CriaObjetoConexaoWS();

            comboBoxNomeUsuario.DataSource = WebService.wsListagemDeUsuarios();
        }
Esempio n. 19
0
        private void btnCadastrar_Click(object sender, EventArgs e)
        {
            string mensagemDeErro    = string.Empty;
            bool   cadastrado        = false;
            bool   subSecaoExistente = false;

            if (!string.IsNullOrEmpty(txtNomeSubSecao.Text))
            {
                try
                {
                    BasicHttpsBinding binding = new BasicHttpsBinding();
                    binding.Security.Mode = BasicHttpsSecurityMode.Transport;
                    EndpointAddress   endpoint   = new EndpointAddress("https://wsoab.oabrs.org.br/Service.asmx");
                    ServiceSoapClient WebService = new ServiceSoapClient(binding, endpoint);
                    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

                    cadastrado = WebService.wsCadastrarSubSecao(txtNomeSubSecao.Text.Trim(), out subSecaoExistente);

                    if (cadastrado)
                    {
                        notifyIcon1.Icon            = this.Icon;
                        notifyIcon1.BalloonTipTitle = "Cadastro de Sub Seções";
                        notifyIcon1.BalloonTipText  = $"Cadastro realizado com sucesso!";
                        notifyIcon1.ShowBalloonTip(20);

                        cadastrado = false;

                        this.Close();
                    }
                    else if (subSecaoExistente)
                    {
                        notifyIcon1.Icon            = this.Icon;
                        notifyIcon1.BalloonTipTitle = "Cadastro de Sub Seções";
                        notifyIcon1.BalloonTipText  = $"Sub Seção já cadastrada!";
                        notifyIcon1.ShowBalloonTip(20);

                        subSecaoExistente = false;
                    }
                    else
                    {
                        notifyIcon1.Icon            = this.Icon;
                        notifyIcon1.BalloonTipTitle = "Cadastro de Sub Seções";
                        notifyIcon1.BalloonTipText  = $"Erro. Cadastro não efetuado.";
                        notifyIcon1.ShowBalloonTip(20);
                    }
                }
                catch (Exception ex)
                {
                    mensagemDeErro = ex.Message;
                }
            }
            else
            {
                notifyIcon1.Icon            = this.Icon;
                notifyIcon1.BalloonTipTitle = "Cadastro de Sub Seções";
                notifyIcon1.BalloonTipText  = $"Nenhum nome de sub seção foi inserido!";
                notifyIcon1.ShowBalloonTip(20);
            }
        }
Esempio n. 20
0
        private static Random random = new Random((int)DateTime.Now.Ticks);//thanks to McAden

        public decimal GetPremiumDetail(MobileHome.Insure.Model.Rental.Quote quote, bool generatePolicy = false)
        {
            decimal premium = 0;

            //prepare XML file for sending and take the result from other service
            using (var cxt = new mhRentalContext())
            {
                //cxt.Configuration.ProxyCreationEnabled = false;
                var customerInfo  = cxt.Customers.FirstOrDefault(c => c.Id == quote.CustomerId);
                var amountCharged = 0M;
                // As per requirement, we are not sending the proc fee to aegis
                if (quote.InstallmentFee.HasValue)
                {
                    amountCharged = quote.PremiumChargedToday.Value + quote.InstallmentFee.Value;
                }

                XElement rootEle = new XElement("root",
                                                GetPolicyReturnInfo(generatePolicy, amountCharged),
                                                GetPropertyDealerInfo(string.IsNullOrEmpty(customerInfo.Park.Subproducer) ? ConfigurationManager.AppSettings["MHISubproducerCode"] : customerInfo.Park.Subproducer),
                                                GetPropertyInfo(customerInfo),
                                                new XElement("unitinfo", GetHouseUnitInfo(quote.PersonalProperty))
                                                );

                rootEle.Element("unitinfo").Add(new XElement("covinfo",
                                                             GetCoverItemInfo(CoverType.persprop, limit: quote.PersonalProperty),
                                                             GetCoverItemInfo(CoverType.deductible, deductible: quote.Deductible),
                                                             GetCoverItemInfo(CoverType.lou, limit: quote.LOU),
                                                             GetCoverItemInfo(CoverType.liability, limit: quote.Liability),
                                                             GetCoverItemInfo(CoverType.medpay, limit: quote.MedPay),
                                                             GetCoverItemInfo(CoverType.thirdpartydesignee)
                                                             ));
                if (quote.SendLandLord)
                {
                    rootEle.Element("unitinfo").Add(new XElement("addl_exposure",
                                                                 GetAdditionalExposure(customerInfo.Park)));
                }

                //Call service and get the result with Premium
                ServiceSoapClient sClient = new ServiceSoapClient(ConfigurationManager.AppSettings["ServiceConfigName"]);
                sClient.InnerChannel.OperationTimeout = new TimeSpan(0, 10, 0);

                XmlDocument doc = new XmlDocument();
                doc.LoadXml(rootEle.ToString());
                XmlNode xnode = doc.FirstChild;

                XmlNode result = sClient.QuotePolicy(ConfigurationManager.AppSettings["PasskeyForAegisService"], xnode, "AGHO", AstecProcessingMode.SubmitOverride);

                if (result != null)
                {
                    var elements = result.SelectSingleNode("rtninfo");
                    if (elements != null && elements["returnc"].InnerText != "001")
                    {
                        quote.Premium        = premium = Convert.ToDecimal(elements["premwrit"].InnerText);
                        quote.ProposalNumber = elements["policynbr"].InnerText;
                    }
                }
            }
            return(premium);
        }
 public ReportesPorDiaPorVendedor()
 {
     InitializeComponent();
     this.servicioMobile             = new ServiceMobile.ServiceSoapClient();
     this.DataContext                = this;
     this.dtpFechaDesde.SelectedDate = DateTime.Today;
     this.dtpFechaHasta.SelectedDate = DateTime.Today.AddDays(1);
 }
Esempio n. 22
0
        // GET: Order
        public ActionResult import(HttpPostedFileBase file)
        {
            var client = new ServiceSoapClient();

            client.Example();

            return(View());
        }
Esempio n. 23
0
        private static ServiceSoapClient CreateClient(string systemName)
        {
            var apiUrl = $"https://api.ongoingsystems.se/{systemName}/service.asmx";
            BasicHttpBinding binding = CreateBinding();
            var soapClient           = new ServiceSoapClient(binding, new EndpointAddress(apiUrl));

            return(soapClient);
        }
        /// <summary>
        /// Obtiene una lista de los conceptos admitidos por el servicio web.
        /// </summary>
        public ConceptoTipo[] ObtenerConceptos()
        {
            using (var Clie = new ServiceSoapClient()) {
                var Res = Clie.FEParamGetTiposConcepto(this.CrearFEAuthRequest());

                return(Res.ResultGet);
            }
        }
        /// <summary>
        /// Obtiene los datos del último comprobante autorizado para un PV.
        /// </summary>
        /// <param name="pv">El punto de venta a consultar.</param>
        /// <param name="tipoComprob">El tipo de comprobante a consultar.</param>
        public FERecuperaLastCbteResponse UltimoComprobante(int pv, Tablas.ComprobantesTipos tipoComprob)
        {
            using (var Clie = new ServiceSoapClient()) {
                var Res = Clie.FECompUltimoAutorizado(this.CrearFEAuthRequest(), pv, (int)tipoComprob);

                return(Res);
            }
        }
        /// <summary>
        /// Consulta el estado de los servicios web de AFIP.
        /// </summary>
        /// <returns>True si los servicios están funcionando</returns>
        public static bool ProbarEstadoServicios()
        {
            using (var Clie = new ServiceSoapClient()) {
                var Estado = Clie.FEDummy();

                return(Estado.AppServer == "OK" && Estado.AuthServer == "OK");                // && Estado.DbServer == "OK";
            }
        }
        /// <summary>
        /// Obtiene una lista de los tipos de comprobante admitidos por el servicio web.
        /// </summary>
        public CbteTipo[] ObtenerTiposDeComprobante()
        {
            using (var Clie = new ServiceSoapClient()) {
                var Res = Clie.FEParamGetTiposCbte(this.CrearFEAuthRequest());

                return(Res.ResultGet);
            }
        }
Esempio n. 28
0
        /// <summary>Interroga TXTango riguardo ai consumi (+ velocità media e ore di guida), aggiorna nel database la tabella "Viaggi" e ritorna un evento contenente lo stato del viaggio impostato a "CLOSED".</summary>
        /// <param name="login">L'oggetto login da inviare a TXTango per l'autenticazione della richiesta.</param>
        /// <returns>Eventi</returns>
        public Eventi TXGetConsumptionReport(TXTango.Login login)
        {
            // se non sono presenti le date di inizio e fine viaggio non posso ricavare correttamente i consumi del viaggio
            if (this.DataInizio == DateTime.MinValue || this.DataFine == DateTime.MinValue)
            {
                throw new Exception("Impossibile ricavare i consumi poichè non sono presenti le date di inizio o fine viaggio. IdViaggio: " + this.Id + " KeyViaggio: " + this.KeyViaggio);
            }

            ServiceSoapClient service = new ServiceSoapClient();

            // chiamata per i consumi
            ConsumptionReportSelection reportSelection = new ConsumptionReportSelection();

            reportSelection.DateTimeRangeSelection = new DateTimeRangeSelection()
            {
                StartDate = (DateTime)this.DataInizio, EndDate = this.DataFine
            };
            reportSelection.Drivers    = new Identifier[1];
            reportSelection.Drivers[0] = new Identifier()
            {
                IdentifierType = enumIdentifierType.TRANSICS_ID, Id = this.CodiceAutista
            };
            reportSelection.SummaryLevel = SummaryLevel.OnlyTotal;
            GetConsumptionReportResult result = service.Get_ConsumptionReport(login, reportSelection);

            Eventi evento = new Eventi();

            evento.SyncData    = DateTime.Now;
            evento.SyncTask    = ConfigurationManager.AppSettings["TXTANGO_TASK_GET_CONSUMPTIONS"];
            evento.SyncTipo    = ConfigurationManager.AppSettings["TXTEMP_FROM_TXTANGO"];
            evento.XmlRequest  = Serializer.SerializeObject(reportSelection, SerializationType.XML);
            evento.XmlResponse = Serializer.SerializeObject(result, SerializationType.XML);
            evento.Stato       = ConfigurationManager.AppSettings["TXTANGO_STATO_CLOSED"];

            if (result.Errors.Length == 0)
            {
                if (result.ConsumptionReportItems.Length > 0)
                {
                    this.ConsumoLt     = (result.ConsumptionReportItems[0].Consumption_Total != null) ? result.ConsumptionReportItems[0].Consumption_Total.Value : 0;
                    this.VelocitaMedia = (result.ConsumptionReportItems[0].Speed_Avg != null) ? result.ConsumptionReportItems[0].Speed_Avg.Value : 0;
                    this.OreGuida      = (result.ConsumptionReportItems[0].Duration_Driving != null) ? result.ConsumptionReportItems[0].Duration_Driving.Value : 0;
                    this.Update();
                }
                else
                {
                    evento.Note = "Nessuna informazione pervenuta da TXTango.";
                }
                evento.SyncStato = ConfigurationManager.AppSettings["TXTEMP_STATO_SINCRONIZZATO"];
            }
            else
            {
                log.Error("Errore TXTango: " + result.Errors[0].ErrorCode.ToString());
                evento.SyncStato = ConfigurationManager.AppSettings["TXTEMP_STATO_ERRORE"];
                evento.Note      = "Vedi Xml Response per i dettagli sugli errori.";
            }

            return(evento);
        }
Esempio n. 29
0
        /// <summary>Interroga TXTango e ritorna un evento contenente lo stato del viaggio.
        /// Si occupa inoltre di salvare le date di inizio e fine viaggio quanto occorrono i rispettivi eventi.</summary>
        /// <param name="login">L'oggetto login da inviare a TXTango per l'autenticazione della richiesta.</param>
        /// <returns>Eventi</returns>
        public Eventi TXGetStatus(TXTango.Login login)
        {
            // richiedo a TXTango lo stato del viaggio
            PlanningSelection     planningSelection = new PlanningSelection();
            PlanningItemSelection itemSelection     = new PlanningItemSelection();

            itemSelection.PlanningSelectionType = enumPlanningItemSelectionType.TRIP;
            itemSelection.ID       = ConfigurationManager.AppSettings["TXTANGO_ID_PREFIX"] + this.Id;
            planningSelection.Item = itemSelection;
            ServiceSoapClient service = new ServiceSoapClient();
            GetPlanningResult result  = service.Get_Planning(login, planningSelection);

            // creo e ritorno l'evento relativo allo stato di viaggio
            Eventi evento = new Eventi();

            evento.SyncData    = DateTime.Now;
            evento.SyncTask    = ConfigurationManager.AppSettings["TXTANGO_TASK_GET_STATUS"];
            evento.SyncTipo    = ConfigurationManager.AppSettings["TXTEMP_FROM_TXTANGO"];
            evento.XmlRequest  = Serializer.SerializeObject(planningSelection, SerializationType.XML);
            evento.XmlResponse = Serializer.SerializeObject(result, SerializationType.XML);

            if (result.Errors.Length > 0)
            {
                log.Error("Errore TXTango: " + result.Errors[0].ErrorCode.ToString());
                evento.SyncStato = ConfigurationManager.AppSettings["TXTEMP_STATO_ERRORE"];
                evento.Note      = "Vedi XmlResponse per i dettagli sugli errori.";
            }
            else
            {
                // se il viaggio è partito registro la data di inizio viaggio
                if (result.ItemSelection.Trips[0].Status.ToString() == ConfigurationManager.AppSettings["TXTANGO_STATO_BUSY"])
                {
                    this.DataInizio = result.ItemSelection.Trips[0].StartDate.Value;
                    this.Update();
                }

                // se il viaggio è terminato registro la data di fine viaggio
                if (result.ItemSelection.Trips[0].Status.ToString() == ConfigurationManager.AppSettings["TXTANGO_STATO_FINISHED"])
                {
                    this.DataFine = result.ItemSelection.Trips[0].EndDate.Value;
                    this.Update();
                }

                evento.SyncStato = ConfigurationManager.AppSettings["TXTEMP_STATO_SINCRONIZZATO"];
                evento.Stato     = result.ItemSelection.Trips[0].Status.ToString();
                if (evento.Stato == ConfigurationManager.AppSettings["TXTANGO_STATO_FINISHED"])
                {
                    evento.Data = this.DataFine;
                }
                else if (this.DataInizio != DateTime.MinValue)
                {
                    evento.Data = this.DataInizio;
                }
            }

            return(evento);
        }
Esempio n. 30
0
        public MainForm()
        {
            mClient = new ServiceSoapClient();

            RetrieveEmployees();
            RetrieveDepartments();

            InitializeComponent();
        }
Esempio n. 31
0
File: Form1.cs Progetto: dalkan/WSAD
        private void deleteStudent()
        {
            string strName = txtName.Text;
            string strAdress = txtAdress.Text;
            string strEmail = txtEmail.Text;

            Student stuDelete = new Student() { Name = strName, Adress = strAdress, Email = strEmail };
            ServiceSoapClient serviceSql = new ServiceSoapClient();
            serviceSql.DeleteStudent(stuDelete);
        }
Esempio n. 32
0
 public SoapService(ConnectionCredentials connectionCredentials)
 {
     if (connectionCredentials == null)
     {
         throw new ArgumentException("Credentials needed", nameof(connectionCredentials));
     }
     _soapClient = CreateClient(connectionCredentials.SystemName);
     _user       = connectionCredentials.User;
     _goodsOwner = connectionCredentials.GoodsOwner;
 }
Esempio n. 33
0
        // GET: Test
        public ActionResult Index()
        {
            SKH_Check.ServiceSoapClient check = new ServiceSoapClient();
            string name = "";
            string ACC  = "";

            ViewBag.result = check.CHECK_AUTH("M012363", "Hsieh0919", ref name, ref ACC);
            ViewBag.name   = name;
            ViewBag.ACC    = ACC;
            return(View());
        }
        private void btnExcluir_Click(object sender, EventArgs e)
        {
            string executarExclusao = string.Empty;

            if (listaDeMaquinas.SelectedItems.Count > 0)
            {
                executarExclusao = MessageBox.Show("A máquina selecionada será excluída! Se esta máquina estiver ativa no sistema, a exclusão da mesma poderá ocasionar erros! Você tem certeza disso?", "ATENÇÃO", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1).ToString();

                if (executarExclusao == "Yes")
                {
                    string IPMaquina         = string.Empty;
                    string subSecao          = string.Empty;
                    string numeroMaquina     = string.Empty;
                    string nomeMaquina       = string.Empty;
                    string dadosConcatenados = string.Empty;
                    bool   linhaExcluida     = false;

                    for (int i = 0; i < listaDeMaquinas.SelectedItems[0].SubItems.Count; i++)
                    {
                        dadosConcatenados += listaDeMaquinas.SelectedItems[0].SubItems[i].Text + ":";
                    }

                    string[] arrayItens = dadosConcatenados.Split(':');

                    IPMaquina     = arrayItens[0];
                    subSecao      = arrayItens[1];
                    numeroMaquina = arrayItens[4];
                    nomeMaquina   = arrayItens[5];

                    WebService    = CriaObjetoConexaoWS();
                    linhaExcluida = WebService.wsExcluirMaquina(IPMaquina.Trim(), subSecao.Trim(), numeroMaquina.Trim(), nomeMaquina.Trim());

                    if (linhaExcluida)
                    {
                        notifyIcon1.Icon            = this.Icon;
                        notifyIcon1.BalloonTipTitle = "Excluir Máquinas";
                        notifyIcon1.BalloonTipText  = $"Máquina excluida com sucesso!";
                        notifyIcon1.ShowBalloonTip(20);

                        listaDeMaquinas.Items.Remove(listaDeMaquinas.SelectedItems[0]);

                        this.Dispose();
                    }
                    else
                    {
                        notifyIcon1.Icon            = this.Icon;
                        notifyIcon1.BalloonTipTitle = "Excluir Máquinas";
                        notifyIcon1.BalloonTipText  = $"Erro! Máquina não excluída.";
                        notifyIcon1.ShowBalloonTip(20);
                        this.Dispose();
                    }
                }
            }
        }
Esempio n. 35
0
 public Comprobante ObtenerCompUltimoAutorizado()
 {
     FEAuthRequest feAuthRequest = new FEAuthRequest();
     // MIGRAR LA BUSQUEDA A LA CLASE COMPROBANTE
     feAuthRequest.Cuit = _ticket.Cuit;
     feAuthRequest.Sign = _ticket.Sign;
     feAuthRequest.Token = _ticket.Token;
     ServiceSoapClient client = new ServiceSoapClient();
     FERecuperaLastCbteResponse result = client.FECompUltimoAutorizado(feAuthRequest, 27, 1);
     Console.WriteLine(" ULTIMO COMPROBANTE PARA  EL PVTA 27 TIPO TIPO COMPROBANTE 1 - FACTURA ");
     Console.WriteLine(result.CbteNro);
     return new Comprobante();
 }
Esempio n. 36
0
File: Form1.cs Progetto: dalkan/WSAD
        private void metodStudentSave()
        {
            string strName = txtName.Text;
            string strAdress = txtAdress.Text;
            string strEmail = txtEmail.Text;

            Student stuSave = new Student() { Name = strName, Adress = strAdress, Email = strEmail };

            ServiceSoapClient serviceSql = new ServiceSoapClient();
            serviceSql.SaveStudent(stuSave);

            /*SqlAgent sqlAgent = new SqlAgent();
            sqlAgent.metodSqlStudentSave(stuSave);
            */
        }
        /// <summary>
        /// DoRequest
        /// </summary>
        /// <exception cref="SveaWebPayValidationException"></exception>
        /// <returns>CreateOrderEuRequest</returns>
        public CreateOrderEuResponse DoRequest()
        {
            CreateOrderEuRequest request = PrepareRequest();

            Soapsc = new ServiceSoapClient(new BasicHttpBinding
                {
                    Name = "ServiceSoap",
                    Security = new BasicHttpSecurity
                        {
                            Mode = BasicHttpSecurityMode.Transport
                        }
                },
                                           new EndpointAddress(
                                               CrOrderBuilder.GetConfig().GetEndPoint(PayType)));

            return Soapsc.CreateOrderEu(request);
        }
        /// <summary>
        /// doRequest
        /// </summary>
        /// <returns>PaymentPlanParamsResponse</returns>
        public GetPaymentPlanParamsEuResponse DoRequest()
        {
            GetPaymentPlanParamsEuRequest request = PrepareRequest();

            Soapsc = new ServiceSoapClient(new BasicHttpBinding
                {
                    Name = "ServiceSoap",
                    Security = new BasicHttpSecurity
                        {
                            Mode = BasicHttpSecurityMode.Transport
                        }
                },
                                           new EndpointAddress(
                                               _config.GetEndPoint(PaymentType.PAYMENTPLAN)));

            return Soapsc.GetPaymentPlanParamsEu(request);
        }
Esempio n. 39
0
        /// <summary>
        /// doRequest
        /// </summary>
        /// <returns>GetCustomerAddressesResponse</returns>
        public GetCustomerAddressesResponse DoRequest()
        {
            GetCustomerAddressesRequest request = PrepareRequest();

            Soapsc = new ServiceSoapClient(new BasicHttpBinding
            {
                Name = "ServiceSoap",
                Security = new BasicHttpSecurity
                {
                    Mode = BasicHttpSecurityMode.Transport
                }
            },
                                           new EndpointAddress(
                                               _config.GetEndPoint(_orderType == "Invoice"
                                                                       ? PaymentType.INVOICE
                                                                       : PaymentType.PAYMENTPLAN)));

            return Soapsc.GetAddresses(request);
        }
        public async Task<IList<StopResult>> GetStopsByName(string stopName)
        {
            ServiceSoapClient client = new ServiceSoapClient();
            using (new OperationContextScope(client.InnerChannel))
            {
                OperationContext.Current.OutgoingMessageHeaders.Add(new CtsMessageHeader());
                var result = await client.rechercherCodesArretsDepuisLibelleAsync(new rechercherCodesArretsDepuisLibelleRequest
                {
                    NoPage = 1,
                    Saisie = stopName,
                });

                return result.rechercherCodesArretsDepuisLibelleResult.ListeArret.Select(la => new StopResult
                {
                    Code = la.Code,
                    Name = la.Libelle
                }).ToList();
            }
        }
Esempio n. 41
0
        /// <summary>
        /// doRequest
        /// </summary>
        /// <exception cref="Exception"></exception>
        /// <returns>CloseOrderResponse</returns>
        public CloseOrderEuResponse DoRequest()
        {
            CloseOrderEuRequest request = PrepareRequest();

            Soapsc = new ServiceSoapClient(new BasicHttpBinding
                {
                    Name = "ServiceSoap",
                    Security = new BasicHttpSecurity
                        {
                            Mode = BasicHttpSecurityMode.Transport
                        }
                },
                                           new EndpointAddress(
                                               _order.GetConfig()
                                                     .GetEndPoint(_order.GetOrderType() == "Invoice"
                                                                      ? PaymentType.INVOICE
                                                                      : PaymentType.PAYMENTPLAN)));

            return Soapsc.CloseOrderEu(request);
        }
Esempio n. 42
0
        public MerchantResponse Charge(int orderId, string cardHoldersName, string cardNumber, decimal amount,
            int expirationMonth, int expirationYear, int ccv, string address, string city, string state, string zip)
        {
            var client = new ServiceSoapClient(new BasicHttpBinding(BasicHttpSecurityMode.Transport),
                new EndpointAddress(_isDemo ? TestUrl : ProdUrl));
            client.ChannelFactory.Endpoint.Behaviors.Add(new HmacHeaderBehaivour(_hmac, _keyId));

            TransactionResult result = client.SendAndCommit(new Transaction
            {
                ExactID = _gatewayId,
                Password = _password,
                Transaction_Type = "00",
                Card_Number = cardNumber,
                CardHoldersName = cardHoldersName,
                DollarAmount = amount.ToString("F"),
                Expiry_Date = string.Format("{0:D2}{1}", expirationMonth, expirationYear),
                Customer_Ref = orderId.ToString(),
                VerificationStr1 = string.Format("{0}|{1}|{2}|{3}|US", address, zip, city, state),
                VerificationStr2 = ccv.ToString()
            });
            var response = new MerchantResponse
            {
                IsTransactionApproved = result.Transaction_Approved,
                IsError = result.Transaction_Error
            };
            if (!result.Transaction_Approved && !result.Transaction_Error)
            {
                response.Message = string.Format("Error {0}: {1}", result.Bank_Resp_Code, result.Bank_Message);
            }
            if (!result.Transaction_Approved && result.Transaction_Error)
            {
                response.Message = string.Format("Error {0}: {1}", result.EXact_Resp_Code, result.EXact_Message);
            }
            if (result.Transaction_Approved)
            {
                response.Message = result.Authorization_Num;
            }
            return response;
        }
Esempio n. 43
0
File: Form1.cs Progetto: dalkan/WSAD
        private void searchStudent()
        {
            string strName = txtName.Text;
            string strAdress = txtAdress.Text;
            string strEmail = txtEmail.Text;

            Student stuSearch = new Student() { Name = strName, Adress = strAdress, Email = strEmail };

            ServiceSoapClient serviceSql = new ServiceSoapClient();
            var listStudent = serviceSql.SearchStudent(stuSearch);

            listView1.Columns.Add("Name", 100, System.Windows.Forms.HorizontalAlignment.Left);
            listView1.Columns.Add("Email", 100, System.Windows.Forms.HorizontalAlignment.Left);
            listView1.Columns.Add("Adress", 100, System.Windows.Forms.HorizontalAlignment.Left);
            foreach (var student in listStudent)
            {
                string[] studentArray = new string[3] { student.Name, student.Email, student.Adress };
                listView1.Items.Add(new ListViewItem(studentArray));

            }
        }
Esempio n. 44
0
 /// <summary>
 /// Disposes the handler.
 /// </summary>
 public void Dispose()
 {
     this.client = null;
     instance = null;
 }
Esempio n. 45
0
File: Form1.cs Progetto: dalkan/WSAD
        private void showStudent()
        {
            ServiceSoapClient serviceSqlShow = new ServiceSoapClient();
            var listStudent = serviceSqlShow.ShowStudent();

            listView1.Columns.Add("Name", 100, System.Windows.Forms.HorizontalAlignment.Left);
            listView1.Columns.Add("Email", 100, System.Windows.Forms.HorizontalAlignment.Left);
            listView1.Columns.Add("Adress", 100, System.Windows.Forms.HorizontalAlignment.Left);
            foreach (var student in listStudent)
            {
                string[] studentArray = new string[3] { student.Name, student.Email, student.Adress };
                listView1.Items.Add(new ListViewItem(studentArray));

            }
        }
Esempio n. 46
0
        void FetchProcessDbQueue()
        {
            if (dict.Count == 0)
                return;
            foreach (ProcessInfoCtl infoctl in dict.Values.ToArray<ProcessInfoCtl>())
            {
                ProcessInfo info = (infoctl.DataContext as ProcessInfo);

                SLProcessController.ProcessService.ServiceSoapClient client = new ServiceSoapClient();

                client.getDbQueueCntCompleted+= (s,a)=>
                {
                    if(a.Error==null)
                    info.DataQueueCnt=a.Result;
                };

                try
                {
                    client.getDbQueueCntAsync(info.MFCC_TYPE, info.HostIP, info.ConsolePort, info.MFCC_TYPE.ToUpper() == "HOST" ? true : false);
                }
                catch
                {
                    throw new Exception(info.ProcessName + ", get Dbqueuecnt failed!");
                }
            }
        }
Esempio n. 47
0
        public static Hasta setHastaTuikBilgi(Hasta hasta)
        {
            if (Current.AktifDoktor.WebTUIKServisKullaniciNo == 0 ||
                    Current.AktifDoktor.WebTUIKServisSifre.Length == 0 ||
                    Current.AktifDoktor.TckNo == 0
                    )
                    return hasta;
                TCKimlikNoKisiBilgi[] NufusBilgi;
                string snc = "";
                ServiceSoapClient serviceSoapClient = new ServiceSoapClient();

                    NufusBilgi = serviceSoapClient.TCKimlikNoSorgulaArray(
                            Current.AktifDoktor.WebTUIKServisKullaniciNo,
                            Current.AktifDoktor.WebTUIKServisSifre,
                            hasta.TckNo
                            );
                    if (NufusBilgi != null)
                        if (NufusBilgi.Length>0)
                        if (NufusBilgi[0].TCKimlikNo != null)
                        {
                            try { hasta.Adi= NufusBilgi[0].Ad ?? ""; }
                            catch { }
                            try { hasta.Soyadi = NufusBilgi[0].Soyad ?? ""; }
                            catch { }
                            try { hasta.NfAileSiraNo = NufusBilgi[0].AileSiraNo ?? ""; }
                            catch { }
                            try { hasta.NfAileSiraNo = NufusBilgi[0].AileSiraNo ?? ""; }catch { }
                            try { hasta.NfAnaAd = NufusBilgi[0].AnaAd ?? "";}catch { }
                            try { hasta.NfAnaSoyad = NufusBilgi[0].AnaSoyad ?? "";}catch { }
                            try { hasta.NfBabaAd = NufusBilgi[0].BabaAd ?? "";}catch { }
                            try { hasta.NfBabaSoyad = NufusBilgi[0].BabaSoyad ?? "";}catch { }
                            try { hasta.NfBireySiraNo = NufusBilgi[0].BireySiraNo ?? "";}catch { }
                            try { hasta.NfCiltAd = NufusBilgi[0].CiltAd ?? "";}catch { }
                            try { hasta.NfCiltKod = NufusBilgi[0].CiltKod ?? "";}catch { }
                            try { hasta.NfCuzdanNo = NufusBilgi[0].CuzdanNo ?? "";}catch { }
                            try { hasta.NfCuzdanSeri = NufusBilgi[0].CuzdanSeri ?? "";}catch { }
                            try { hasta.NfDin = NufusBilgi[0].Din ?? "";}catch { }
                            try { hasta.NfDogumTarih = NufusBilgi[0].DogumTarih ?? "";}catch { }
                            try { hasta.NfDogumYer = NufusBilgi[0].DogumYer ?? "";}catch { }
                            try { hasta.NfKayIlAd = NufusBilgi[0].IlAd ?? "";}catch { }
                            try { hasta.NfKayIlceAd = NufusBilgi[0].IlceAd ?? "";}catch { }
                            try { hasta.NfKayIlceKod = NufusBilgi[0].IlceKod ?? "";}catch { }
                            try { hasta.NfKayIlKod = NufusBilgi[0].IlKod ?? "";}catch { }
                            try { hasta.NfMedeniHal = NufusBilgi[0].MedeniHal ?? "";}catch { }
                            try { hasta.NfOlumTarih = NufusBilgi[0].OlumTarih ?? "";}catch { }
                            try { hasta.NfOlumYer = NufusBilgi[0].OlumYer ?? "";}catch { }
                            try { hasta.NfVerildigiIlceAd = NufusBilgi[0].VerildigiIlceAd ?? "";}catch { }
                            try { hasta.NfVerildigiIlceKod = NufusBilgi[0].VerildigiIlceKod ?? "";}catch { }
                            try { hasta.NfverilmeNeden = NufusBilgi[0].verilmeNeden ?? "";}catch { }
                            try { hasta.NfVerilmeTarih = NufusBilgi[0].VerilmeTarih ?? "";}catch { }
                            try { hasta.NfYakinlik = NufusBilgi[0].Yakinlik ?? "";}catch { }
                        }
                        else
                            snc = "kimlik";

                GenelAdresKisiBilgi[] TUIKAdres;
                    TUIKAdres = serviceSoapClient.GenelAdresKisiBilgiSorgulaArray(
                            Current.AktifDoktor.WebTUIKServisKullaniciNo,
                            Current.AktifDoktor.WebTUIKServisSifre,
                            hasta.TckNo
                            );
                    if (TUIKAdres != null)
                        if (TUIKAdres.Length > 0)
                            if (TUIKAdres[0].AdresNo != null)
                    {
                        try { hasta.TUIKAdresNo = TUIKAdres[0].AdresNo ?? "";}catch { }
                        try { hasta.TUIKBucak = TUIKAdres[0].Bucak ?? "";}catch { }
                        try { hasta.TUIKBucakKodu = TUIKAdres[0].BucakKodu ?? "";}catch { }
                        try { hasta.TUIKCsbm = TUIKAdres[0].Csbm ?? "";}catch { }
                        try { hasta.TUIKCsbmKodu = TUIKAdres[0].CsbmKodu ?? "";}catch { }
                        try { hasta.TUIKDisKapiNo = TUIKAdres[0].DisKapiNo ?? "";}catch { }
                        try { hasta.TUIKIcKapiNo = TUIKAdres[0].IcKapiNo ?? "";}catch { }
                        try { hasta.TUIKIl = TUIKAdres[0].Il ?? "";}catch { }
                        try { hasta.TUIKIlKodu = TUIKAdres[0].IlKodu ?? "";}catch { }
                        try { hasta.TUIKIlce = TUIKAdres[0].Ilce ?? "";}catch { }
                        try { hasta.TUIKIlceKodu = TUIKAdres[0].IlceKodu ?? "";}catch { }
                        try { hasta.TUIKKoy = TUIKAdres[0].Koy ?? "";}catch { }
                       try {  hasta.TUIKKoyKodu = TUIKAdres[0].KoyKodu ?? "";}catch { }
                        try { hasta.TUIKKoyKayitNo = TUIKAdres[0].KoyKayitNo ?? "";}catch { }
                        try { hasta.TUIKMahalle = TUIKAdres[0].Mahalle ?? "";}catch { }
                        try { hasta.TUIKMahalleKodu = TUIKAdres[0].MahalleKodu ?? ""; }
                        catch { }
                    }
                    else
                        snc += " adres";

                if (snc.Length > 0)
                    snc = "Tuık " + snc + " bilgisi alınamadı";
                else
                {
                    snc = "Tuik kimlik adres bilgisi güncellendi";
                    hasta.TransferDurumu = myenum.TransferDurumu.Alindi;
                }
                hasta.TransferSonuc = snc;
                hasta.TransferTarihi = DateTime.Today;

            return hasta;
        }
Esempio n. 48
0
        void ctl_OnChangeState(ProcessInfoCtl ctl,ProcessInfo  info, bool bPlay)
        {
            //throw new NotImplementedException();

            if (!bPlay)
            {
                ConfirmChild child = new ConfirmChild("TCS", "確定要停止" + info.ProcessName + "?");
                child.Closed += (s, a) =>
                    {
                        if (child.DialogResult == true)
                        {
                            ProcessService.ServiceSoapClient client = new ServiceSoapClient();
                            client.ChangeProcessStateAsync(info.HostIP, info.ProcessName, false);

                            VisualStateManager.GoToState(ctl, "Stop", true);
                        }
                    };
                child.Show();
            }
            else
            {
                new ServiceSoapClient().ChangeProcessStateAsync(info.HostIP, info.ProcessName, true);
                VisualStateManager.GoToState(ctl, "Normal",true);
            }
        }
Esempio n. 49
0
 public ServerClient()
 {
     this._serverClient = new ServiceSoapClient();
 }