protected void Rad_Department_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
 {
     try
     {
         if (Rad_Department.SelectedIndex > 0)
         {
             rad_DeptHeadRemarks.Text            = string.Empty;
             Rg_DepartmentswithAssets.DataSource = null;
             Rg_DepartmentswithAssets.DataBind();
             Get_Employee_Assets(rad_Employees.SelectedValue);
         }
         else
         {
             lbl_Department_Name.Text            = string.Empty;
             Rg_DepartmentswithAssets.DataSource = null;
             Rg_DepartmentswithAssets.DataBind();
             // tr_EmpDetails.Attributes.Add("style", "visibility:hidden;display:none");
             table_AssetDetails.Attributes.Add("style", "visibility:hidden;display:none");
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Clearance", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
         return;
     }
 }
 private void Get_Employee_Assets(string emp_id)
 {
     try
     {
         _obj_Smhr_AssetDoc = new SMHR_EMPASSETDOC();
         _obj_Smhr_AssetDoc.EMPASSETDOC_EMP_ID = Convert.ToInt32(ViewState["SelectedEmployee"]);
         if (Rad_Department.SelectedIndex > 0)
         {
             if (rad_Employees.SelectedIndex > 0)
             {
                 if (Convert.ToInt32(rad_Employees.SelectedValue) != Convert.ToInt32(Rad_Department.SelectedValue))
                 {
                     _obj_Smhr_AssetDoc.EMPASSETDOC_DEPT_ID = Convert.ToInt32(Rad_Department.SelectedValue);
                 }
                 else
                 {
                     _obj_Smhr_AssetDoc.EMPASSETDOC_DEPT_ID = Convert.ToInt32(ViewState["SelectedEmployee"].ToString().Split('~')[1]);
                 }
                 dt_details = BLL.get_EmployeeAssets(_obj_Smhr_AssetDoc);
                 if (dt_details.Rows.Count > 0)
                 {
                     table_AssetDetails.Attributes.Add("style", "visibility:visible;display:block");
                     Rg_DepartmentswithAssets.DataSource = dt_details;
                     Rg_DepartmentswithAssets.DataBind();
                     lbl_Department_Name.Text   = Rad_Department.SelectedItem.Text;
                     ViewState["DEPARTMENT_ID"] = dt_details.Rows[0]["DEPARTMENT_ID"].ToString();
                 }
                 else
                 {
                     table_AssetDetails.Attributes.Add("style", "visibility:hidden;display:none");
                 }
             }
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Clearance", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
         return;
     }
 }