Joke Collection Website - Blessing messages - C#winform calls telecom kuanle's webservice to send short messages. Why is the return value always 0? Does vs2008 need any configuration?
C#winform calls telecom kuanle's webservice to send short messages. Why is the return value always 0? Does vs2008 need any configuration?
org . winic . service 2 . service 1 ws = new web application 1 . org . winic . service 2 . service 1();
message manager message = new message manager();
int userId = Convert。 ToInt32 (session ["userid"]);
Data table dt = message. get account(userId);
String name = dt. Line [0]["MessageName"]. ToString();
The string pwd = dt. Line [0]["MessagePwd"]. ToString();
//Return a result, the first parameter is the mobile phone account number, the second parameter is the password, the third parameter is the mobile phone number, and the fourth parameter is the mobile phone content.
String result = ws. SendMessages (name, password, txtMoble. Text, short message. Text, "";
Switch (result)
{
Case "-0 1":
Page. RegisterStartupScript("alert ","< script & gt alert ('System prompt: the current account balance is insufficient!' )& lt/script & gt; ");
Break;
Case "-02":
Page. RegisterStartupScript("alert ","< script & gtAlert ('System prompt: the current user ID is wrong!' )& lt/script & gt; ");
Break;
Case "-03":
Page. RegisterStartupScript("alert ","< script & gtAlert ('System prompt: the current password is wrong!' )& lt/script & gt; ");
Break;
Case "-04":
Page. RegisterStartupScript("alert ","< script > alert ('system prompt: insufficient parameters or wrong parameter content type!' )& lt/script & gt; ");
Break;
Case "-05":
Page. RegisterStartupScript("alert ","< script & gt alert ('System prompt: the format of mobile phone number is incorrect!' )& lt/script & gt; ");
Break;
Case "-06":
Page. RegisterStartupScript("alert ","< script & gt alert ('System prompt: the SMS content is not coded correctly!' )& lt/script & gt; ");
Break;
Case "-07":
Page. RegisterStartupScript("alert ","< script & gtAlert ('System prompt: SMS content contains sensitive characters!' )& lt/script & gt; ");
Break;
Case "-08":
Page. RegisterStartupScript("alert ","< script & gtAlert ('System prompt: No data received!' )& lt/script & gt; ");
Break;
Case "-09":
Page. RegisterStartupScript("alert ","< script & lt alert ('system prompt: system maintenance ...'))
Break;
Case "-10":
Page. RegisterStartupScript("alert ","< script & gt alert ('System prompt: the number of mobile phone numbers is too long!' )& lt/script & gt; ");
Break;
Case "-1 1":
Page. RegisterStartupScript("alert ","< script & gtAlert ('System prompt: SMS content is too long!' )& lt/script & gt; ");
Break;
Case "-12":
Page. RegisterStartupScript("alert ","< script & gtAlert ('System prompt: Other error!' )& lt/script & gt; ");
Break;
Case "-13":
Page. RegisterStartupScript("alert ","< script & gtAlert ('System prompt: file transfer error!' )& lt/script & gt; ");
Break;
Default value:
Page. RegisterStartupScript("alert ","< script & gtAlert ('System prompt: sent successfully!' )& lt/script & gt; ");
SendManager SendManager = new SendManager();
string moble = txtMoble。 Text;
string _message = txtMessage。 Text;
int Result = sendManager。 AddMessageRecord (user Id, name, mobile, _ message, 1, date and time. Now);
Break;
- Previous article:What if Samsung's mobile phone is always in safe mode?
- Next article:How does the mobile phone refuse to answer harassing calls?
- Related articles
- Send greetings to customers on Mid-Autumn Festival.
- How to change the yellow code of Shanxi Health Code into a green code
- Will there be a SMS reminder when sending flowers?
- How to write the resignation notice
- Tik Tok Dongao 198 Commemorative Coin 2 Really?
- Can Han An and Tang Dynasty of SF Express Xi arrive on the same day?
- Sentences with positive energy_motivational quotes about hard work and positivity
- Which office building is better in Beijing?
- Happy birthday, warm heart, WeChat greetings.
- Can Henan public channel people mediate to see famous doctors?