Exemplo n.º 1
0
 public CharityProfile(int UserID, string UserName, UserRole Role,
                       string FullName,
                       string City, string Province, string PostalCode, string Address1, string Address2,
                       string Phone, string Website, string Email,
                       string RegNumber,
                       CharityCategory Category, CharityDesignation Designation) :
     this(UserID, UserName, Role, FullName, City, Province, PostalCode, Address1, Address2, Phone, Website, Email,
          RegNumber, Category, Designation, new List <CharityProgram>(), new List <CharityActivityCountry>())
 {
 }
Exemplo n.º 2
0
 public CharityProfile(int UserID, string UserName, UserRole Role,
     string FullName,
     string City, string Province, string PostalCode, string Address1, string Address2,
     string Phone, string Website, string Email,
     string RegNumber,
     CharityCategory Category, CharityDesignation Designation)
     : this(UserID, UserName, Role, FullName, City, Province, PostalCode, Address1, Address2, Phone, Website, Email,
             RegNumber, Category, Designation, new List<CharityProgram>(), new List<CharityActivityCountry>())
 {
 }
Exemplo n.º 3
0
        public CharityProfile(int UserID, string UserName, UserRole Role,
                              string FullName,
                              string City, string Province, string PostalCode, string Address1, string Address2,
                              string Phone, string Website, string Email,
                              string RegNumber,
                              CharityCategory Category, CharityDesignation Designation,
                              List <CharityProgram> Programs, List <CharityActivityCountry> Countries) :
            base(UserID, UserName, Role, FullName, City, Province, PostalCode, Address1, Address2, Phone, Website, Email)
        {
            this.RegNumber = RegNumber;

            this.Category    = Category;
            this.Designation = Designation;

            this.Programs  = Programs;
            this.Countries = Countries;
        }
Exemplo n.º 4
0
        public CharityProfile(int UserID, string UserName, UserRole Role,
            string FullName,
            string City, string Province, string PostalCode, string Address1, string Address2,
            string Phone, string Website, string Email,
            string RegNumber,
            CharityCategory Category, CharityDesignation Designation,
            List<CharityProgram> Programs, List<CharityActivityCountry> Countries)
            : base(UserID, UserName, Role, FullName, City, Province, PostalCode, Address1, Address2, Phone, Website, Email)
        {
            this.RegNumber = RegNumber;

            this.Category = Category;
            this.Designation = Designation;

            this.Programs = Programs;
            this.Countries = Countries;
        }
Exemplo n.º 5
0
        private static CharityDesignation GetCharityDesignation(int CharityDesignationID)
        {
            try
            {
                //###########
                //# Command #
                //###########
                string command = "SELECT designationID, description FROM [Designation] WHERE designationID = @DesignationID";

                //##############
                //# Parameters #
                //##############
                List<SqlParameter> parameters = new List<SqlParameter>();
                parameters.Add(new SqlParameter("@DesignationID", CharityDesignationID));

                //#############
                //# Execution #
                //#############
                DataTable table = DatabaseManager.ExecuteDataQueryCommand(command, parameters.ToArray());

                if (table == null)
                    return null;

                //############
                //# Analysis #
                //############
                CharityDesignation designation = null;

                if (table.Rows.Count > 0)
                {
                    DataRow row = table.Rows[0];

                    int designationID = int.Parse(row["designationID"].ToString());
                    string description = row["description"].ToString();

                    designation = new CharityDesignation(designationID, description);
                }

                return designation;
            }
            catch { return null; }
        }