Exemplo n.º 1
0
    private void GradeClass()
    {
        if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
        {
            LearnSite.BLL.Room room = new LearnSite.BLL.Room();

            string Hid = tcook.Hid.ToString();
            DDLgrade.DataSource     = room.GetGrade(Int32.Parse(Hid));
            DDLgrade.DataTextField  = "Rgrade";
            DDLgrade.DataValueField = "Rgrade";
            DDLgrade.DataBind();
            if (Session[Hid + "grade"] != null)
            {
                DDLgrade.SelectedValue = Session[Hid + "grade"].ToString();
            }

            int Rgrade            = Int32.Parse(DDLgrade.SelectedValue);
            LearnSite.BLL.Room rm = new LearnSite.BLL.Room();
            DDLclass.DataSource     = rm.GetLimitClass(Rgrade);
            DDLclass.DataTextField  = "Rclass";
            DDLclass.DataValueField = "Rclass";
            DDLclass.DataBind();
            if (Session[Hid + "class"] != null)
            {
                DDLclass.SelectedValue = Session[Hid + "class"].ToString();
            }
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            this.userId = Convert.ToInt32(Session["userID"].ToString());
            if (!IsPostBack)
            {
                string    sql1 = "select * from province";
                DataSet   ds1  = MySqlHelper.GetDataSet(MySqlHelper.Conn, System.Data.CommandType.Text, sql1);
                DataTable dt1  = ds1.Tables[0];
                DDLprovince.DataSource = dt1;
                DDLprovince.DataBind();

                string    sql2 = "select * from school";
                DataSet   ds2  = MySqlHelper.GetDataSet(MySqlHelper.Conn, System.Data.CommandType.Text, sql2);
                DataTable dt2  = ds2.Tables[0];
                DDLschool.DataSource = dt2;
                DDLschool.DataBind();

                string    sql3 = "select * from grade";
                DataSet   ds3  = MySqlHelper.GetDataSet(MySqlHelper.Conn, System.Data.CommandType.Text, sql3);
                DataTable dt3  = ds3.Tables[0];
                DDLgrade.DataSource = dt3;
                DDLgrade.DataBind();
            }
            this.userName = Session["userName"].ToString();
            this.id       = Session["userID"].ToString();
            string    sql = "select * from users where id=@id";
            DataSet   ds  = MySqlHelper.GetDataSet(MySqlHelper.Conn, System.Data.CommandType.Text, sql, new MySqlParameter("@id", id));
            DataTable dt  = ds.Tables[0];
            string    img = dt.Rows[0]["logo"].ToString();

            pic.ImageUrl     = img;
            pic_mid.ImageUrl = img;
            pic_s.ImageUrl   = img;
        }
Exemplo n.º 3
0
    private void GradeClass()
    {
        LearnSite.BLL.Room      rm    = new LearnSite.BLL.Room();
        LearnSite.Model.TeaCook tcook = new LearnSite.Model.TeaCook();
        string Hid = tcook.Hid.ToString();

        DDLgrade.DataSource     = rm.GetGrade(Int32.Parse(Hid));
        DDLgrade.DataTextField  = "Rgrade";
        DDLgrade.DataValueField = "Rgrade";
        DDLgrade.DataBind();
        if (Request.QueryString["Sgrade"] != null)
        {
            DDLgrade.SelectedValue = Request.QueryString["Sgrade"].ToString();
        }
        DDLgrade.Enabled = false;
        int Rgrade = Int32.Parse(DDLgrade.SelectedValue);

        DDLclass.DataSource     = rm.GetLimitClass(Rgrade);
        DDLclass.DataTextField  = "Rclass";
        DDLclass.DataValueField = "Rclass";
        DDLclass.DataBind();
        if (Request.QueryString["Sclass"] != null)
        {
            DDLclass.SelectedValue = Request.QueryString["Sclass"].ToString();
        }
        DDLclass.Enabled = false;
    }
Exemplo n.º 4
0
 private void Grade()
 {
     LearnSite.BLL.Room room = new LearnSite.BLL.Room();
     DDLgrade.DataSource     = room.GetGrade();
     DDLgrade.DataTextField  = "Rgrade";
     DDLgrade.DataValueField = "Rgrade";
     DDLgrade.DataBind();
 }
Exemplo n.º 5
0
 private void showGrade()
 {
     LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
     DDLgrade.DataSource     = rbll.GetAllGrade();
     DDLgrade.DataTextField  = "Rgrade";
     DDLgrade.DataValueField = "Rgrade";
     DDLgrade.DataBind();
 }
Exemplo n.º 6
0
    private void myGrade()
    {
        LearnSite.BLL.Room room = new LearnSite.BLL.Room();
        string             Hid  = tcook.Hid.ToString();

        DDLgrade.DataSource     = room.GetGrade(Int32.Parse(Hid));
        DDLgrade.DataTextField  = "Rgrade";
        DDLgrade.DataValueField = "Rgrade";
        DDLgrade.DataBind();
    }
Exemplo n.º 7
0
    private void GradeClass()
    {
        LearnSite.BLL.Room room = new LearnSite.BLL.Room();
        DDLgrade.DataSource     = room.GetFindGrade();
        DDLgrade.DataTextField  = "Rgrade";
        DDLgrade.DataValueField = "Rgrade";
        DDLgrade.DataBind();

        LearnSite.BLL.Room rm = new LearnSite.BLL.Room();
        DDLclass.DataSource     = rm.GetFindClass();
        DDLclass.DataTextField  = "Rclass";
        DDLclass.DataValueField = "Rclass";
        DDLclass.DataBind();
    }
Exemplo n.º 8
0
 private void ShowGrade()
 {
     LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
     DDLgrade.DataSource     = rbll.GetAllGrade();
     DDLgrade.DataTextField  = "Rgrade";
     DDLgrade.DataValueField = "Rgrade";
     DDLgrade.DataBind();
     if (LearnSite.Common.CookieHelp.IsStudentLogin())
     {
         string Cobj = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString();
         DDLgrade.SelectedValue = Cobj;
     }
     if (Request.QueryString["Cobj"] != null)
     {
         DDLgrade.SelectedValue = Request.QueryString["Cobj"].ToString();
     }
 }
Exemplo n.º 9
0
    private void GradeClass()
    {
        string Sgrade = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString();
        string Sclass = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString();

        LearnSite.BLL.Room room = new LearnSite.BLL.Room();
        DDLgrade.DataSource     = room.GetGrade();
        DDLgrade.DataTextField  = "Rgrade";
        DDLgrade.DataValueField = "Rgrade";
        DDLgrade.DataBind();
        DDLgrade.SelectedValue = Sgrade;

        LearnSite.BLL.Room rm = new LearnSite.BLL.Room();
        DDLclass.DataSource     = rm.GetClass();
        DDLclass.DataTextField  = "Rclass";
        DDLclass.DataValueField = "Rclass";
        DDLclass.DataBind();
        DDLclass.SelectedValue = Sclass;
    }
Exemplo n.º 10
0
    private void Grade()
    {
        LearnSite.BLL.TermTotal tbll = new LearnSite.BLL.TermTotal();
        DDLYear.DataSource     = tbll.TyearList();
        DDLYear.DataTextField  = "Tyear";
        DDLYear.DataValueField = "Tyear";
        DDLYear.DataBind();

        LearnSite.BLL.Room room = new LearnSite.BLL.Room();
        DDLgrade.DataSource     = room.GetAllGrade();
        DDLgrade.DataTextField  = "Rgrade";
        DDLgrade.DataValueField = "Rgrade";
        DDLgrade.DataBind();


        DDLclass.DataSource     = room.GetClass();
        DDLclass.DataTextField  = "Rclass";
        DDLclass.DataValueField = "Rclass";
        DDLclass.DataBind();
    }
Exemplo n.º 11
0
    private void Grade()
    {
        LearnSite.BLL.TermTotal tbll = new LearnSite.BLL.TermTotal();
        DDLYear.DataSource     = tbll.TyearList();
        DDLYear.DataTextField  = "Tyear";
        DDLYear.DataValueField = "Tyear";
        DDLYear.DataBind();

        LearnSite.BLL.Room room = new LearnSite.BLL.Room();
        DDLgrade.DataSource     = room.GetAllGrade();
        DDLgrade.DataTextField  = "Rgrade";
        DDLgrade.DataValueField = "Rgrade";
        DDLgrade.DataBind();
        DDLgrade.SelectedIndex = 0;

        DDLclass.DataSource     = room.GetLimitClass(Int32.Parse(DDLgrade.SelectedValue));
        DDLclass.DataTextField  = "Rclass";
        DDLclass.DataValueField = "Rclass";
        DDLclass.DataBind();
    }
Exemplo n.º 12
0
    private void GradeClass()
    {
        LearnSite.Model.Cook cook = new LearnSite.Model.Cook();

        string Sgrade = cook.Sgrade.ToString();
        string Sclass = cook.Sclass.ToString();

        LearnSite.BLL.Room room = new LearnSite.BLL.Room();
        DDLgrade.DataSource     = room.GetAllGrade();
        DDLgrade.DataTextField  = "Rgrade";
        DDLgrade.DataValueField = "Rgrade";
        DDLgrade.DataBind();
        DDLgrade.SelectedValue = Sgrade;

        LearnSite.BLL.Room rm = new LearnSite.BLL.Room();
        DDLclass.DataSource     = rm.GetAllClass();
        DDLclass.DataTextField  = "Rclass";
        DDLclass.DataValueField = "Rclass";
        DDLclass.DataBind();
        DDLclass.SelectedValue = Sclass;
    }
Exemplo n.º 13
0
        /// <summary>
        /// 绑定 省 年纪 学校的方法
        /// </summary>
        protected void DDLbind()
        {
            string    sql1 = "select * from province";
            DataSet   ds1  = MySqlHelper.GetDataSet(MySqlHelper.Conn, System.Data.CommandType.Text, sql1);
            DataTable dt1  = ds1.Tables[0];

            DDLprovince.DataSource = dt1;
            DDLprovince.DataBind();

            string    sql2 = "select * from school";
            DataSet   ds2  = MySqlHelper.GetDataSet(MySqlHelper.Conn, System.Data.CommandType.Text, sql2);
            DataTable dt2  = ds2.Tables[0];

            DDLschool.DataSource = dt2;
            DDLschool.DataBind();

            string    sql3 = "select * from grade";
            DataSet   ds3  = MySqlHelper.GetDataSet(MySqlHelper.Conn, System.Data.CommandType.Text, sql3);
            DataTable dt3  = ds3.Tables[0];

            DDLgrade.DataSource = dt3;
            DDLgrade.DataBind();
        }