예제 #1
0
        //个人信息保存
        public void clsSave()
        {
            string sSex = "";

            if (rdoMen.Checked)
            {
                sSex = rdoMen.Text;
            }
            else if (rdoWomen.Checked)
            {
                sSex = rdoWomen.Text;
            }
            DataSet ds = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiMingCheng = '" + cboClass.Text + "' and NianJiID = '" + strNianJiID + "' ");

            if (new clsSql().sql2(sSqlTouch, "insert into XueSheng (XueHao,BanJiID,XingMing,ShenFenZhengHao,XingBie,DianHua) values ('" + txtNumber.Text + "','" + ds.Tables[0].Rows[0][0].ToString() + "','" + txtName.Text + "','" + txtIdCard.Text + "','" + sSex + "','" + txtTel.Text + "')") == true)//执行添加语句
            {
                MessageBox.Show("添加成功O(∩_∩)O~~~", "提示!");
                txtNumber.Text = null;
                clsRefresh();
            }
            else
            {
                MessageBox.Show("添加失败!", "提示!");
            }
        }
예제 #2
0
        //刷新年级和学部列表内容
        private void clsRefresh()
        {
            txtNumber.Text   = null;
            txtName.Text     = null;
            txtTel.Text      = null;
            txtIdCard.Text   = null;
            rdoMen.Checked   = false;
            rdoWomen.Checked = false;
            cboYear.Items.Clear();
            cboDepartment.Items.Clear();
            cboClass.Items.Clear();
            strNianJiID        = "";
            strXueBuID         = "";
            label1.Visible     = false;
            lblNumberY.Visible = false;
            lblNameY.Visible   = false;
            lblIdCardY.Visible = false;
            lblTelY.Visible    = false;
            DataSet ds = new clsSql().sqlSelect1(sSqlTouch, "NianJi");//查询年级

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                cboYear.Items.Add(ds.Tables[0].Rows[i][1]);
            }
            DataSet ds1 = new clsSql().sqlSelect1(sSqlTouch, "XueBu");//查询学部

            for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
            {
                cboDepartment.Items.Add(ds1.Tables[0].Rows[i][1]);
            }
        }
예제 #3
0
 //学号值改变时触发
 private void txtNumber_TextChanged(object sender, EventArgs e)
 {
     if (txtNumber.Text.ToString().Length == 8)//当输入字符串为八位时
     {
         if (new clsSql().sqlSelect2(sSqlTouch, "XueSheng", "XueHao", txtNumber.Text.ToString()))
         {
             label1.Visible     = true;
             lblNumberY.Visible = false;
         }
         else
         {
             lblNumberY.Visible = true;
             label1.Visible     = false;
         }
         DataSet ds = new clsSql().sql1(sSqlTouch, "select * from GuiFan where ID = '" + txtNumber.Text.ToString().Substring(0, 6) + "'");
         if (ds.Tables[0].Rows.Count == 0)
         {
             cboYear.SelectedIndex       = -1;
             cboDepartment.SelectedIndex = -1;
             cboClass.SelectedIndex      = -1;
             return;
         }
         cboYear.SelectedItem       = ds.Tables[0].Rows[0][1].ToString();
         cboDepartment.SelectedItem = ds.Tables[0].Rows[0][2].ToString();
         cboClass.SelectedItem      = ds.Tables[0].Rows[0][4].ToString();
     }
     else
     {
         clsRefresh();
         lblNumberY.Visible = false;
         label1.Visible     = false;
     }
 }
예제 #4
0
        //年级列表发生改变时触发
        private void cboYear_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataSet ds = new clsSql().sql1(sSqlTouch, "select * from NianJi where NianJiMingCheng = '" + cboYear.Text + "'");

            if (ds.Tables[0].Rows.Count > 0)
            {
                strNianJiID = ds.Tables[0].Rows[0][0].ToString();
            }
            clsRefresh3();
        }
예제 #5
0
        //选择专业时触发
        private void cboMajor_SelectedIndexChanged(object sender, EventArgs e)
        {
            cboClass.Items.Clear();
            DataSet ds = new clsSql().sql1(sSqlTouch, "select * from BanJi where ZhuanYeID = '" + cboMajor.Text.Substring(0, cboMajor.Text.IndexOf("#")) + "' and NianJiID = '" + cboYear.Text.Substring(0, cboYear.Text.IndexOf("#")) + "' ");

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                cboClass.Items.Add(ds.Tables[0].Rows[i][1]);
            }
        }
예제 #6
0
        //选择学部时
        private void cboDepartment_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from XueBu where XueBuMingCheng = '" + cboDepartment.Text + "'");//查询学部

            if (ds1.Tables[0].Rows.Count > 0)
            {
                strXueBuID = ds1.Tables[0].Rows[0][0].ToString();//获取学部id
            }
            clsRefresh2();
        }
예제 #7
0
        /// <summary>
        /// ‘班级’下拉列表刷新
        /// </summary>
        /// <param name="strYear">选择的学年ID</param>
        /// <param name="strMajor">选择的专业ID</param>
        private void cboClassRefresh(String strYear, String strMajor)
        {
            cboClass.Items.Clear();
            DataSet ds = new clsSql().sql1(sSqlTouch, "select * from BanJi where ZhuanYeID = '" + strMajor + "' and NianJiID = '" + strYear + "' ");

            cboClass.Items.Add("");
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                cboClass.Items.Add(ds.Tables[0].Rows[i][1] + "*                                  #" + ds.Tables[0].Rows[i][0]);
            }
        }
예제 #8
0
        /// <summary>
        /// ‘专业’下拉列表刷新
        /// </summary>
        /// <param name="strDepartment">选择的学部ID</param>
        private void cboMajorRefresh(String strDepartment)
        {
            cboMajor.Items.Clear();
            cboClass.Items.Clear();
            DataSet ds = new clsSql().sql1(sSqlTouch, "select * from ZhuanYe where XueBuID = '" + strDepartment + "' ");

            cboMajor.Items.Add("");
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                cboMajor.Items.Add(ds.Tables[0].Rows[i][1] + "*                                  #" + ds.Tables[0].Rows[i][0]);
            }
        }
예제 #9
0
        //刷新学部信息
        private void clsRefresh()
        {
            lstDepartment.Items.Clear();
            DataSet ds = new clsSql().sqlSelect1(sSqlTouch, "XueBu");//查询

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                lstDepartment.Items.Add(ds.Tables[0].Rows[i][1]);
            }
            txtAdd.Text    = "";
            txtUpdate.Text = "";
        }
예제 #10
0
        //刷新班级信息
        private void clsRefresh3()
        {
            clsRefresh();
            DataSet ds  = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiMingCheng = '" + cboClass.Text + "'");       //查询班级
            DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from XueSheng where BanJiID = '" + ds.Tables[0].Rows[0][0] + "'"); //查询学部

            for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
            {
                lstStudent.Items.Add(ds1.Tables[0].Rows[i][0] + "     " + ds1.Tables[0].Rows[i][7]);
            }
            lblStudent.Text = "共计:" + ds1.Tables[0].Rows.Count + " 人";
        }
예제 #11
0
        //刷新班级列表内容
        private void clsRefresh1()
        {
            cboClass.Items.Clear();
            DataSet ds5 = new clsSql().sql1(sSqlTouch, "select * from ZhuanYe where XueBuID = '" + strXueBuID + "' ");

            for (int i = 0; i < ds5.Tables[0].Rows.Count; i++)
            {
                DataSet ds6 = new clsSql().sql1(sSqlTouch, "select * from BanJi where ZhuanYeID = '" + ds5.Tables[0].Rows[i][0].ToString() + "' and NianJiID = '" + strNianJiID + "' ");
                for (int j = 0; j < ds6.Tables[0].Rows.Count; j++)
                {
                    cboClass.Items.Add(ds6.Tables[0].Rows[j][1]);
                }
            }
        }
예제 #12
0
        //学年选项改变时触发
        private void cboYear_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataSet ds = new clsSql().sql1(sSqlTouch, "select * from NianJi where NianJiMingCheng = '" + cboYear.Text + "'");//查询年级

            if (ds.Tables[0].Rows.Count > 0)
            {
                strNianJiID = ds.Tables[0].Rows[0][0].ToString();//获取年级id
            }
            if (cboDepartment.SelectedIndex == -1)
            {
                return;
            }
            clsRefresh1();
        }
예제 #13
0
        private void cls1()
        {
            DataSet ds = new clsSql().sqlSelect1(sSqlTouch, "NianJi");//查询年级

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                cboYear.Items.Add(ds.Tables[0].Rows[i][1]);
            }
            DataSet ds1 = new clsSql().sqlSelect1(sSqlTouch, "XueBu");//查询学部

            for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
            {
                cboDepartment.Items.Add(ds1.Tables[0].Rows[i][1]);
            }
        }
예제 #14
0
        //刷新专业信息
        private void clsRefresh1()
        {
            cboMajor.Items.Clear();
            cboClass.Items.Clear();
            if (cboYear.SelectedIndex == -1 || cboDepartment.SelectedIndex == -1)
            {
                return;
            }
            DataSet ds = new clsSql().sql1(sSqlTouch, "select * from ZhuanYe where XueBuID = '" + cboDepartment.Text.Substring(0, cboDepartment.Text.IndexOf("#")) + "' ");

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                cboMajor.Items.Add(ds.Tables[0].Rows[i][0] + "#    *" + ds.Tables[0].Rows[i][1]);
            }
        }
예제 #15
0
        //刷新班级列表
        private void clsRefresh3()
        {
            lstClass.Items.Clear();
            DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from ZhuanYe where ZhuanYeMingCheng = '" + cboMajor.Text + "'");

            if (ds1.Tables[0].Rows.Count > 0)
            {
                strZhuanYeID = ds1.Tables[0].Rows[0][0].ToString();
                DataSet ds2 = new clsSql().sql1(sSqlTouch, "select * from BanJi where ZhuanYeID = '" + strZhuanYeID + "' and NianJiID = '" + strNianJiID + "'");
                for (int i = 0; i < ds2.Tables[0].Rows.Count; i++)
                {
                    lstClass.Items.Add(ds2.Tables[0].Rows[i][1]);
                }
            }
            txtAdd.Text    = "";
            txtUpdate.Text = "";
        }
예제 #16
0
        //专业刷新
        private void clsRefresh2()
        {
            lstMajor.Items.Clear();
            DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from XueBu where XueBuMingCheng = '" + cboDepartment.Text + "' ");

            if (ds1.Tables[0].Rows.Count > 0)
            {
                strXueBuID = ds1.Tables[0].Rows[0][0].ToString();
                DataSet ds2 = new clsSql().sql1(sSqlTouch, "select * from ZhuanYe where XueBuID = '" + strXueBuID + "' ");
                for (int i = 0; i < ds2.Tables[0].Rows.Count; i++)
                {
                    lstMajor.Items.Add(ds2.Tables[0].Rows[i][1]);
                }
            }
            txtAdd.Text    = "";
            txtUpdate.Text = "";
        }
