예제 #1
0
    protected void RadDirectorate_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            if (RadDirectorate.SelectedIndex > 0)
            {
                DataSet ds = BLL.GetEmployeeFilterDetails(organisationID, Convert.ToInt32(RadBusinessUnit.SelectedValue), Convert.ToInt32(RadDirectorate.SelectedValue), null);
                BindDepartment(ds.Tables[2]);

                //To populate employee details
                BindEmployee(ds.Tables[3]);
            }
            else
            {
                DataSet ds = BLL.GetEmployeeFilterDetails(organisationID, Convert.ToInt32(RadBusinessUnit.SelectedValue), null, null);
                BindEmployee(ds.Tables[3]);
                RadDepartment.Items.Clear();
                RadDepartment.ClearSelection();
                RadDepartment.Text = string.Empty;
                RadComboBox rcbparent = (RadComboBox)Parent.FindControl("radGradeName");
                if (rcbparent != null)
                {
                    rcbparent.Items.Clear();
                    rcbparent.ClearSelection();
                }
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "BUFilter", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void RadDirectorate_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            if (RadDirectorate.SelectedIndex > 0)
            {
                DataSet ds = BLL.GetPensionEmployeeFilterDtls(Convert.ToInt32(Session["ORG_ID"]), Convert.ToInt32(RadBusinessUnit.SelectedValue), Convert.ToInt32(RadDirectorate.SelectedValue), null, operation.Select);
                BindDepartment(ds.Tables[2]);

                //To populate employee details
                BindEmployee(ds.Tables[3]);
            }
            else
            {
                DataSet ds = BLL.GetPensionEmployeeFilterDtls(Convert.ToInt32(Session["ORG_ID"]), Convert.ToInt32(RadBusinessUnit.SelectedValue), null, null, operation.Select);
                BindEmployee(ds.Tables[3]);
                RadDepartment.Items.Clear();
                RadDepartment.ClearSelection();
                RadDepartment.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));

                //RadComboBox rcbparent = (RadComboBox)Parent.FindControl("radGradeName");
                //if (rcbparent != null)
                //{
                //    rcbparent.Items.Clear();
                //    rcbparent.ClearSelection();
                //}
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_employeescheme", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }