private void SetSubSctionForDropdown(int sectionId, string OCODE)
        {
            var row = subSectionBll.GetSubSectionsBySectionIdAndOCode(sectionId, OCODE).ToList();

            if (row.Count > 0)
            {
                ddlSubSections.DataSource     = row;
                ddlSubSections.DataTextField  = "SUB_SEC_NAME";
                ddlSubSections.DataValueField = "SUB_SEC_ID";
                ddlSubSections.DataBind();
                ddlSubSections.Items.Insert(0, new ListItem("--Select--", "0"));
            }
        }
예제 #2
0
        protected void GetAllSubSection()
        {
            try
            {
                string OCODE     = ((SessionUser)Session["SessionUser"]).OCode;
                int    sectionId = Convert.ToInt16(ddlSection_TR.SelectedValue);

                var row = objSubSec_BLL.GetSubSectionsBySectionIdAndOCode(sectionId, OCODE).ToList();
                if (row.Count > 0)
                {
                    ddlSubSec_TR.DataSource     = row;
                    ddlSubSec_TR.DataTextField  = "SUB_SEC_NAME";
                    ddlSubSec_TR.DataValueField = "SUB_SEC_ID";
                    ddlSubSec_TR.DataBind();
                    ddlSubSec_TR.Items.Insert(0, new ListItem("--Select--"));
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true);
            }
        }
예제 #3
0
 protected void ddlSection_SelecttedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         string OCODE     = ((SessionUser)Session["SessionUser"]).OCode;
         int    sectionId = Convert.ToInt16(ddlSection.SelectedValue);
         var    row       = subSectionBll.GetSubSectionsBySectionIdAndOCode(sectionId, OCODE).ToList();
         if (row.Count > 0)
         {
             ddlSubSections.DataSource     = row;
             ddlSubSections.DataTextField  = "SUB_SEC_NAME";
             ddlSubSections.DataValueField = "SUB_SEC_ID";
             ddlSubSections.DataBind();
             ddlSubSections.Items.Insert(0, new ListItem("--Select--", "0"));
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #4
0
 protected void ddlSection_SelecttedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         SUB_SECTION_BLL subSectionBll = new SUB_SECTION_BLL();
         string          OCODE         = ((SessionUser)Session["SessionUser"]).OCode;
         int             sectionId     = Convert.ToInt16(ddlSection.SelectedValue);
         var             row           = subSectionBll.GetSubSectionsBySectionIdAndOCode(sectionId, OCODE).ToList();
         if (row.Count > 0)
         {
             ddlSubSections.DataSource     = row;
             ddlSubSections.DataTextField  = "SUB_SEC_NAME";
             ddlSubSections.DataValueField = "SUB_SEC_ID";
             ddlSubSections.DataBind();
             ddlSubSections.Items.Insert(0, new ListItem("--Select--", "0"));
         }
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true);
     }
 }