예제 #17
0
        /// <summary>
        /// 刷新‘groupBox3’中内容
        /// </summary>
        /// <param name="sNumber">输入学号</param>
        private void group3Refresh(string sNumber)
        {
            pictureBox1.Image = null;
            DataSet ds = new SqlFile.clsSql().sqlSelect3(sSqlTouch, "XueSheng", "XueHao", sNumber);

            if (ds.Tables[0].Rows.Count <= 0)
            {
                return;
            }
            txtNumber.Text  = ds.Tables[0].Rows[0][0].ToString(); //显示学号
            txtName.Text    = ds.Tables[0].Rows[0][7].ToString(); //显示名字
            rdoMale.Checked = false;
            rdoLady.Checked = false;
            if (ds.Tables[0].Rows[0][9].ToString() == "男")
            {
                rdoMale.Checked = true;
            }
            else if (ds.Tables[0].Rows[0][9].ToString() == "女")
            {
                rdoLady.Checked = true;
            }
            DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + ds.Tables[0].Rows[0][6].ToString() + "'");      //查询班级
            DataSet ds2 = new clsSql().sql1(sSqlTouch, "select * from ZhuanYe where ZhuanYeID = '" + ds1.Tables[0].Rows[0][2].ToString() + "'"); //查询专业
            DataSet ds3 = new clsSql().sql1(sSqlTouch, "select * from XueBu where XueBuID = '" + ds2.Tables[0].Rows[0][2].ToString() + "'");     //查询学部
            DataSet ds4 = new clsSql().sql1(sSqlTouch, "select * from NianJi where NianJiID = '" + ds1.Tables[0].Rows[0][3].ToString() + "'");   //查询年级

            txtYear.Text       = ds4.Tables[0].Rows[0][1].ToString();                                                                            //显示年级
            txtDepartment.Text = ds3.Tables[0].Rows[0][1].ToString();                                                                            //显示学部
            txtMajor.Text      = ds2.Tables[0].Rows[0][1].ToString();                                                                            //显示专业
            txtClass.Text      = ds1.Tables[0].Rows[0][1].ToString();                                                                            //显示班级
            txtTel.Text        = ds.Tables[0].Rows[0][10].ToString();                                                                            //显示手机号
            checkBox2.Checked  = false;
            sIdCard            = ds.Tables[0].Rows[0][8].ToString();
            txtIdCard.Text     = sIdCard.Substring(0, 6) + "********" + sIdCard.Substring(14);//显示身份证号码
            if (ds.Tables[0].Rows[0][1].ToString() != "")
            {
                pictureBox1.Image = new Bitmap(new MemoryStream((byte[])ds.Tables[0].Rows[0][1]));//显示照片
            }
            lbl1.Text = null;
            if (0 >= new clsSql().sql1(sSqlRecord, "select * from Record where Record_Number = '" + sNumber + "'").Tables[0].Rows.Count)
            {
                new clsSql().sql2(sSqlRecord, "insert into Record (Record_Number,Record_Name,Record_ClassId,Record_Class,Record_Time) values ('" + sNumber + "','" + ds.Tables[0].Rows[0][7].ToString() + "','" + ds.Tables[0].Rows[0][6].ToString() + "','" + ds1.Tables[0].Rows[0][1].ToString() + "',getdate())");
            }
        }
예제 #18
0
        //选择班级时触发
        private void cboClass_SelectedIndexChanged(object sender, EventArgs e)
        {
            String  NianJi  = cboYear.Text.Substring(cboYear.Text.IndexOf("*") + 1, cboYear.Text.ToString().Length - cboYear.Text.IndexOf("*") - 1);
            String  XueBu   = cboDepartment.Text.Substring(cboDepartment.Text.IndexOf("*") + 1, cboDepartment.Text.ToString().Length - cboDepartment.Text.IndexOf("*") - 1);
            String  ZhuanYe = cboMajor.Text.Substring(cboMajor.Text.IndexOf("*") + 1, cboMajor.Text.ToString().Length - cboMajor.Text.IndexOf("*") - 1);
            String  BanJi   = cboClass.Text.ToString();
            DataSet ds      = new clsSql().sql1(sSqlTouch, "select * from GuiFan where NianJiMingCheng = '" + NianJi + "' and XueBuMingCheng = '" + XueBu + "' and ZhuanYeMingCheng = '" + ZhuanYe + "' and BanJiMingCheng = '" + BanJi + "'");

            if (ds.Tables[0].Rows.Count > 0)
            {
                txtFlag.Text = ds.Tables[0].Rows[0][0].ToString();
                b            = true;
            }
            else
            {
                txtFlag.Text = null;
                b            = false;
            }
        }
예제 #19
0
        /// <summary>
        /// GroupBox1组件内容刷新
        /// </summary>
        private void group1Refresh()
        {
            cboYear.Items.Clear();
            cboDepartment.Items.Clear();
            cboMajor.Items.Clear();
            cboClass.Items.Clear();
            DataSet ds = new clsSql().sqlSelect1(sSqlTouch, "NianJi");//查询

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                cboYear.Items.Add(ds.Tables[0].Rows[i][1] + "*                                  #" + ds.Tables[0].Rows[i][0]);
            }
            DataSet ds1 = new clsSql().sqlSelect1(sSqlTouch, "XueBu");//查询

            cboDepartment.Items.Add("");
            for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
            {
                cboDepartment.Items.Add(ds1.Tables[0].Rows[i][1] + "*                                  #" + ds1.Tables[0].Rows[i][0]);
            }
        }
예제 #20
0
        //刷新学年和学部列表
        private void clsRefresh1()
        {
            strNianJiID = "";
            strXueBuID  = "";
            cboYear.Items.Clear();
            cboDepartment.Items.Clear();
            cboClass.Items.Clear();
            DataSet ds = new clsSql().sqlSelect1(sSqlTouch, "NianJi");//查询

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                cboYear.Items.Add(ds.Tables[0].Rows[i][1]);
            }
            DataSet ds1 = new clsSql().sqlSelect1(sSqlTouch, "XueBu");//查询

            for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
            {
                cboDepartment.Items.Add(ds1.Tables[0].Rows[i][1]);
            }
        }
예제 #21
0
        //刷新学年,学部信息
        private void clsRefresh()
        {
            b = true;
            cboYear.Items.Clear();
            cboDepartment.Items.Clear();
            cboMajor.Items.Clear();
            cboClass.Items.Clear();
            txtFlag.Text = null;
            DataSet ds = new clsSql().sqlSelect1(sSqlTouch, "NianJi");//查询

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                cboYear.Items.Add(ds.Tables[0].Rows[i][0] + "#    *" + ds.Tables[0].Rows[i][1]);
            }
            DataSet ds1 = new clsSql().sqlSelect1(sSqlTouch, "XueBu");//查询

            for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
            {
                cboDepartment.Items.Add(ds1.Tables[0].Rows[i][0] + "#    *" + ds1.Tables[0].Rows[i][1]);
            }
        }
예제 #22
0
        /// <summary>
        /// 刷新‘groupBox4’中内容
        /// </summary>
        private void group4Refresh()
        {
            label4.Text = "";
            dt1.Clear();
            DataSet ds = new clsSql().sql1(sSqlRecord, "select * from Record ");

            if (ds.Tables[0].Rows.Count <= 0)
            {
                return;
            }
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                DataRow dr = dt1.NewRow();
                dr[0] = ds.Tables[0].Rows[i][1];
                dr[1] = ds.Tables[0].Rows[i][2];
                dr[2] = ds.Tables[0].Rows[i][4];
                dr[3] = ds.Tables[0].Rows[i][5];
                dt1.Rows.Add(dr);
            }
            label4.Text = ds.Tables[0].Rows.Count.ToString();
        }
예제 #23
0
        //通过学号查询班级和照片
        private void SelectImage(String sNumber)
        {
            DataSet ds = new SqlFile.clsSql().sqlSelect3(sSqlTouch, "XueSheng", "XueHao", sNumber);

            if (ds.Tables[0].Rows.Count < 0)
            {
                return;
            }
            if (ds.Tables[0].Rows[0][1].ToString() != "")
            {
                pictureBox2.Image = new Bitmap(new MemoryStream((byte[])ds.Tables[0].Rows[0][1]));//显示照片
                lblImage.Visible  = false;
            }
            else
            {
                pictureBox1.Image = null;
                lblImage.Visible  = true;
            }
            DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + ds.Tables[0].Rows[0][6].ToString() + "'");//查询班级

            lblClass.Text = ds1.Tables[0].Rows[0][1].ToString();
        }
예제 #24
0
        //单击更新按钮
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            string sSex = "";

            if (rdoMen.Checked == true)
            {
                sSex = rdoMen.Text;
            }
            else if (rdoWomen.Checked == true)
            {
                sSex = rdoWomen.Text;
            }
            if (!(txtNumber.Text != "" && txtName.Text != "" && txtIdCard.Text != "" && txtTel.Text != "" && cboYear.Text != "" && cboDepartment.Text != "" && cboClass.Text != "" && sSex != ""))
            {
                MessageBox.Show("请确认信息填写的完整性!", "提示");
                return;
            }
            if (!(lblNumberY.Visible == true && lblNameY.Visible == true && lblIdCardY.Visible == true && lblTelY.Visible == true && label1.Visible == false))
            {
                MessageBox.Show("请确认各项格式输入正确!", "提示");
                return;
            }
            DialogResult r = MessageBox.Show("是否修改数据?", "提示!", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

            if (r != DialogResult.OK)
            {
                return;
            }
            DataSet ds = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiMingCheng = '" + cboClass.Text + "' and NianJiID = '" + strNianJiID + "' ");

            if (new clsSql().sql2(sSqlTouch, "update XueSheng set BanJiID = '" + ds.Tables[0].Rows[0][0].ToString() + "' , XingMing = '" + txtName.Text + "' , ShenFenZhengHao = '" + txtIdCard.Text + "' , XingBie = '" + sSex + "' , DianHua = '" + txtTel.Text + "' where XueHao = '" + txtNumber.Text + "'") == true)//执行修改语句
            {
                MessageBox.Show("修改成功!O(∩_∩)O~~~", "提示!");
            }
            else
            {
                MessageBox.Show("修改失败!", "提示!");
            }
        }
예제 #25
0
 public void GuardarRegion()
 {
     if (!NombreRegion.Equals("")) { return; }
     clsSql Cn = new clsSql();
     if (IdRegion == 0)
     {
         Cn.ejecutar("insert into tRegion values ((select (MAX(idRegion)+1) from tRegion), '" + NombreRegion + "')");
     }
     else {
         Cn.ejecutar("update tRegion set descripcion = '" + NombreRegion + "' where idRegion = " + IdRegion);
     }
     LimparRegion();
 }
예제 #26
0
 public void EliminarRegion()
 {
     clsSql Cn = new clsSql();
     if (IdRegion != 0)
     {
         Cn.ejecutar("delete from tRegion where idRegion = " + IdRegion);
     }
     LimparRegion();
 }
예제 #27
0
        /// <summary>
        /// 单击‘班级信息’按钮的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnClass_Click(object sender, EventArgs e)
        {
            label2.Text = "0";
            dt.Clear();
            string strYear       = "";
            string strDepartment = "";
            string strMajor      = "";
            string strClass      = "";

            if (cboYear.SelectedIndex < 0)
            {
                return;
            }
            if (cboDepartment.SelectedIndex < 1)
            {
                strYear = cboYear.Text.Substring(cboYear.Text.IndexOf("#") + 1);
                DataSet ds = new clsSql().sql1(sSqlTouch, "select * from BanJi where NianJiID = '" + strYear + "'");
                if (ds.Tables[0].Rows.Count <= 0)
                {
                    return;
                }
                string str = " BanJiID = '" + ds.Tables[0].Rows[0][0].ToString() + "' ";
                for (int i = 1; i < ds.Tables[0].Rows.Count; i++)
                {
                    str += "or BanJiID = '" + ds.Tables[0].Rows[i][0].ToString() + "' ";
                }
                DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from XueSheng where " + str);
                if (ds1.Tables[0].Rows.Count <= 0)
                {
                    return;
                }
                string  n       = ds1.Tables[0].Rows[0][6].ToString();
                DataSet ds2     = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + n + "'");
                string  strName = ds2.Tables[0].Rows[0][1].ToString();
                for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
                {
                    if (ds1.Tables[0].Rows[i][6].ToString() != n)
                    {
                        strName = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + ds1.Tables[0].Rows[i][6].ToString() + "'").Tables[0].Rows[0][1].ToString();
                        n       = ds1.Tables[0].Rows[i][6].ToString();
                    }
                    DataRow dr = dt.NewRow();
                    dr[0] = ds1.Tables[0].Rows[i][0];
                    dr[1] = ds1.Tables[0].Rows[i][7];
                    dr[2] = strName;
                    dt.Rows.Add(dr);
                }
                label2.Text = ds1.Tables[0].Rows.Count.ToString();
            }
            else if (cboMajor.SelectedIndex < 1)
            {
                strYear       = cboYear.Text.Substring(cboYear.Text.IndexOf("#") + 1);
                strDepartment = cboDepartment.Text.Substring(cboDepartment.Text.IndexOf("#") + 1);
                DataSet ds = new clsSql().sql1(sSqlTouch, "select * from ZhuanYe where XueBuID = '" + strDepartment + "'");
                if (ds.Tables[0].Rows.Count <= 0)
                {
                    return;
                }
                string str = " ZhuanYeID = '" + ds.Tables[0].Rows[0][0].ToString() + "' ";
                for (int i = 1; i < ds.Tables[0].Rows.Count; i++)
                {
                    str += "or ZhuanYeID = '" + ds.Tables[0].Rows[i][0].ToString() + "' ";
                }
                DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from BanJi where NianJiID = '" + strYear + "' and " + str);
                if (ds1.Tables[0].Rows.Count <= 0)
                {
                    return;
                }
                string str1 = " BanJiID = '" + ds1.Tables[0].Rows[0][0].ToString() + "' ";
                for (int i = 1; i < ds1.Tables[0].Rows.Count; i++)
                {
                    str1 += "or BanJiID = '" + ds1.Tables[0].Rows[i][0].ToString() + "' ";
                }
                DataSet ds2 = new clsSql().sql1(sSqlTouch, "select * from XueSheng where " + str1);
                if (ds2.Tables[0].Rows.Count <= 0)
                {
                    return;
                }
                string  n       = ds2.Tables[0].Rows[0][6].ToString();
                DataSet ds3     = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + n + "'");
                string  strName = ds3.Tables[0].Rows[0][1].ToString();
                for (int i = 0; i < ds2.Tables[0].Rows.Count; i++)
                {
                    if (ds2.Tables[0].Rows[i][6].ToString() != n)
                    {
                        strName = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + ds2.Tables[0].Rows[i][6].ToString() + "'").Tables[0].Rows[0][1].ToString();
                        n       = ds2.Tables[0].Rows[i][6].ToString();
                    }
                    DataRow dr = dt.NewRow();
                    dr[0] = ds2.Tables[0].Rows[i][0];
                    dr[1] = ds2.Tables[0].Rows[i][7];
                    dr[2] = strName;
                    dt.Rows.Add(dr);
                }
                label2.Text = ds2.Tables[0].Rows.Count.ToString();
            }
            else if (cboClass.SelectedIndex < 1)
            {
                strYear  = cboYear.Text.Substring(cboYear.Text.IndexOf("#") + 1);
                strMajor = cboMajor.Text.Substring(cboMajor.Text.IndexOf("#") + 1);
                DataSet ds = new clsSql().sql1(sSqlTouch, "select * from BanJi where ZhuanYeID = '" + strMajor + "' and NianJiID = '" + strYear + "'");
                if (ds.Tables[0].Rows.Count <= 0)
                {
                    return;
                }
                string str = " BanJiID = '" + ds.Tables[0].Rows[0][0].ToString() + "' ";
                for (int i = 1; i < ds.Tables[0].Rows.Count; i++)
                {
                    str += "or BanJiID = '" + ds.Tables[0].Rows[i][0].ToString() + "' ";
                }
                DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from XueSheng where " + str);
                if (ds1.Tables[0].Rows.Count <= 0)
                {
                    return;
                }
                string  n       = ds1.Tables[0].Rows[0][6].ToString();
                DataSet ds2     = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + n + "'");
                string  strName = ds2.Tables[0].Rows[0][1].ToString();
                for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
                {
                    if (ds1.Tables[0].Rows[i][6].ToString() != n)
                    {
                        strName = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + ds1.Tables[0].Rows[i][6].ToString() + "'").Tables[0].Rows[0][1].ToString();
                        n       = ds1.Tables[0].Rows[i][6].ToString();
                    }
                    DataRow dr = dt.NewRow();
                    dr[0] = ds1.Tables[0].Rows[i][0];
                    dr[1] = ds1.Tables[0].Rows[i][7];
                    dr[2] = strName;
                    dt.Rows.Add(dr);
                }
                label2.Text = ds1.Tables[0].Rows.Count.ToString();
            }
            else
            {
                strClass = cboClass.Text.Substring(cboClass.Text.IndexOf("#") + 1);
                DataSet ds = new clsSql().sql1(sSqlTouch, "select * from XueSheng where BanJiID = '" + strClass + "'");
                if (ds.Tables[0].Rows.Count <= 0)
                {
                    return;
                }
                DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + ds.Tables[0].Rows[0][6].ToString() + "'");
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    DataRow dr = dt.NewRow();
                    dr[0] = ds.Tables[0].Rows[i][0];
                    dr[1] = ds.Tables[0].Rows[i][7];
                    dr[2] = ds1.Tables[0].Rows[0][1];
                    dt.Rows.Add(dr);
                }
                label2.Text = ds.Tables[0].Rows.Count.ToString();
            }
        }
예제 #28
0
 public void GuardarComuna()
 {
     clsSql Cn = new clsSql();
     if (IdProvincia == 0)
     {
         if (NombreProvincia.Equals("")) { return; }
         IdProvincia = Convert.ToInt32(Cn.obtenerId("select ISNULL(max(idProvincia),0)+1 from tProvincia where descripcionProvincia = '" + NombreProvincia + "'"));
     }
     else
     {
         IdProvincia = Convert.ToInt32(Cn.obtenerId("select ISNULL(max(idProvincia),0) from tProvincia where idProvincia = " + IdProvincia));
     }
     if (IdProvincia == 0) { return; }
     if (NombreComuna.Equals("")) { return; }
     if (IdComuna == 0)
     {
         Cn.ejecutar("insert into tComuna values ((select (MAX(idComuna)+1) from tComuna), '" + NombreComuna + "', " + IdProvincia + ")");
     }
     else
     {
         Cn.ejecutar("update tComuna set descripcionComuna = '" + NombreComuna + "', idProvincia = " + IdProvincia + " where idComuna = " + IdComuna);
     }
     LimparComuna();
 }
