Esempio n. 1
0
 private void BindSectionFilter(DropDownList ddlControl)
 {
     if (ddlControl.SelectedIndex > -1)
     {
         var refreshData = new cls_SectionDTO();
         var data        = refreshData.GetSection(Convert.ToInt32(ddlControl.SelectedValue.ToString()));
         if (ddlControl.ID == "ddlPramodClassFrom")
         {
             ddlPramodSectionFrom.DataSource     = data;
             ddlPramodSectionFrom.DataTextField  = "SectionName";
             ddlPramodSectionFrom.DataValueField = "SectionId";
             ddlPramodSectionFrom.DataBind();
             ddlPramodSectionFrom.Items.Insert(0, new ListItem("[ SELECT ]", "-1"));
         }
         else if (ddlControl.ID == "ddlPromotedClassTo")
         {
             ddlPromotedSectionTo.DataSource     = data;
             ddlPromotedSectionTo.DataTextField  = "SectionName";
             ddlPromotedSectionTo.DataValueField = "SectionId";
             ddlPromotedSectionTo.DataBind();
             ddlPromotedSectionTo.Items.Insert(0, new ListItem("[ SELECT ]", "-1"));
         }
     }
     else
     {
         if (ddlControl.ID == "ddlPramodClassFrom")
         {
             ddlPramodSectionFrom.DataSource = null;
             ddlPramodSectionFrom.DataBind();
             ddlPramodSectionFrom.Items.Insert(0, new ListItem("[ SELECT ]", "-1"));
         }
         else if (ddlControl.ID == "ddlPromotedClassTo")
         {
             ddlPromotedSectionTo.DataSource = null;
             ddlPromotedSectionTo.DataBind();
             ddlPromotedSectionTo.Items.Insert(0, new ListItem("[ SELECT ]", "-1"));
         }
         else
         {
             ddlPramodSectionFrom.DataSource = null;
             ddlPramodSectionFrom.DataBind();
             ddlPramodSectionFrom.Items.Insert(0, new ListItem("[ SELECT ]", "-1"));
             ddlPromotedSectionTo.DataSource = null;
             ddlPromotedSectionTo.DataBind();
             ddlPromotedSectionTo.Items.Insert(0, new ListItem("[ SELECT ]", "-1"));
         }
     }
 }
Esempio n. 2
0
 private void BindSection()
 {
     if (ddlClassName.SelectedIndex > -1)
     {
         ddlSectionName.DataSource     = _sectionDTO.GetSection(Convert.ToInt32(ddlClassName.SelectedValue.ToString()));
         ddlSectionName.DataTextField  = "SectionName";
         ddlSectionName.DataValueField = "SectionId";
         ddlSectionName.DataBind();
         ddlSectionName.Items.Insert(0, new ListItem("[ SELECT ]", "-1"));
     }
     else
     {
         ddlSectionName.DataSource = null;
         ddlSectionName.DataBind();
         ddlSectionName.Items.Insert(0, new ListItem("[ SELECT ]", "-1"));
     }
 }
Esempio n. 3
0
 private void BindFeeDetailSection()
 {
     _sectionDTO = new cls_SectionDTO();
     if (FeeDetailClass.SelectedIndex > 0)
     {
         FeeDetailSection.DataSource     = _sectionDTO.GetSection(Convert.ToInt32(FeeDetailClass.SelectedValue.ToString()));
         FeeDetailSection.DataTextField  = "SectionName";
         FeeDetailSection.DataValueField = "SectionId";
         FeeDetailSection.DataBind();
         FeeDetailSection.Items.Insert(0, new ListItem("[ SELECT ]", "-1"));
     }
     else
     {
         FeeDetailSection.DataSource = null;
         FeeDetailSection.DataBind();
         FeeDetailSection.Items.Insert(0, new ListItem("[ SELECT ]", "-1"));
     }
 }