Beispiel #1
0
    private void locationsupervisors()
    {
        int[] iClientIds;

        try
        {
            // Get Fileid
            // Retrieve clients.
            string getClientId = GetCheckBoxListLocationIds();

            if (getClientId != "")
            {
                // Create an instance.
                reportService            = AppService.Create <IReportService>();
                reportService.AppManager = this.mAppManager;

                DataTable dtProjects = new DataTable();

                // Getting client ids.
                iClientIds = this.RetrieveLocationIds(getClientId);

                // Retrieve projects based on clients.
                dtProjects = reportService.RetrieveManagersByLocations(iClientIds);

                // Bind the conrol.
                if (dtProjects != null)
                {
                    CheckSupervisor.DataSource = dtProjects;
                }
                else
                {
                    CheckSupervisor.DataSource = "";
                }

                CheckSupervisor.DataTextField  = "UserName";
                CheckSupervisor.DataValueField = "UserId";
                CheckSupervisor.DataBind();
            }
            else
            {
                BuildSupervisors();
            }
        }
        catch { throw; }
    }
Beispiel #2
0
    private void BuildSupervisors()
    {
        try
        {
            //gvwClient.DataSource = this.RetrieveClients();
            //gvwClient.DataBind();

            reportService            = AppService.Create <IReportService>();
            reportService.AppManager = this.mAppManager;

            DataTable dtClients = new DataTable();

            dtClients = reportService.RetrieveSupervisors();

            CheckSupervisor.DataSource     = dtClients;
            CheckSupervisor.DataTextField  = "UserName";
            CheckSupervisor.DataValueField = "UserId";
            CheckSupervisor.DataBind();
        }
        catch { throw; }
    }