Ejemplo n.º 1
0
        private void fillddl()
        {
            int ID = Convert.ToInt32(Session["ID"].ToString());
            RegistredCourses  obj      = new RegistredCourses();
            NowTimeUniversity timee    = new NowTimeUniversity();
            DataRow           T        = timee.drSearchYearANdSemester();
            string            year     = T["NowYear"].ToString();
            string            Semester = T["NowSemester"].ToString();
            DataTable         tbl1     = obj.dtSearchRegisterSubject(ID, year, Semester);

            ddlCourse1.DataSource     = tbl1;
            ddlCourse1.DataTextField  = "SubjectName";
            ddlCourse1.DataValueField = "SubjectID";
            ddlCourse1.DataBind();

            ddlCourse2.DataSource     = tbl1;
            ddlCourse2.DataTextField  = "SubjectName";
            ddlCourse2.DataValueField = "SubjectID";
            ddlCourse2.DataBind();

            ddlCourse3.DataSource     = tbl1;
            ddlCourse3.DataTextField  = "SubjectName";
            ddlCourse3.DataValueField = "SubjectID";
            ddlCourse3.DataBind();

            ddlCourse4.DataSource     = tbl1;
            ddlCourse4.DataTextField  = "SubjectName";
            ddlCourse4.DataValueField = "SubjectID";
            ddlCourse4.DataBind();
            ddlCourse1.Items.Insert(0, new System.Web.UI.WebControls.ListItem("<اختر مادة>", "0"));
            ddlCourse2.Items.Insert(0, new System.Web.UI.WebControls.ListItem("<اختر مادة>", "0"));
            ddlCourse3.Items.Insert(0, new System.Web.UI.WebControls.ListItem("<اختر مادة>", "0"));
            ddlCourse4.Items.Insert(0, new System.Web.UI.WebControls.ListItem("<اختر مادة>", "0"));
        }
Ejemplo n.º 2
0
        private void fillddl()
        {
            int ID = Convert.ToInt32(Session["ID"].ToString());
            RegistredCourses obj  = new RegistredCourses();
            DataTable        tbl1 = obj.dtSearchRegisterSubject(ID);

            ddlCourse1.DataSource     = tbl1;
            ddlCourse1.DataTextField  = "SubjectName";
            ddlCourse1.DataValueField = "SubjectID";
            ddlCourse1.DataBind();

            ddlCourse2.DataSource     = tbl1;
            ddlCourse2.DataTextField  = "SubjectName";
            ddlCourse2.DataValueField = "SubjectID";
            ddlCourse2.DataBind();

            ddlCourse3.DataSource     = tbl1;
            ddlCourse3.DataTextField  = "SubjectName";
            ddlCourse3.DataValueField = "SubjectID";
            ddlCourse3.DataBind();

            ddlCourse4.DataSource     = tbl1;
            ddlCourse4.DataTextField  = "SubjectName";
            ddlCourse4.DataValueField = "SubjectID";
            ddlCourse4.DataBind();
            ddlCourse1.Items.Insert(0, new ListItem("<اختر مادة>", "0"));
            ddlCourse2.Items.Insert(0, new ListItem("<اختر مادة>", "0"));
            ddlCourse3.Items.Insert(0, new ListItem("<اختر مادة>", "0"));
            ddlCourse4.Items.Insert(0, new ListItem("<اختر مادة>", "0"));
        }
Ejemplo n.º 3
0
        private void fillddl()
        {
            int ID = Convert.ToInt32(Session["ID"].ToString());
            RegistredCourses obj  = new RegistredCourses();
            DataTable        tbl1 = obj.dtSearchRegisterSubject(ID);

            gvCourses.DataSource = tbl1;
            gvCourses.DataBind();
        }
Ejemplo n.º 4
0
        private void fillddl()
        {
            int ID = Convert.ToInt32(Session["ID"].ToString());
            RegistredCourses  obj      = new RegistredCourses();
            NowTimeUniversity timee    = new NowTimeUniversity();
            DataRow           T        = timee.drSearchYearANdSemester();
            string            year     = T["NowYear"].ToString();
            string            Semester = T["NowSemester"].ToString();
            DataTable         tbl1     = obj.dtSearchRegisterSubject(ID, year, Semester);

            gvCourses.DataSource = tbl1;
            gvCourses.DataBind();
        }
Ejemplo n.º 5
0
        private void fillddl()
        {
            int ID = Convert.ToInt32(Session["ID"].ToString());
            RegistredCourses  obj      = new RegistredCourses();
            NowTimeUniversity timee    = new NowTimeUniversity();
            DataRow           T        = timee.drSearchYearANdSemester();
            string            year     = T["NowYear"].ToString();
            string            Semester = T["NowSemester"].ToString();
            DataTable         tbl1     = obj.dtSearchRegisterSubject(ID, year, Semester);

            ddlNameCourse1.DataSource     = tbl1;
            ddlNameCourse1.DataTextField  = "SubjectName";
            ddlNameCourse1.DataValueField = "SubjectID";
            ddlNameCourse1.DataBind();

            ddlNameCourse2.DataSource     = tbl1;
            ddlNameCourse2.DataTextField  = "SubjectName";
            ddlNameCourse2.DataValueField = "SubjectID";
            ddlNameCourse2.DataBind();

            ddlNameCourse3.DataSource     = tbl1;
            ddlNameCourse3.DataTextField  = "SubjectName";
            ddlNameCourse3.DataValueField = "SubjectID";
            ddlNameCourse3.DataBind();

            ddlNameCourse1.Items.Insert(0, new ListItem("<اختر مادة>", "0"));
            ddlNameCourse2.Items.Insert(0, new ListItem("<اختر مادة>", "0"));
            ddlNameCourse3.Items.Insert(0, new ListItem("<اختر مادة>", "0"));


            int RegHours = 0;

            for (int i = 0; i < tbl1.Rows.Count; i++)
            {
                DataRow dr = tbl1.Rows[i];
                RegHours = RegHours + Convert.ToInt32(dr["Hours"].ToString());
            }

            txtNmberHours.Text = RegHours + "";
        }
Ejemplo n.º 6
0
        private void fillddl()
        {
            int ID = Convert.ToInt32(Session["ID"].ToString());
            RegistredCourses  obj      = new RegistredCourses();
            NowTimeUniversity timee    = new NowTimeUniversity();
            DataRow           T        = timee.drSearchYearANdSemester();
            string            year     = T["NowYear"].ToString();
            string            Semester = T["NowSemester"].ToString();
            DataTable         tbl1     = obj.dtSearchRegisterSubject(ID, year, Semester);

            gvCourses.DataSource = tbl1;
            gvCourses.DataBind();
            int RegHours = 0;

            for (int i = 0; i < tbl1.Rows.Count; i++)
            {
                DataRow dr = tbl1.Rows[i];
                RegHours = RegHours + Convert.ToInt32(dr["Hours"].ToString());
            }

            txtNumHours.Text = RegHours + "";
        }