using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace WinFrmDiaoCha
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnSubmit_Click(object sender, EventArgs e)
{
//调查内容可自定义
string Desc = " 意见及建议:" + txtDesc.Text;
string Learn = "学习主动性:";
if (rdo11.Checked)
{
Learn +=rdo11.Text;
}
if (rdo12.Checked)
{
Learn += rdo12.Text;
}
if (rdo13.Checked)
{
Learn += rdo13.Text;
}
if (rdo14.Checked)
{
Learn +=rdo14.Text;
}
string Zuoye = " 作业完成度:";
if (rdo11.Checked)
{
Zuoye += rdo21.Text;
}
if (rdo12.Checked)
{
Zuoye += rdo22.Text;
}
if (rdo13.Checked)
{
Zuoye += rdo23.Text;
}
if (rdo14.Checked)
{
Zuoye += rdo24.Text;
}
string Hudong = " 组员互动性:";
if (rdo31.Checked)
{
Hudong += rdo21.Text;
}
if (rdo32.Checked)
{
Hudong += rdo22.Text;
}
if (rdo33.Checked)
{
Hudong += rdo23.Text;
}
if (rdo34.Checked)
{
Hudong += rdo24.Text;
}
string Lijie = " 新课理解度:";
if (rdo41.Checked)
{
Lijie += rdo21.Text;
}
if (rdo42.Checked)
{
Lijie += rdo22.Text;
}
if (rdo43.Checked)
{
Lijie += rdo23.Text;
}
if (rdo44.Checked)
{
Lijie += rdo24.Text;
}
string Xiangqing = Learn + Zuoye + Hudong + Lijie + Desc;
string name = txtName.Text;
//自定义文件路径
FileStream fs = new FileStream(@"\\mingPC\e$\组员学习情况调查\" + name + ".txt", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
sw.Write(Xiangqing);
sw.Close();
fs.Close();
MessageBox.Show("提交成功,谢谢合作!");
}
}
}