alibaba Posted June 25, 2018 Report Share Posted June 25, 2018 sveiki visiem,tatad ir maza programa izveidota,bet nekadi nevaru saprast ka var izdarit ta,lai kad piemeram uzspiez uz pogas (button) paradas error ,ka nav aizpilditi visi lauki un ta,ceru domu sapratat,paldies. Quote Link to comment Share on other sites More sharing options...
e-remit Posted June 25, 2018 Report Share Posted June 25, 2018 Ļoti vienkārši - jāveic lauku validācija, paredzot gadījumus, kad jāizvada kļūdas paziņojums, pārējos gadījumos jāturpina datu apstrāde. Varianti, kā veikt validāciju, ir dažādi - izvēlies sev piemērotāko! Quote Link to comment Share on other sites More sharing options...
alibaba Posted June 26, 2018 Author Report Share Posted June 26, 2018 https://paste.ofcode.org/EGDizL9upQbKyRnX3naRhk Esu iesacejs c# kursi dargi un ta...bet nesaprotu kadel man rada smtp servera error itka vinsh nebutu,kods augstak. Varbut kads vairak sapratis. Quote Link to comment Share on other sites More sharing options...
e-remit Posted June 26, 2018 Report Share Posted June 26, 2018 1) Raksti normālus nosaukumus mainīgajiem, lai nav jāmin, ka `textBox7` tiešām satur SMTP host, nevis, piemēram, e-pasta adresi. Kas ir textboxī `textBox8` - vispār ir dziļa mīkla! 2) Šajās rindās: using (SmtpClient smtp = new SmtpClient(textBox7.Text)) // te ir problema kad ievada smtp adresi,mana gadijuma gmail smtpPort = textBox8; tu uz īsu brīdi izveido mainīgo `smtp`, lai to neizmantotu, bet kaut kādā mistiskā mainīgajā `smtpPort` ielasītu referneci uz `textBox8`, kuru tu vēlāk neizmanto. T.i. tās divas rindas mierīgi var izdzēst un nekas nemainīsies! Toties mainīgajā `client` tu hostname tā arī neesi ielasījis! Kāpēc? Quote Link to comment Share on other sites More sharing options...
alibaba Posted June 26, 2018 Author Report Share Posted June 26, 2018 textBox8.Text ir kur portu norada,bet kad ielieku using (SmtpClient smtp = new SmtpClient (textBox7.Text, textBox8.Text); // te ir problema kad ievada smtp adresi,mana gadijuma gmail,bet kad ielieku textBox8.Text ,kas ir domata porta m,izmet erroru...hmmm Vienvard sakot doma ir ,lai cilveks var atseviski noradit smtp un portu! Quote Link to comment Share on other sites More sharing options...
e-remit Posted June 26, 2018 Report Share Posted June 26, 2018 Atbildi lasīt šeit: 11 minutes ago, e-remit said: tu uz īsu brīdi izveido mainīgo `smtp`, lai to neizmantotu Dzēs to rindu ārā! Tā ir lieka! Tev pietiek ar mainīgo `client`! Quote Link to comment Share on other sites More sharing options...
alibaba Posted June 26, 2018 Author Report Share Posted June 26, 2018 Varbut tevi nepareizi sapratu,bet man ta sanak,kur portu vajag ierakstit nekadigi nevar,var vnk ierakstit manuali portu,bet texboxa nelauj hmmmm... https://anonfile.com/e39db0f6b6/error.jpg Quote Link to comment Share on other sites More sharing options...
ieleja Posted June 26, 2018 Report Share Posted June 26, 2018 ja to visu uzraksti bez formām, laukiem un pogām, tad strādā? Quote Link to comment Share on other sites More sharing options...
alibaba Posted June 26, 2018 Author Report Share Posted June 26, 2018 (edited) Viss strada,bet vajag ar laukiem,lai es aka kads var vnk noradit portu smtp pec savas vajadzibas,bet kad ieraksta manuali koda portu vis ok,bet kad lauka ieraksta tad tads error,izrakaju googli bez rezultata. Hmmm uz inbox dot lv iet ,bet uz gmail timet out brrr Aizgaja vis ok,neesu testejis citus smtp ,bet laikam viss ok. if (textBox8.Text != null) client.Port = System.Convert.ToInt32(textBox8.Text); Edited June 26, 2018 by alibaba Quote Link to comment Share on other sites More sharing options...
Sasa Posted June 27, 2018 Report Share Posted June 27, 2018 Ieliec pārbaudi vai `textBox8.Text` vērtībā ir konvertējama uz int. Quote Link to comment Share on other sites More sharing options...
alibaba Posted June 27, 2018 Author Report Share Posted June 27, 2018 10 hours ago, Sasa said: Ieliec pārbaudi vai `textBox8.Text` vērtībā ir konvertējama uz int. kods https://paste.ofcode.org/5drKafnD8JJvC2VVjvAhr7 Jautajums ka var pievienot aka sutit kadu failu uz epastu? meginaju dazadi.... Quote Link to comment Share on other sites More sharing options...
e-remit Posted June 27, 2018 Report Share Posted June 27, 2018 39 minutes ago, alibaba said: Jautajums ka var pievienot aka sutit kadu failu uz epastu? meginaju dazadi.... Šādi mēģināji? P.S. Pārsauc taču tos tekstbokšus, lai pēc nosaukuma var pateikt, kas tajos tiek ievadīts! Quote Link to comment Share on other sites More sharing options...
alibaba Posted June 29, 2018 Author Report Share Posted June 29, 2018 (edited) Paldies,atradu savu bedu tagad viss ok. Iznemot textboxa neuzradas ka fails pievienots,bet papetisu sikak :) Pilns murgs šeit :) Edited July 1, 2018 by alibaba Quote Link to comment Share on other sites More sharing options...
alibaba Posted July 1, 2018 Author Report Share Posted July 1, 2018 On 6/27/2018 at 9:56 PM, e-remit said: Šādi mēģināji? P.S. Pārsauc taču tos tekstbokšus, lai pēc nosaukuma var pateikt, kas tajos tiek ievadīts! Source pievienota,ja kadam interese,lai nemas,tur vel daudz darama,bet vis +- strada. Quote Link to comment Share on other sites More sharing options...
alibaba Posted July 2, 2018 Author Report Share Posted July 2, 2018 Jautajums,lai netaisitu jaunu topiku,cik papetiju ir iespeja no win aplikacijas sutit sms uz tel numuru. Varbut kads ir kautko tadu veidojis un var padalities ar domam un tmldz... :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.