private string SqlOrgDepartment(SectionSetup objSectionSetup) { try { string sqlString = null; sqlString = @"SELECT [EntityID] ,[EntityName] FROM " + _objTwoColumnsTableData.TableName + " WHERE DataUsed = 'A' AND CompanyID = " + objSectionSetup.CompanyID + ""; if (objSectionSetup.BranchID != 0) { sqlString += " AND ParentEntityID = " + objSectionSetup.BranchID + ""; } if (objSectionSetup.DepartmentID != 0) { sqlString += " OR ParentEntityID = " + objSectionSetup.DepartmentID + ""; } if (objSectionSetup.SectionID != 0) { sqlString += " OR ParentEntityID = " + objSectionSetup.SectionID + ""; } sqlString += " ORDER BY EntityName "; return(sqlString); } catch (Exception msgException) { throw msgException; } }
internal void LoadTeamDDL(DropDownList ddlTeam, SectionSetup objSectionSetup) { try { _objOrganizationalChartSetupController = new OrganizationalChartSetupController(); _objOrganizationalChartSetupController.LoadTeamDDL(ddlTeam, objSectionSetup); } catch (Exception msgException) { throw msgException; } }
internal void LoadTeamDDL(DropDownList givenDDLID, SectionSetup objSectionSetup) { try { _objTwoColumnsTableData.TableName = "[orgTeam]"; ClsDropDownListController.LoadDropDownList(this.ConnectionString, this.SqlOrgDepartment(objSectionSetup), givenDDLID, "EntityName", "EntityID"); } catch (Exception msgException) { throw msgException; } }
internal void LoadBranchDDL(DropDownList givenDDLID, CompanySetup objCompanySetup) { try { _objTwoColumnsTableData.TableName = "[orgBranch]"; SectionSetup objSectionSetup = new SectionSetup(); objSectionSetup.CompanyID = objCompanySetup.CompanyID; ClsDropDownListController.LoadDropDownList(this.ConnectionString, this.SqlOrgDepartment(objSectionSetup), givenDDLID, "EntityName", "EntityID"); } 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; } }