private void AddValues()
        {
            try
            {
                _objEmployeeDetailsSetup = new EmployeeDetailsSetup();

                _objEmployeeDetailsSetup.CompanyID       = this.OrganizationalChartControl1.empCompany;
                _objEmployeeDetailsSetup.dtEmployeeChart = this.OrganizationalChartControl1.empValueAsTable;
                _objEmployeeDetailsSetup.EmployeeID      = txtEmployeeID.Text == string.Empty ? null : txtEmployeeID.Text;
                _objEmployeeTypeSetup = new EmployeeTypeSetup();
                _objEmployeeTypeSetup.EmployeeTypeID         = Convert.ToInt32(ddlEmployeeType.SelectedValue);
                _objEmployeeCategorySetup                    = new EmployeeCategorySetup();
                _objEmployeeCategorySetup.EmployeeCategoryID = Convert.ToInt32(ddlEmployeeCategory.SelectedValue);
                _objEmployeeDetailsSetup.EmployeeTitle       = Convert.ToInt32(ddlTitle.SelectedValue);
                _objDesignationSetup = new DesignationSetup();
                _objDesignationSetup.DesignationID     = ddlDesignationEmployee.SelectedValue;
                _objEmployeeDetailsSetup.FirstName     = txtFirstName.Text == string.Empty ? null : txtFirstName.Text;
                _objEmployeeDetailsSetup.MiddleName    = txtMiddleName.Text == string.Empty ? null : txtMiddleName.Text;
                _objEmployeeDetailsSetup.LastName      = txtLastName.Text == string.Empty ? null : txtLastName.Text;
                _objEmployeeDetailsSetup.Email         = txtEmail.Text == string.Empty ? null : txtEmail.Text;
                _objEmployeeDetailsSetup.EntryUserName = LoginUserInformation.UserID;
                IsUser objIsUser = new IsUser();
                objIsUser.UserPermission    = Convert.ToInt32(ddlUserPermission.SelectedValue);
                _objEmployeeSetupController = new EmployeeSetupController();
                _objEmployeeSetupController.Save(_objEmployeeDetailsSetup, _objEmployeeTypeSetup, _objEmployeeCategorySetup, _objDesignationSetup, objIsUser);
            }
            catch (Exception msgException)
            {
                throw msgException;
            }
        }
 private void LoadEmployeeTitle()
 {
     try
     {
         _objEmployeeSetupController = new EmployeeSetupController();
         _objEmployeeSetupController.GetEmployeeTitle(ddlTitle);
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 private void LoadEmployeeType()
 {
     try
     {
         _objEmployeeSetupController        = new EmployeeSetupController();
         _objEmployeeDetailsSetup           = new EmployeeDetailsSetup();
         _objEmployeeDetailsSetup.CompanyID = LoginUserInformation.CompanyID;
         _objEmployeeSetupController.GetEmployeeType(ddlEmployeeType, _objEmployeeDetailsSetup);
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 private void UCLoadBranch(DropDownList ddlElementData)
 {
     try
     {
         _objCompanySetup = new CompanySetup();
         DropDownList ddlElementDataCompany = (DropDownList)GridViewOrganizationalChart.Rows[0].FindControl("ddlElementData");
         _objCompanySetup.CompanyID  = Convert.ToInt32(ddlElementDataCompany.SelectedValue);
         _objEmployeeSetupController = new EmployeeSetupController();
         _objEmployeeSetupController.LoadBranchDDL(ddlElementData, _objCompanySetup);
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 private void UCLoadCompany(DropDownList ddlElementData)
 {
     try
     {
         _objEmployeeSetupController = new EmployeeSetupController();
         _objEmployeeSetupController.LoadCompanyDDL(ddlElementData);
         foreach (ListItem itemNo in ddlElementData.Items)
         {
             if (Convert.ToInt32(itemNo.Value) == LoginUserInformation.CompanyID)
             {
                 ddlElementData.SelectedValue = LoginUserInformation.CompanyID.ToString();
             }
         }
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 private void UCLoadTeam(DropDownList ddlElementData)
 {
     try
     {
         _objSectionSetup = new SectionSetup();
         DropDownList ddlElementDataCompany    = (DropDownList)GridViewOrganizationalChart.Rows[0].FindControl("ddlElementData");
         DropDownList ddlElementDataBranch     = (DropDownList)GridViewOrganizationalChart.Rows[1].FindControl("ddlElementData");
         DropDownList ddlElementDataDepartment = (DropDownList)GridViewOrganizationalChart.Rows[2].FindControl("ddlElementData");
         DropDownList ddlElementDataSection    = (DropDownList)GridViewOrganizationalChart.Rows[3].FindControl("ddlElementData");
         _objSectionSetup.CompanyID    = Convert.ToInt32(ddlElementDataCompany.SelectedValue);
         _objSectionSetup.BranchID     = Convert.ToInt32(ddlElementDataBranch.SelectedValue);
         _objSectionSetup.DepartmentID = Convert.ToInt32(ddlElementDataDepartment.SelectedValue);
         _objSectionSetup.SectionID    = Convert.ToInt32(ddlElementDataSection.SelectedValue);
         _objEmployeeSetupController   = new EmployeeSetupController();
         _objEmployeeSetupController.LoadTeamDDL(ddlElementData, _objSectionSetup);
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }