Esempio n. 1
0
        private void LoadDonorName()
        {
            DataTable dt = DataAccess.GetData("SELECT AccountId, KeyName  FROM Account ORDER BY KeyName");

            UIUtilities.FillListControl(cboDonorName, "KeyName", "AccountId", dt, true, "-- All donors --");
        }
Esempio n. 2
0
        private void LoadDonorName(int id, string type)
        {
            DataTable dt = DataAccess.GetData($"SELECT AccountId, KeyName  FROM Account WHERE ConstituencyTypeId = {id} ORDER BY KeyName ");

            UIUtilities.FillListControl(cboDonorName, "KeyName", "AccountId", dt, true, $"-- All {type} donors --");
        }
Esempio n. 3
0
        private void LoadConstituencyType()
        {
            DataTable dt = DataAccess.GetData("SELECT ConstituencyTypeId, ConstituencyTypeName  FROM ConstituencyType ORDER BY ConstituencyTypeName");

            UIUtilities.FillListControl(cboConstituencyType, "ConstituencyTypeName", "ConstituencyTypeId", dt, true, "-- All constituency type --");
        }
Esempio n. 4
0
        //Implement Business Rule 7
        // Constituents must be added to active programs (3 max). Only load active programs in the combobox during add event.
        private void LoadActiveVolunteerProgram()
        {
            DataTable dt = DataAccess.GetData("SELECT ProgramId, ProgramName  FROM VolunteerProgram WHERE IsActive = 'true' ORDER BY ProgramName");

            UIUtilities.FillListControl(cboVolunterProgram, "ProgramName", "ProgramId", dt, true, "--Select a program--");
        }
Esempio n. 5
0
        private void LoadDonorName(int id, string type)
        {
            DataTable dt = DataAccess.GetData($"SELECT DISTINCT Account.AccountId, KeyName   FROM Account INNER JOIN VolunteerAssignment On Account.AccountId  = VolunteerAssignment.AccountId  AND ProgramId = {id} ORDER BY KeyName ");

            UIUtilities.FillListControl(cboVolName, "KeyName", "AccountId", dt, true, $"-- All {type} volunteers --");
        }
Esempio n. 6
0
        private void LoadVolunteerName()
        {
            DataTable dt = DataAccess.GetData("SELECT DISTINCT Account.AccountId, KeyName   FROM Account INNER JOIN VolunteerAssignment On Account.AccountId  = VolunteerAssignment.AccountId  ORDER BY KeyName");

            UIUtilities.FillListControl(cboVolName, "KeyName", "AccountId", dt, true, "-- All volunteers --"); //good
        }
Esempio n. 7
0
        private void LoadProgram()
        {
            DataTable dt = DataAccess.GetData("SELECT ProgramId, ProgramName  FROM VolunteerProgram ORDER BY ProgramName");

            UIUtilities.FillListControl(cboProgram, "ProgramName", "ProgramId", dt, true, "-- All programs --"); //good
        }