protected void ddlUOrg_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         this.grdOrgUnitWithHead.DataSource = BLLOrganizationUnit.GetUnitHead(int.Parse(this.ddlUOrg.SelectedValue), null);
         this.grdOrgUnitWithHead.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }
Пример #2
0
    protected void ddlOrgTo_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            if (ddlFilterTo.SelectedIndex == 1)
            {
                SetLetterTitle();
            }
            else if (ddlFilterTo.SelectedIndex == 2 || ddlFilterTo.SelectedIndex == 3)
            {
                if (ddlOrgTo.SelectedIndex > 0)
                {
                    List <ATTOrganizationUnit> lstUnit = new List <ATTOrganizationUnit>();

                    lstUnit = BLLOrganizationUnit.GetUnitHead(int.Parse(ddlOrgTo.SelectedValue.ToString()), null);

                    if (lstUnit.Count > 0)
                    {
                        this.ddlUnitTo.DataSource     = lstUnit;
                        this.ddlUnitTo.DataTextField  = "UnitName";
                        this.ddlUnitTo.DataValueField = "UnitID";
                        this.ddlUnitTo.DataBind();

                        ListItem a = new ListItem();
                        a.Selected = true;
                        a.Text     = "छान्नुहोस्";
                        a.Value    = "0";
                        ddlUnitTo.Items.Insert(0, a);

                        ddlUnitTo.Enabled = true;
                    }
                }
                else
                {
                    this.ddlUnitTo.DataSource = "";
                    this.ddlUnitTo.DataBind();


                    ddlUnitTo.Enabled = false;
                }
            }
        }
        catch (Exception ex)
        {
            throw (ex);
        }
    }