2 using System
.Collections
.Generic
;
3 using System
.ComponentModel
;
8 using System
.Windows
.Forms
;
12 public partial class FeedbackForm
: Form
16 InitializeComponent();
19 private void FeedbackForm_Load(object sender
, EventArgs e
)
24 private void PostButton_Click(object sender
, EventArgs e
)
26 string name
= UserNameTextBox
.Text
;
27 string qq
= QQTextBox
.Text
;
28 string email
= EmailTextBox
.Text
;
29 string title
= TitleTextBox
.Text
;
30 string msg
= MessageTextBox
.Text
;
32 if (string.IsNullOrEmpty(name
) || string.IsNullOrEmpty(title
) || string.IsNullOrEmpty(msg
))
34 MessageBox
.Show("请填写以上必填项后再提交。", "提示", MessageBoxButtons
.OK
, MessageBoxIcon
.Warning
);
38 ServiceReference
.WebServiceSoapClient service
= new ServiceReference
.WebServiceSoapClient();
39 bool flag
= service
.PostFeedback(name
, qq
, email
, title
, msg
);
43 MessageBox
.Show("提交成功,感谢反馈!", "提示", MessageBoxButtons
.OK
, MessageBoxIcon
.Information
);
47 MessageBox
.Show("提交失败。", "提示", MessageBoxButtons
.OK
, MessageBoxIcon
.Error
);