Esempio n. 1
0
        private void BindSemester()
        {
            try
            {
                EWA_Common objEWA = new EWA_Common();
                BL_Common  objBL  = new BL_Common();
                //objEWA.OrgId = Session["OrgId"].ToString();
                //objEWA.CourseId = ddlCourse.SelectedValue.ToString();
                //objEWA.BranchId = ddlBranch.SelectedValue.ToString();
                objEWA.ClassId = ddlClass.SelectedValue.ToString();
                DataSet ds = objBL.BindSemester_BL(objEWA);

                ddlSemester.DataSource = ds;
                if (ds.Tables[0].Rows.Count != 0)
                {
                    ddlSemester.DataTextField  = "SemesterName";
                    ddlSemester.DataValueField = "SemesterId";
                    ddlSemester.DataBind();
                }
                else
                {
                    ddlSemester.Items.Clear();
                }

                ddlSemester.Items.Insert(0, new ListItem("Select", "0"));
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
Esempio n. 2
0
        //Bind Semester
        #region [Bind Semester]

        private void BindSemester()
        {
            try
            {
                EWA_Common objEWA = new EWA_Common();
                BL_Common  objBL  = new BL_Common();
                objEWA.ClassId = ddlClass.SelectedValue.ToString();

                DataSet ds = objBL.BindSemester_BL(objEWA);

                ddlSemester.DataSource     = ds;
                ddlSemester.DataTextField  = "SemesterName";
                ddlSemester.DataValueField = "SemesterId";
                ddlSemester.DataBind();
                // ddlSemester.Items.Insert(0, "Select");
                ddlSemester.Items.Insert(0, new ListItem("Select"));
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }