⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 std_addpoorstdinfo.aspx.cs

📁 哈尔滨师范大学教务系统开发---基于WEB的高校教务系统平台源码 作者:易继勇(哈尔滨师范大学05级计算机科学系)
💻 CS
📖 第 1 页 / 共 2 页
字号:
        }
        else
        {
            int number = 0;
            string incomeSource = "";
            if (this.dagong.Checked)
            {
                incomeSource = "打工";
                number++;
            }
            else if (this.farm.Checked)
            {
                incomeSource = "务农";
                number++;
            }
            else if (this.other.Checked)
            {
                this.RequiredFieldValidator6.Enabled = true;
                this.otherSource.BackColor = System.Drawing.Color.White;
                this.otherSource.ReadOnly = false;
                incomeSource = this.otherSource.Text;
                number++;
            }
            if (number == 0)
            {
                Response.Write(bc.MessageBox("请选择收入来源!"));

            }
            else if (number > 1)
            {
                Response.Write(bc.MessageBox("收入来源只能填写一个!"));
            }
            else
            {
                string averageIncome1 = this.averageIncome.Text;
                int averageIncome = Math.Abs(Convert.ToInt32(averageIncome1));
                string studyNumber = this.studyNumber.Text;
                string IDcardNumber = this.IDcardNumber.Text;
                string studentName = this.studentName.Text;
                string college = this.college.Text;
                string speciality = this.speciality.Text;
                string grade1 = this.grade.Text;
                int grade = Math.Abs(Convert.ToInt32(grade1));
                string sex = this.sex.Text;
                string birthYearMonth = this.birthday.Text;
                string graduateSchool = this.graduateSchool.Text;
                string homeAddress = this.homeAddress.Text;
                string totalPopulation1 = this.totalPopulation.Text;
                int totalPopulation = Math.Abs(Convert.ToInt32(totalPopulation1));
                string yearIncome1 = this.yearIncome.Text;
                int yearIncome = Math.Abs(Convert.ToInt32(yearIncome1));
                string postalCode = this.postalCode.Text;
                string keeper1Name = this.keeper1Name.Text;
                string relation1 = this.relation1.Text;
                string keeper1IDcardNumber = this.keeper1IDcardNumber.Text;
                string keeper1Address = this.keeper1Address.Text;
                string keeper1Tel = this.keeper1Tel.Text;
                string keeper2Name = this.keeper2Name.Text;
                string relation2 = this.relation2.Text;
                string keeper2IDcardNumber = this.keeper2IDcardNumber.Text;
                string keeper2Address = this.keeper2Address.Text;
                string keeper2Tel = this.keeper2Tel.Text;
                string remark = this.remark.Text;
                string SQL = "insert into ts_xs_poorStdInfo (studyNumber,IDcardNumber,studentName,college,speciality,grade,sex,birthYearMonth,graduateSchool,homeAddress,totalPopulation,yearIncome,incomeSource,postalCode,keeper1Name,relation1,keeper1IDcardNumber,keeper1Address,keeper1Tel,keeper2Name,relation2,keeper2IDcardNumber,keeper2Address,keeper2Tel,remark,averageIncome) values ('" + studyNumber + "','" + IDcardNumber + "','" + studentName + "','" + college + "','" + speciality + "','" + grade + "','" + sex + "','" + birthYearMonth + "','" + graduateSchool + "','" + homeAddress + "','" + totalPopulation + "','" + yearIncome + "','" + incomeSource + "','" + postalCode + "','" + keeper1Name + "','" + relation1 + "','" + keeper1IDcardNumber + "','" + keeper1Address + "','" + keeper1Tel + "','" + keeper2Name + "','" + relation2 + "','" + keeper2IDcardNumber + "','" + keeper2Address + "','" + keeper2Tel + "','" + remark + "','" + averageIncome + "')";
                if (bc.ExecSQL(SQL))
                {
                    this.submit.Enabled = false;
                    this.studyNumber.ReadOnly = false;
                    this.infoExport.Enabled = true;
                    this.studyNumber.Text = "";
                    this.graduateSchool.BackColor = System.Drawing.Color.Transparent;
                    this.homeAddress.BackColor = System.Drawing.Color.Transparent;
                    this.totalPopulation.BackColor = System.Drawing.Color.Transparent;
                    this.yearIncome.BackColor = System.Drawing.Color.Transparent;
                    this.postalCode.BackColor = System.Drawing.Color.Transparent;
                    this.keeper1Name.BackColor = System.Drawing.Color.Transparent;
                    this.relation1.BackColor = System.Drawing.Color.Transparent;
                    this.keeper1IDcardNumber.BackColor = System.Drawing.Color.Transparent;
                    this.keeper1Address.BackColor = System.Drawing.Color.Transparent;
                    this.keeper1Tel.BackColor = System.Drawing.Color.Transparent;
                    this.keeper2Name.BackColor = System.Drawing.Color.Transparent;
                    this.relation2.BackColor = System.Drawing.Color.Transparent;
                    this.keeper2IDcardNumber.BackColor = System.Drawing.Color.Transparent;
                    this.keeper2Address.BackColor = System.Drawing.Color.Transparent;
                    this.keeper2Tel.BackColor = System.Drawing.Color.Transparent;
                    this.remark.BackColor = System.Drawing.Color.Transparent;
                    this.averageIncome.BackColor = System.Drawing.Color.Transparent;

                    this.graduateSchool.ReadOnly = true;
                    this.homeAddress.ReadOnly = true;
                    this.totalPopulation.ReadOnly = true;
                    this.yearIncome.ReadOnly = true;
                    this.postalCode.ReadOnly = true;
                    this.keeper1Name.ReadOnly = true;
                    this.relation1.ReadOnly = true;
                    this.keeper1IDcardNumber.ReadOnly = true;
                    this.keeper1Address.ReadOnly = true;
                    this.keeper1Tel.ReadOnly = true;
                    this.keeper2Name.ReadOnly = true;
                    this.relation2.ReadOnly = true;
                    this.keeper2IDcardNumber.ReadOnly = true;
                    this.keeper2Address.ReadOnly = true;
                    this.keeper2Tel.ReadOnly = true;
                    this.remark.ReadOnly = true;
                    this.otherSource.ReadOnly = true;
                    this.averageIncome.ReadOnly = true;

                    this.graduateSchool.Text = "";
                    this.homeAddress.Text = "";
                    this.totalPopulation.Text = "";
                    this.yearIncome.Text = "";
                    this.postalCode.Text = "";
                    this.keeper1Name.Text = "";
                    this.relation1.Text = "";
                    this.keeper1IDcardNumber.Text = "";
                    this.keeper1Address.Text = "";
                    this.keeper1Tel.Text = "";
                    this.keeper2Name.Text = "";
                    this.relation2.Text = "";
                    this.keeper2IDcardNumber.Text = "";
                    this.keeper2Address.Text = "";
                    this.keeper2Tel.Text = "";
                    this.remark.Text = "";
                    this.otherSource.Text = "";
                    this.averageIncome.Text = "";
                    this.RequiredFieldValidator1.Enabled = false;
                    this.RequiredFieldValidator3.Enabled = false;
                    this.RequiredFieldValidator4.Enabled = false;
                    this.RequiredFieldValidator5.Enabled = false;
                    this.RequiredFieldValidator6.Enabled = false;
                    this.RequiredFieldValidator7.Enabled = false;
                    this.RequiredFieldValidator8.Enabled = false;
                    this.RequiredFieldValidator9.Enabled = false;
                    this.RequiredFieldValidator10.Enabled = false;
                    this.RequiredFieldValidator11.Enabled = false;
                    this.RequiredFieldValidator12.Enabled = false;
                    this.RequiredFieldValidator13.Enabled = false;
                    this.RequiredFieldValidator14.Enabled = false;
                    this.RequiredFieldValidator15.Enabled = false;
                    this.RequiredFieldValidator16.Enabled = false;
                    this.RequiredFieldValidator17.Enabled = false;
                    this.RequiredFieldValidator19.Enabled = false;
                    this.CompareValidator2.Enabled = false;
                    this.CompareValidator1.Enabled = false;
                    this.CompareValidator4.Enabled = false;
                    this.RangeValidator1.Enabled = false;
                    this.RangeValidator2.Enabled = false;
                    this.RangeValidator4.Enabled = false;
                    this.RegularExpressionValidator1.Enabled = false;
                    this.RegularExpressionValidator2.Enabled = false;
                    this.RegularExpressionValidator3.Enabled = false;
                    Response.Write(bc.MessageBox("数据提交成功!"));
                }
                else
                {
                    Response.Write(bc.MessageBox("数据提交失败!网络忙,请稍后再试!"));
                }
            }
        }
    }
    protected void other_CheckedChanged(object sender, EventArgs e)
    {
        
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -