Beispiel #1
0
        private void LoadGrid()
        {
            DataTable dt = new UserInfoBLLlzs().LoadGrid();

            this.GridView1.DataSource = dt;
            this.GridView1.DataBind();
        }
Beispiel #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Userlzs u = new Userlzs();

            u.UserName = this.TextBox1.Text;
            bool flag = new UserInfoBLLlzs().AddMsglzs(u);

            if (flag)
            {
                u.sClassId = Convert.ToInt32(this.DropDownList1.SelectedValue);
                u.Chinese  = Convert.ToInt32(this.TextBox2.Text);
                u.Math     = Convert.ToInt32(this.TextBox3.Text);
                u.English  = Convert.ToInt32(this.TextBox4.Text);
                u.Computer = Convert.ToInt32(this.TextBox5.Text);
                bool flag2 = new UserInfoBLLlzs().AddMsglzs(u);
                if (flag2)
                {
                    Response.Redirect("indexlzs.aspx");
                }
                else
                {
                    Response.Write("<script>alert('添加失败')</script>");
                }
            }
            else
            {
                Response.Write("<script>alert('添加失败')</script>");
            }
        }
Beispiel #3
0
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "del")
     {
         Userlzs u = new Userlzs();
         u.rid = Convert.ToInt32(e.CommandArgument.ToString());
         bool flag = new UserInfoBLLlzs().DelGridlzs(u);
         if (flag)
         {
             Response.Write("<script>alert('删除成功')</script>");
             ShowGrid();
         }
     }
     if (e.CommandName == "XiuGai")
     {
         Response.Redirect(string.Format("CJJSlzs.aspx?rid={0}", Convert.ToInt32(e.CommandArgument.ToString())));
     }
     if (e.CommandName == "CJJS")
     {
         Userlzs u = new Userlzs();
         u.rid = Convert.ToInt32(e.CommandArgument.ToString());
         bool flag = new UserInfoBLLlzs().JieSuanBLL(u);
         if (flag)
         {
             ShowGrid();
         }
     }
 }
Beispiel #4
0
        private void ShowGrid()
        {
            DataTable dt = new UserInfoBLLlzs().ShowGridlzs(null);

            this.GridView1.DataSource = dt;
            this.GridView1.DataBind();
        }
Beispiel #5
0
        private void LoadDpd()
        {
            DataTable dt = new UserInfoBLLlzs().LoadDpdlzs();

            this.DropDownList1.DataSource     = dt;
            this.DropDownList1.DataTextField  = "ClassName";
            this.DropDownList1.DataValueField = "ClassId";
            this.DropDownList1.DataBind();
        }
Beispiel #6
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            NewsInfolzs n = new NewsInfolzs();

            n.n_name    = Request.QueryString["user"];
            n.n_title   = this.TextBox1.Text;
            n.n_content = this.TextBox2.Text;
            bool flag = new UserInfoBLLlzs().AddNewslzs(n);
        }
Beispiel #7
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            NewsInfolzs n = new NewsInfolzs();

            n.N_type    = Convert.ToInt32(DropDownList1.SelectedIndex.ToString());
            n.n_title   = this.TextBox1.Text;
            n.n_content = this.TextBox2.Text;
            DataTable dt = new UserInfoBLLlzs().CheckGridlzs(n);

            this.GridView1.DataSource = dt;
            this.GridView1.DataBind();
        }
Beispiel #8
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Userlzs u = new Userlzs();

            u.UserName = this.TextBox1.Text;
            u.sClassId = Convert.ToInt32(this.DropDownList1.SelectedValue);
            u.IfPass   = this.RadioButton1.Checked ? 0 : this.RadioButton2.Checked ? 2 : this.RadioButton3.Checked ? 1 : 9;
            u.Rlevel   = this.RadioButton4.Checked ? 0 : this.RadioButton5.Checked ? 4 : this.RadioButton6.Checked ? 3 : this.RadioButton7.Checked ? 2 : this.RadioButton8.Checked ? 1 : 9;
            DataTable dt = new UserInfoBLLlzs().ShowGridlzs(u);

            this.GridView1.DataSource = dt;
            this.GridView1.DataBind();
        }
Beispiel #9
0
        private void LoadMsg()
        {
            Userlzs u = new Userlzs();

            u.rid = Convert.ToInt32(Request.QueryString["rid"].ToString());
            DataTable dt = new UserInfoBLLlzs().ShowGridlzs(u);

            this.Label1.Text   = dt.Rows[0]["UserName"].ToString();
            this.Label2.Text   = dt.Rows[0]["ClassName"].ToString();
            this.TextBox1.Text = dt.Rows[0]["Chinese"].ToString();
            this.TextBox2.Text = dt.Rows[0]["Math"].ToString();
            this.TextBox3.Text = dt.Rows[0]["English"].ToString();
            this.TextBox4.Text = dt.Rows[0]["Computer"].ToString();
        }
Beispiel #10
0
        private void LoadDpd()
        {
            DataTable dt = new UserInfoBLLlzs().LoadDpdlzs();

            this.DropDownList1.DataSource = dt;
            DataRow dr = dt.NewRow();

            dr[0] = "0";
            dr[1] = "-全部-";
            dt.Rows.InsertAt(dr, 0);
            this.DropDownList1.DataTextField  = "ClassName";
            this.DropDownList1.DataValueField = "ClassId";
            this.DropDownList1.DataBind();
        }
Beispiel #11
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            UserInfolzs u = new UserInfolzs();

            u.UserName = this.TextBox1.Text;
            u.Psswd    = this.TextBox2.Text;
            DataTable dt = new UserInfoBLLlzs().LonginBLLlzs(u);

            if (dt.Rows.Count > 0 && dt != null)
            {
                Response.Redirect("Newslzs.aspx?user="******"<script>alert('登陆失败')</script>");
            }
        }
Beispiel #12
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Userlzs u = new Userlzs();

            u.rid      = Convert.ToInt32(Request.QueryString["rid"].ToString());
            u.Chinese  = Convert.ToInt32(this.TextBox1.Text);
            u.Math     = Convert.ToInt32(this.TextBox2.Text);
            u.English  = Convert.ToInt32(this.TextBox3.Text);
            u.Computer = Convert.ToInt32(this.TextBox4.Text);
            bool flag = new UserInfoBLLlzs().UpdateGridlzs(u);

            if (flag)
            {
                Response.Redirect("indexlzs.aspx");
            }
            else
            {
                Response.Write("<script>alert('修改失败')</script>");
            }
        }