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

📄 student.aspx.cs

📁 一个研究生管理系统 具体的情况自己看了
💻 CS
📖 第 1 页 / 共 3 页
字号:
                                                }
                                                else
                                                    if (DropDownList2.SelectedValue == "<=")
                                                    {
                                                        if (Convert.ToInt32(read.Rows[0][0]) <= data)
                                                        {
                                                            reader.Rows[i]["count"] = Convert.ToInt32(read.Rows[0][0]);

                                                        }
                                                        else
                                                        {
                                                            reader.Rows[i].Delete();
                                                        }

                                                    }
                                                    else
                                                        if (DropDownList2.SelectedValue == ">")
                                                        {
                                                            if (Convert.ToInt32(read.Rows[0][0]) > data)
                                                            {
                                                                reader.Rows[i]["count"] = Convert.ToInt32(read.Rows[0][0]);

                                                            }
                                                            else
                                                            {
                                                                reader.Rows[i].Delete();
                                                            }

                                                        }
                                                        else
                                                            if (DropDownList2.SelectedValue == "~")
                                                            {
                                                                int de = -1;
                                                                try
                                                                {
                                                                    de = Convert.ToInt32(TextBox2.Text);
                                                                }
                                                                catch
                                                                {
                                                                    Response.Write("<script>alert('还没有输入匹配数据错误');</script>");
                                                                    return;
                                                                }
                                                                if ((Convert.ToInt32(read.Rows[0][0]) >= data) && (Convert.ToInt32(read.Rows[0][0]) <= de))
                                                                {
                                                                    reader.Rows[i]["count"] = Convert.ToInt32(read.Rows[0][0]);

                                                                }
                                                                else
                                                                {
                                                                    reader.Rows[i].Delete();
                                                                }

                                                            }


                                }
                                else
                                {
                                    reader.Rows[i].Delete();

                                }

                                i++;
                            }



                        }
                        else
                            if (DropDownList1.SelectedValue == "4")
                            {

                                i = 0;
                                int data = 0;
                                try
                                {
                                    data = Convert.ToInt32(TextBox1.Text);
                                }
                                catch
                                {
                                    Response.Write("<script>alert('还没有输入匹配数据错误');</script>");
                                    return;
                                }
                                //if (data < 1) return;                   
                                while (i < reader.Rows.Count)
                                {
                                    str = "select count(StuID) as cout from TeachPracApply where StuID='" + reader.Rows[i]["StuID"].ToString() + "' AND IsChecked=1";
                                    try
                                    {
                                        read = null;
                                        read = grd_MIS.manager.GetData_SqlExec(str);
                                    }
                                    catch (Exception ex)
                                    {
                                        Response.Write(ex.Message);
                                    }
                                    if (read != null && (read.Rows.Count == 1))
                                    {
                                        if (DropDownList2.SelectedValue == ">")
                                        {
                                            if (Convert.ToInt32(read.Rows[0][0]) > data)
                                            {
                                                reader.Rows[i]["count"] = Convert.ToInt32(read.Rows[0][0]);

                                            }
                                            else
                                            {
                                                reader.Rows[i].Delete();
                                            }

                                        }
                                        else
                                            if (DropDownList2.SelectedValue == "=")
                                            {
                                                if (Convert.ToInt32(read.Rows[0][0]) == data)
                                                {
                                                    reader.Rows[i]["count"] = Convert.ToInt32(read.Rows[0][0]);

                                                }
                                                else
                                                {
                                                    reader.Rows[i].Delete();
                                                }

                                            }
                                            else
                                                if (DropDownList2.SelectedValue == "<")
                                                {
                                                    if (Convert.ToInt32(read.Rows[0][0]) < data)
                                                    {
                                                        reader.Rows[i]["count"] = Convert.ToInt32(read.Rows[0][0]);

                                                    }
                                                    else
                                                    {
                                                        reader.Rows[i].Delete();
                                                    }

                                                }
                                                else
                                                    if (DropDownList2.SelectedValue == ">=")
                                                    {
                                                        if (Convert.ToInt32(read.Rows[0][0]) >= data)
                                                        {
                                                            reader.Rows[i]["count"] = Convert.ToInt32(read.Rows[0][0]);

                                                        }
                                                        else
                                                        {
                                                            reader.Rows[i].Delete();
                                                        }

                                                    }
                                                    else
                                                        if (DropDownList2.SelectedValue == "<=")
                                                        {
                                                            if (Convert.ToInt32(read.Rows[0][0]) <= data)
                                                            {
                                                                reader.Rows[i]["count"] = Convert.ToInt32(read.Rows[0][0]);

                                                            }
                                                            else
                                                            {
                                                                reader.Rows[i].Delete();
                                                            }

                                                        }
                                                        else
                                                            if (DropDownList2.SelectedValue == ">")
                                                            {
                                                                if (Convert.ToInt32(read.Rows[0][0]) > data)
                                                                {
                                                                    reader.Rows[i]["count"] = Convert.ToInt32(read.Rows[0][0]);

                                                                }
                                                                else
                                                                {
                                                                    reader.Rows[i].Delete();
                                                                }

                                                            }
                                                            else
                                                                if (DropDownList2.SelectedValue == "~")
                                                                {
                                                                    int de = -1;
                                                                    try
                                                                    {
                                                                        de = Convert.ToInt32(TextBox2.Text);
                                                                    }
                                                                    catch
                                                                    {
                                                                        Response.Write("<script>alert('还没有输入匹配数据错误');</script>");
                                                                        return;
                                                                    }
                                                                    if ((Convert.ToInt32(read.Rows[0][0]) >= data) && (Convert.ToInt32(read.Rows[0][0]) <= de))
                                                                    {
                                                                        reader.Rows[i]["count"] = Convert.ToInt32(read.Rows[0][0]);

                                                                    }
                                                                    else
                                                                    {
                                                                        reader.Rows[i].Delete();
                                                                    }

                                                                }


                                    }
                                    else
                                    {
                                        reader.Rows[i].Delete();

                                    }

                                    i++;
                                }



                            }
                            else
                                if (DropDownList1.SelectedValue == "7")
                                {

                                    i = 0;
                                    int data = 0;
                                    try
                                    {
                                        data = Convert.ToInt32(TextBox1.Text);
                                    }
                                    catch
                                    {
                                        Response.Write("<script>alert('还没有输入匹配数据错误');</script>");
                                        return;
                                    }
                                    String sq = "select StuID,StuName,EntranceTime,PrimTeachPhone,Address FROM StudentInfo where ";
                                    if (DropDownList2.SelectedValue == ">")
                                    {
                                        sq = sq + "StuID > '"+TextBox1.Text+"'";
                                    }
                                    if (DropDownList2.SelectedValue == "<")
                                    {
                                        sq = sq + "StuID < '" + TextBox1.Text + "'";
                                    }
                                    if (DropDownList2.SelectedValue == "<>")
                                    {
                                        sq = sq + "StuID <> '" + TextBox1.Text + "'";
                                    }
                                    if (DropDownList2.SelectedValue == ">=")
                                    {
                                        sq = sq + "StuID >= '" + TextBox1.Text + "'";
                                    }
                                    if (DropDownList2.SelectedValue == "<=")
                                    {
                                        sq = sq + "StuID <= '" + TextBox1.Text + "'";
                                    }
                                    if (DropDownList2.SelectedValue == "~")
                                    {
                                        sq = sq + "StuID >= '" + TextBox1.Text + "' AND StuID <='"+TextBox2.Text+"'";
                                    }
                                    try
                                    {
                                        reader = grd_MIS.manager.GetData_SqlExec(sq);
                                    }
                                    catch
                                    {
                                        return;
                                    }                                  




                                }



            try
            {
                dg.DataSource =reader;
                dg.DataBind();
                //dg.Columns.Add("tgh", typeof(int));
                comm.ToExcel(dg, "StundetLoanInfo");
            }
            catch
            {
                Response.Write("<script>alert('导出失败,请与管理员联系');</script>");

            }










        }

    }

⌨️ 快捷键说明

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