예제 #29
0
 //更改学号text时触发
 private void txtNumber_TextChanged(object sender, EventArgs e)
 {
     if (txtNumber.Text.ToString().Length == 8)                                                                       //当输入字符串为八位时
     {
         DataSet ds = new clsSql().sql1(sSqlTouch, "select * from XueSheng where XueHao = '" + txtNumber.Text + "'"); //查询学生信息
         if (ds.Tables[0].Rows.Count <= 0)
         {
             return;
         }
         lblNumberY.Visible = true;
         label1.Visible     = false;
         txtName.Text       = ds.Tables[0].Rows[0][7].ToString();  //显示名字
         txtIdCard.Text     = ds.Tables[0].Rows[0][8].ToString();  //显示身份证号码
         txtTel.Text        = ds.Tables[0].Rows[0][10].ToString(); //显示手机号
         if (ds.Tables[0].Rows[0][2].ToString() != "")
         {
             txt1.Text = "存在";
         }
         else
         {
             txt1.Text = "null";
         }
         if (ds.Tables[0].Rows[0][3].ToString() != "")
         {
             txt2.Text = "存在";
         }
         else
         {
             txt2.Text = "null";
         }
         if (ds.Tables[0].Rows[0][4].ToString() != "")
         {
             txt3.Text = "存在";
         }
         else
         {
             txt3.Text = "null";
         }
         if (ds.Tables[0].Rows[0][5].ToString() != "")
         {
             txt4.Text = "存在";
         }
         else
         {
             txt4.Text = "null";
         }
         if (ds.Tables[0].Rows[0][1].ToString() != "")
         {
             pictureBox1.Image = new Bitmap(new MemoryStream((byte[])ds.Tables[0].Rows[0][1]));//显示照片
             label2.Visible    = false;
         }
         else
         {
             pictureBox1.Image = null;
             label2.Visible    = true;
         }
         DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + ds.Tables[0].Rows[0][6].ToString() + "'");      //查询班级
         DataSet ds2 = new clsSql().sql1(sSqlTouch, "select * from ZhuanYe where ZhuanYeID = '" + ds1.Tables[0].Rows[0][2].ToString() + "'"); //查询专业
         DataSet ds3 = new clsSql().sql1(sSqlTouch, "select * from XueBu where XueBuID = '" + ds2.Tables[0].Rows[0][2].ToString() + "'");     //查询学部
         DataSet ds4 = new clsSql().sql1(sSqlTouch, "select * from NianJi where NianJiID = '" + ds1.Tables[0].Rows[0][3].ToString() + "'");   //查询年级
         cboYear.SelectedItem       = ds4.Tables[0].Rows[0][1].ToString();                                                                    //显示年级
         cboDepartment.SelectedItem = ds3.Tables[0].Rows[0][1].ToString();                                                                    //显示学部
         cboClass.SelectedItem      = ds1.Tables[0].Rows[0][1].ToString();                                                                    //显示班级
         if (ds.Tables[0].Rows[0][9].ToString() == "男")
         {
             rdoMen.Checked   = true;
             rdoWomen.Checked = false;
         }
         else if (ds.Tables[0].Rows[0][9].ToString() == "女")
         {
             rdoMen.Checked   = false;
             rdoWomen.Checked = true;
         }
         else
         {
             rdoMen.Checked   = false;
             rdoWomen.Checked = false;
         }
     }
     else
     {
         txt1.Text                   = null;
         txt2.Text                   = null;
         txt3.Text                   = null;
         txt4.Text                   = null;
         label1.Visible              = true;
         label2.Visible              = false;
         lblNumberY.Visible          = false;
         cboYear.SelectedIndex       = -1;
         cboDepartment.SelectedIndex = -1;
         cboClass.SelectedIndex      = -1;
         pictureBox1.Image           = null;
         txtName.Text                = null;
         txtIdCard.Text              = null;
         txtTel.Text                 = null;
         rdoMen.Checked              = false;
         rdoWomen.Checked            = false;
     }
 }
예제 #30
0
        //查询学生信息
        private void clsInfo()
        {
            DataSet ds = new clsSql().sql1(sSqlTouch, "select * from XueSheng where XueHao = '" + txtNumber.Text + "'");//查询学生信息

            if (ds.Tables[0].Rows.Count > 0)
            {
                lblNumberY.Visible = true;
                txtName.Text       = ds.Tables[0].Rows[0][7].ToString();//导出姓名
                if (ds.Tables[0].Rows[0][1].ToString() != "")
                {
                    pictureBox1.Image = new Bitmap(new MemoryStream((byte[])ds.Tables[0].Rows[0][1]));//显示照片
                    label1.Visible    = false;
                }
                else
                {
                    pictureBox1.Image = null;
                    label1.Visible    = true;
                }
                DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + ds.Tables[0].Rows[0][6].ToString() + "'");      //查询班级
                DataSet ds2 = new clsSql().sql1(sSqlTouch, "select * from ZhuanYe where ZhuanYeID = '" + ds1.Tables[0].Rows[0][2].ToString() + "'"); //查询专业
                DataSet ds3 = new clsSql().sql1(sSqlTouch, "select * from XueBu where XueBuID = '" + ds2.Tables[0].Rows[0][2].ToString() + "'");     //查询学部
                DataSet ds4 = new clsSql().sql1(sSqlTouch, "select * from NianJi where NianJiID = '" + ds1.Tables[0].Rows[0][3].ToString() + "'");   //查询年级
                txtYear.Text       = ds4.Tables[0].Rows[0][1].ToString();                                                                            //显示年级
                txtDepartment.Text = ds3.Tables[0].Rows[0][1].ToString();                                                                            //显示学部
                txtMajor.Text      = ds2.Tables[0].Rows[0][1].ToString();                                                                            //显示专业
                txtClass.Text      = ds1.Tables[0].Rows[0][1].ToString();                                                                            //显示班级
                if (ds.Tables[0].Rows[0][9].ToString() == "男")
                {
                    rdoMen.Checked   = true;
                    rdoWomen.Checked = false;
                }
                else if (ds.Tables[0].Rows[0][9].ToString() == "女")
                {
                    rdoMen.Checked   = false;
                    rdoWomen.Checked = true;
                }
                else
                {
                    rdoMen.Checked   = false;
                    rdoWomen.Checked = false;
                }
                if (ds.Tables[0].Rows[0][2].ToString() != "")
                {
                    txt1.Text = "存在";
                }
                else
                {
                    txt1.Text = "null";
                }
                if (ds.Tables[0].Rows[0][3].ToString() != "")
                {
                    txt2.Text = "存在";
                }
                else
                {
                    txt2.Text = "null";
                }
                if (ds.Tables[0].Rows[0][4].ToString() != "")
                {
                    txt3.Text = "存在";
                }
                else
                {
                    txt3.Text = "null";
                }
                if (ds.Tables[0].Rows[0][5].ToString() != "")
                {
                    txt4.Text = "存在";
                }
                else
                {
                    txt4.Text = "null";
                }
            }
            else
            {
                clsRefresh();
            }
        }
예제 #31
0
 public void EliminarComuna()
 {
     clsSql Cn = new clsSql();
     if (IdProvincia != 0)
     {
         Cn.ejecutar("delete from tComuna where idComuna = " + IdComuna);
     }
     LimparProvincia();
 }
예제 #32
0
 public void GuardarDireccion()
 {
     clsSql Cn = new clsSql();
     IdComuna = Convert.ToInt32(Cn.obtenerId("select ISNULL(max(idComuna),0) from tComuna where idComuna = " + IdComuna));
     if (IdComuna == 0) { return; }
     IdProvincia = Convert.ToInt32(Cn.obtenerId("select ISNULL(max(idProvincia),0) from tComuna where idComuna = " + IdComuna));
     if (IdProvincia == 0) { return; }
     IdRegion = Convert.ToInt32(Cn.obtenerId("select ISNULL(max(idRegion),0) from tProvincia where idProvincia = " + IdProvincia));
     if (IdRegion == 0) { return; }
     if (NumeroCasa==0) { return; }
     if (NombreCalle.Equals("")) { return; }
     if (VillaPoblacion.Equals("")) { return; }
     if (IdDireccion == 0)
     {
         Cn.ejecutar("insert into tDireccion values ((select (MAX(idDireccion)+1) from tDireccion), '" + NombreCalle + "', " + NumeroCasa + ", '" + VillaPoblacion + "', " + IdRegion + ", " + IdProvincia + ", " + IdComuna + " )");
     }
     else
     {
         Cn.ejecutar("update tDireccion set calle = '" + NombreCalle + "', numero = " + NumeroCasa + ", villaPoblacion = '" + VillaPoblacion + "', idRegion = " + IdRegion + ", idProvincia = " + IdProvincia + ", idComuna = " + IdComuna + " where idDireccion = " + IdDireccion);
     }
     LimpiarDireccion();
 }
예제 #33
0
        //查询学生信息
        private void clsPhoto()
        {
            DataSet ds = new clsSql().sql1(sSqlTouch, "select * from XueSheng where XueHao = '" + txtNumber.Text + "'");//查询学生信息

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0][1].ToString() != "")
                {
                    try
                    {
                        pictureBox1.Image = new Bitmap(new MemoryStream((byte[])ds.Tables[0].Rows[0][1]));
                    }
                    catch
                    {
                        pictureBox1.Image = null;
                    }
                    lblNo.Visible = false;
                }
                else
                {
                    lblNo.Visible     = true;
                    pictureBox1.Image = null;
                }
                if (ds.Tables[0].Rows[0][2].ToString() != "")
                {
                    txt1.Text = "存在";
                }
                else
                {
                    txt1.Text = "null";
                }
                if (ds.Tables[0].Rows[0][3].ToString() != "")
                {
                    txt2.Text = "存在";
                }
                else
                {
                    txt2.Text = "null";
                }
                if (ds.Tables[0].Rows[0][4].ToString() != "")
                {
                    txt3.Text = "存在";
                }
                else
                {
                    txt3.Text = "null";
                }
                if (ds.Tables[0].Rows[0][5].ToString() != "")
                {
                    txt4.Text = "存在";
                }
                else
                {
                    txt4.Text = "null";
                }
                lblNumberY.Visible = true;
            }
            else
            {
                txt1.Text          = null;
                txt2.Text          = null;
                txt3.Text          = null;
                txt4.Text          = null;
                lblNumberY.Visible = false;
                pictureBox1.Image  = null;
            }
        }
예제 #34
0
        /// <summary>
        /// 加载学生信息
        /// </summary>
        /// <param name="sNumber">学生学号</param>
        private void Student1(string strNumber)
        {
            DataSet ds = new SqlFile.clsSql().sqlSelect3(sSqlTouch, "XueSheng", "XueHao", strNumber);

            if (ds.Tables[0].Rows.Count <= 0)
            {
                return;
            }
            txtNumber.Text  = ds.Tables[0].Rows[0][0].ToString(); //显示学号
            txtName.Text    = ds.Tables[0].Rows[0][7].ToString(); //显示名字
            rdoMale.Checked = false;
            rdoLady.Checked = false;
            if (ds.Tables[0].Rows[0][9].ToString() == "男")
            {
                rdoMale.Checked = true;
            }
            else if (ds.Tables[0].Rows[0][9].ToString() == "女")
            {
                rdoLady.Checked = true;
            }
            DataSet ds1 = new clsSql().sql1(sSqlTouch, "select * from BanJi where BanJiID = '" + ds.Tables[0].Rows[0][6].ToString() + "'");      //查询班级
            DataSet ds2 = new clsSql().sql1(sSqlTouch, "select * from ZhuanYe where ZhuanYeID = '" + ds1.Tables[0].Rows[0][2].ToString() + "'"); //查询专业
            DataSet ds3 = new clsSql().sql1(sSqlTouch, "select * from XueBu where XueBuID = '" + ds2.Tables[0].Rows[0][2].ToString() + "'");     //查询学部
            DataSet ds4 = new clsSql().sql1(sSqlTouch, "select * from NianJi where NianJiID = '" + ds1.Tables[0].Rows[0][3].ToString() + "'");   //查询年级

            txtYear.Text       = ds4.Tables[0].Rows[0][1].ToString();                                                                            //显示年级
            txtDepartment.Text = ds3.Tables[0].Rows[0][1].ToString();                                                                            //显示学部
            txtMajor.Text      = ds2.Tables[0].Rows[0][1].ToString();                                                                            //显示专业
            txtClass.Text      = ds1.Tables[0].Rows[0][1].ToString();                                                                            //显示班级
            txtTel.Text        = ds.Tables[0].Rows[0][10].ToString();                                                                            //显示手机号
            checkBox2.Checked  = false;
            sIdCard            = ds.Tables[0].Rows[0][8].ToString();
            txtIdCard.Text     = sIdCard.Substring(0, 6) + "********" + sIdCard.Substring(14);//显示身份证号码
            if (ds.Tables[0].Rows[0][1].ToString() != "")
            {
                pictureBox1.Image = new Bitmap(new MemoryStream((byte[])ds.Tables[0].Rows[0][1]));//显示照片
            }
            if (ds.Tables[0].Rows[0][2].ToString() != "")
            {
                txtTouch1.Text = "存在";
            }
            else
            {
                txtTouch1.Text = "null";
            }
            if (ds.Tables[0].Rows[0][3].ToString() != "")
            {
                txtTouch2.Text = "存在";
            }
            else
            {
                txtTouch2.Text = "null";
            }
            if (ds.Tables[0].Rows[0][4].ToString() != "")
            {
                txtTouch3.Text = "存在";
            }
            else
            {
                txtTouch3.Text = "null";
            }
            if (ds.Tables[0].Rows[0][5].ToString() != "")
            {
                txtTouch4.Text = "存在";
            }
            else
            {
                txtTouch4.Text = "null";
            }
        }
