コード例 #1
0
ファイル: StudentMaster.aspx.cs プロジェクト: sandeep2314/sql
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                site = new DBSite();
                util.FillClass(site, ddlPresentClass);

                SectionMasterBll secBll = new SectionMasterBll();
                List <SectionMasterBll.SectionMasterEntity> secList = secBll.GetSectionList(site, Util_BLL.User.UserId);


                foreach (SectionMasterBll.SectionMasterEntity sec in secList)
                {
                    ddlSection.Items.Add(new ListItem(sec.SectionName, sec.SectionMasterId.ToString()));
                }
            }
        }
コード例 #2
0
ファイル: ExamMasterFrm.aspx.cs プロジェクト: sandeep2314/sql
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Clear();

                //txtExamName.ReadOnly = true;

                site = new DBSite();

                ClassMasterBLL cBll = new ClassMasterBLL();
                List <ClassMasterBLL.ClassMasterEntity> clasList = cBll.GetClassListBySubUser(site, Util_BLL.User.UserId, "", true);

                ddlClass.Items.Add(new ListItem("All", "0"));

                foreach (ClassMasterBLL.ClassMasterEntity cls in clasList)
                {
                    ddlClass.Items.Add(new ListItem(cls.ClassName, cls.ClassMasterId.ToString()));
                }

                SectionMasterBll secBll = new SectionMasterBll();
                List <SectionMasterBll.SectionMasterEntity> secList = secBll.GetSectionList(site, Util_BLL.User.UserId);
                ddlSection.Items.Add(new ListItem("All", "0"));

                foreach (SectionMasterBll.SectionMasterEntity sec in secList)
                {
                    ddlSection.Items.Add(new ListItem(sec.SectionName, sec.SectionMasterId.ToString()));
                }

                TermMasterBLL termBll = new TermMasterBLL();
                List <TermMasterBLL.TermMasterEntity> termList = termBll.GetTermList(site, Util_BLL.User.UserId);
                ddlTerm.Items.Add(new ListItem("", "0"));

                foreach (TermMasterBLL.TermMasterEntity trm in termList)
                {
                    ddlTerm.Items.Add(new ListItem(trm.TermName, trm.TermMasterId.ToString()));
                }

                ddlFormula.Items.Add(new ListItem("Yes", "1"));
                ddlFormula.Items.Add(new ListItem("No", "0"));
            }
        }
コード例 #3
0
ファイル: ExamMarks.aspx.cs プロジェクト: sandeep2314/sql
        protected void Page_Load(object sender, EventArgs e)
        {
            int trnID = util.CheckNullInt(Request.QueryString["new"]);

            isNewExamMarksEntry = trnID;
            isUpdate            = isNewExamMarksEntry != 1;

            // change back gound color
            if (isUpdate)
            {
                form1.Attributes.Add("style", "background-color:lightBlue;");
            }
            else
            {
                form1.Attributes.Add("style", "background-color:lightGrey;");
            }

            btnDelete.Visible = isUpdate;

            if (!IsPostBack)
            {
                Clear();

                site = new DBSite();

                ClassMasterBLL cBll = new ClassMasterBLL();
                List <ClassMasterBLL.ClassMasterEntity> clasList = cBll.GetClassListBySubUser(site, Util_BLL.User.UserId, "", true);
                //ddlClass.Items.Add(new ListItem("All", "0"));

                foreach (ClassMasterBLL.ClassMasterEntity cls in clasList)
                {
                    ddlClass.Items.Add(new ListItem(cls.ClassName, cls.ClassMasterId.ToString()));
                }

                SectionMasterBll secBll = new SectionMasterBll();
                List <SectionMasterBll.SectionMasterEntity> secList = secBll.GetSectionList(site, Util_BLL.User.UserId);
                ddlSection.Items.Add(new ListItem("All", "0"));

                foreach (SectionMasterBll.SectionMasterEntity sec in secList)
                {
                    ddlSection.Items.Add(new ListItem(sec.SectionName, sec.SectionMasterId.ToString()));
                }


                ExamMasterBll exBll = new ExamMasterBll();
                List <ExamMasterBll.ExamMasterEntity> examList = exBll.GetExamList(site, Util_BLL.User.UserId);
                ddlExam.Items.Add(new ListItem("All", "0"));

                foreach (ExamMasterBll.ExamMasterEntity exam in examList)
                {
                    ddlExam.Items.Add(new ListItem(exam.ExamCode + " (MM." + exam.MaxMarks + ")", exam.ExamMasterId.ToString()));
                }

                //gridView3.DataSource = examList;
                //gridView3.DataBind();



                SubjectMasterBLL subBll = new SubjectMasterBLL();
                List <SubjectMasterBLL.SubjectMasterEntity> subList = subBll.GetSubjectsBySubUser(site, Util_BLL.User.UserId, "", true);
                ddlSubject.Items.Add(new ListItem("All", "0"));
                foreach (SubjectMasterBLL.SubjectMasterEntity subject in subList)
                {
                    ddlSubject.Items.Add(new ListItem(subject.SubjectName + " (" + subject.SubjectGroupType + ")", subject.SubjectMasterId.ToString()));
                }

                // 7777
                //gridView2.DataSource = subList;
                //gridView2.DataBind();


                if (!isUpdate)
                {
                    legendExamMarks.InnerText = "Enter New Exam Marks";
                }
                else
                {
                    legendExamMarks.InnerText = "Edit Exam Marks";
                }
            }
        }