예제 #35
0
 public void EliminarDireccion()
 {
     if (IdDireccion == 0) { return; }
     clsSql Cn = new clsSql();
     IdDireccion = Convert.ToInt32(Cn.obtenerId("select ISNULL(max(idDireccion),0) from tDireccion where idDireccion = " + IdDireccion));
     if (IdDireccion == 0) { return; }
     Int32 Run = Convert.ToInt32(Cn.obtenerId("select ISNULL(MAX(run),0) from tPersona where idDireccion = " + IdDireccion));
     if (Run == 0)
     {
         Cn.ejecutar("delete from tDireccion where idDireccion = " + IdDireccion);
     }
     LimpiarDireccion();
 }
예제 #36
0
            public void GuardarPersona()
            {
                clsSql Cn = new clsSql();
                if (DvPersona.Equals("")) { return; }
                if (NombresPersona.Equals("")) { return; }
                if (ApellidoPaterno.Equals("")) { return; }
                if (ApellidoMaterno.Equals("")) { return; }
                //if (FechaNacimiento. == "") { return; }
                if (CorreoElectronico.Equals("")) { return; }
                if (IdDireccion == 0) { return; }
                if (TelefonoPersona == 0) { return; }

                if (RunPersona == 0)
                {
                    Cn.ejecutar("insert into tPersona values (" + RunPersona + ", '" + DvPersona + "', '" + NombresPersona + "', '" + ApellidoPaterno + "', '" + ApellidoMaterno + "', '" + FechaNacimiento.ToShortDateString() + "', '" + CorreoElectronico + "', " + IdDireccion + ", " + TelefonoPersona + " )");
                }
                else
                {
                    Cn.ejecutar("update tPersona set nombres = '" + NombresPersona + "', apellidoPaterno = '" + ApellidoPaterno + "', apellidoMaterno = '" + ApellidoMaterno + "', fechaNacimiento = " + FechaNacimiento.ToShortDateString() + ", correoElectronico = '" + CorreoElectronico + "', idDireccion = " + IdDireccion + ", telefono = " + TelefonoPersona + " where run = " + RunPersona);
                }
                LimpiarPersona();
            }
예제 #37
0
        //选择学生时
        private void lstStudent_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lstStudent.SelectedIndex < 0)
            {
                return;
            }
            DataSet ds = new clsSql().sql1(sSqlTouch, "select * from XueSheng where XueHao = '" + lstStudent.Text.ToString().Substring(0, 8) + "'");//查询学生

            if (ds.Tables[0].Rows.Count <= 0)
            {
                return;
            }
            txtNumber.Text = ds.Tables[0].Rows[0][0].ToString();  //显示学号
            txtName.Text   = ds.Tables[0].Rows[0][7].ToString();  //显示名字
            txtIdCard.Text = ds.Tables[0].Rows[0][8].ToString();  //显示身份证号码
            txtTel.Text    = ds.Tables[0].Rows[0][10].ToString(); //显示手机号
            if (ds.Tables[0].Rows[0][9].ToString() == "男")
            {
                rdoMen.Checked   = true;
                rdoWomen.Checked = false;
            }
            else if (ds.Tables[0].Rows[0][9].ToString() == "女")
            {
                rdoMen.Checked   = false;
                rdoWomen.Checked = true;
            }
            else
            {
                rdoMen.Checked   = false;
                rdoWomen.Checked = false;
            }
            if (ds.Tables[0].Rows[0][2].ToString() != "")
            {
                txt1.Text = "存在";
            }
            else
            {
                txt1.Text = "null";
            }
            if (ds.Tables[0].Rows[0][3].ToString() != "")
            {
                txt2.Text = "存在";
            }
            else
            {
                txt2.Text = "null";
            }
            if (ds.Tables[0].Rows[0][4].ToString() != "")
            {
                txt3.Text = "存在";
            }
            else
            {
                txt3.Text = "null";
            }
            if (ds.Tables[0].Rows[0][5].ToString() != "")
            {
                txt4.Text = "存在";
            }
            else
            {
                txt4.Text = "null";
            }
            if (ds.Tables[0].Rows[0][1].ToString() != "")
            {
                pictureBox1.Image = new Bitmap(new MemoryStream((byte[])ds.Tables[0].Rows[0][1]));//显示照片
                label2.Visible    = false;
            }
            else
            {
                pictureBox1.Image = null;
                label2.Visible    = true;
            }
        }