Esempio n. 1
0
		/// <summary>
		/// This method will return a list of objects representing all records in the table.
		/// </summary>
		///
		/// <returns>list of objects of class ADGroupRole in the form of object of ADGroupRoleCollection </returns>
		public ADGroupRoleCollection SelectAll()
		{
			ADGroupRoleCollection aDGroupRoleCollection = new ADGroupRoleCollection();
			foreach (POS.DataLayer.ADGroupRole _aDGroupRole in POS.DataLayer.ADGroupRoleBase.SelectAll())
			{
				_aDGroupRoleWCF = new ADGroupRole();
				
				_aDGroupRoleWCF.GroupRoleID = _aDGroupRole.GroupRoleID;
				_aDGroupRoleWCF.GroupID = _aDGroupRole.GroupID;
				_aDGroupRoleWCF.RoleID = _aDGroupRole.RoleID;
				
				aDGroupRoleCollection.Add(_aDGroupRoleWCF);
			}
			return aDGroupRoleCollection;
		}
Esempio n. 2
0
        /// <summary>
        /// This method will return a list of objects representing the specified number of entries from the specified record number in the table
        /// using the value of the field specified
        /// </summary>
        ///
        /// <param name="field" type="string">Field of the class ADGroupRole</param>
        /// <param name="fieldValue" type="object">Value for the field specified.</param>
        /// <param name="fieldValue2" type="object">Value for the field specified.</param>
        /// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param>
        /// <param name="orderByStatement" type="string">The field value to number.</param>
        /// <param name="pageSize" type="int">Number of records returned.</param>
        /// <param name="skipPages" type="int">The number of missing pages.</param>
        ///
        /// <returns>List of object of class ADGroupRole in the form of an object of class ADGroupRoleCollection</returns>
        public ADGroupRoleCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
        {
            ADGroupRoleCollection aDGroupRoleCollection = new ADGroupRoleCollection();

            foreach (POS.DataLayer.ADGroupRole _aDGroupRole in POS.DataLayer.ADGroupRoleBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
            {
                _aDGroupRoleWCF = new ADGroupRole();

                _aDGroupRoleWCF.GroupRoleID = _aDGroupRole.GroupRoleID;
                _aDGroupRoleWCF.GroupID     = _aDGroupRole.GroupID;
                _aDGroupRoleWCF.RoleID      = _aDGroupRole.RoleID;

                aDGroupRoleCollection.Add(_aDGroupRoleWCF);
            }
            return(aDGroupRoleCollection);
        }
Esempio n. 3
0
        /// <summary>
        /// This method will return a list of objects representing all records in the table.
        /// </summary>
        ///
        /// <returns>list of objects of class ADGroupRole in the form of object of ADGroupRoleCollection </returns>
        public ADGroupRoleCollection SelectAll()
        {
            ADGroupRoleCollection aDGroupRoleCollection = new ADGroupRoleCollection();

            foreach (POS.DataLayer.ADGroupRole _aDGroupRole in POS.DataLayer.ADGroupRoleBase.SelectAll())
            {
                _aDGroupRoleWCF = new ADGroupRole();

                _aDGroupRoleWCF.GroupRoleID = _aDGroupRole.GroupRoleID;
                _aDGroupRoleWCF.GroupID     = _aDGroupRole.GroupID;
                _aDGroupRoleWCF.RoleID      = _aDGroupRole.RoleID;

                aDGroupRoleCollection.Add(_aDGroupRoleWCF);
            }
            return(aDGroupRoleCollection);
        }
Esempio n. 4
0
        /// <summary>
        /// This method will return a list of objects representing the specified number of entries from the specified record number in the table.
        /// </summary>
        ///
        /// <param name="pageSize" type="int">Number of records returned.</param>
        /// <param name="skipPages" type="int">The number of missing pages.</param>
        /// <param name="orderByStatement" type="string">The field value to number.</param>
        ///
        /// <returns>list of objects of class ADGroupRole in the form of an object of class ADGroupRoleCollection </returns>
        public ADGroupRoleCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement)
        {
            ADGroupRoleCollection aDGroupRoleCollection = new ADGroupRoleCollection();

            foreach (POS.DataLayer.ADGroupRole _aDGroupRole in POS.DataLayer.ADGroupRoleBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
            {
                _aDGroupRoleWCF = new ADGroupRole();

                _aDGroupRoleWCF.GroupRoleID = _aDGroupRole.GroupRoleID;
                _aDGroupRoleWCF.GroupID     = _aDGroupRole.GroupID;
                _aDGroupRoleWCF.RoleID      = _aDGroupRole.RoleID;

                aDGroupRoleCollection.Add(_aDGroupRoleWCF);
            }
            return(aDGroupRoleCollection);
        }
Esempio n. 5
0
        /// <summary>
        /// This method will get row(s) from the database using the value of the field specified
        /// </summary>
        ///
        /// <param name="field" type="string">Field of the class ADGroupRole</param>
        /// <param name="fieldValue" type="object">Value for the field specified.</param>
        /// <param name="fieldValue2" type="object">Value for the field specified.</param>
        /// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param>
        ///
        /// <returns>List of object of class ADGroupRole in the form of an object of class ADGroupRoleCollection</returns>
        public ADGroupRoleCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
        {
            ADGroupRoleCollection aDGroupRoleCollection = new ADGroupRoleCollection();

            foreach (POS.DataLayer.ADGroupRole _aDGroupRole in POS.DataLayer.ADGroupRoleBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
            {
                _aDGroupRoleWCF = new ADGroupRole();

                _aDGroupRoleWCF.GroupRoleID = _aDGroupRole.GroupRoleID;
                _aDGroupRoleWCF.GroupID     = _aDGroupRole.GroupID;
                _aDGroupRoleWCF.RoleID      = _aDGroupRole.RoleID;

                aDGroupRoleCollection.Add(_aDGroupRoleWCF);
            }
            return(aDGroupRoleCollection);
        }
Esempio n. 6
0
        private void CollectScreenData()
        {
            ADGroupRole _aDGroupRole;

            foreach (DataGridViewRow row in dgrid_Roles.Rows)
            {
                if (Convert.ToBoolean(row.Cells["Check"].Value) == true)
                {
                    _aDGroupRole         = new ADGroupRole();
                    _aDGroupRole.RoleID  = Convert.ToInt32(row.Cells["RoleID"].Value);
                    _aDGroupRole.GroupID = _groupID;
                    _aDGroupRoleCollection.Add(_aDGroupRole);
                }
            }
            //_aDGroupRoleCollection.
        }
Esempio n. 7
0
		/// <summary>
		/// This method will return a list of objects representing the specified number of entries from the specified record number in the table 
		/// using the value of the field specified
		/// </summary>
		///
		/// <param name="field" type="string">Field of the class ADGroupRole</param>
		/// <param name="fieldValue" type="object">Value for the field specified.</param>
		/// <param name="fieldValue2" type="object">Value for the field specified.</param>
		/// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param>
		/// <param name="orderByStatement" type="string">The field value to number.</param>
		/// <param name="pageSize" type="int">Number of records returned.</param>
		/// <param name="skipPages" type="int">The number of missing pages.</param>
		///
		/// <returns>List of object of class ADGroupRole in the form of an object of class ADGroupRoleCollection</returns>
		public ADGroupRoleCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
		{
			ADGroupRoleCollection aDGroupRoleCollection = new ADGroupRoleCollection();
			foreach (POS.DataLayer.ADGroupRole _aDGroupRole in POS.DataLayer.ADGroupRoleBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
			{
				_aDGroupRoleWCF = new ADGroupRole();
				
				_aDGroupRoleWCF.GroupRoleID = _aDGroupRole.GroupRoleID;
				_aDGroupRoleWCF.GroupID = _aDGroupRole.GroupID;
				_aDGroupRoleWCF.RoleID = _aDGroupRole.RoleID;
				
				aDGroupRoleCollection.Add(_aDGroupRoleWCF);
			}
			return aDGroupRoleCollection;
		}
Esempio n. 8
0
		/// <summary>
		/// This method will return a list of objects representing the specified number of entries from the specified record number in the table.
		/// </summary>
		///
		/// <param name="pageSize" type="int">Number of records returned.</param>
		/// <param name="skipPages" type="int">The number of missing pages.</param>
		/// <param name="orderByStatement" type="string">The field value to number.</param>
		///
		/// <returns>list of objects of class ADGroupRole in the form of an object of class ADGroupRoleCollection </returns>
		public ADGroupRoleCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement)
		{
			ADGroupRoleCollection aDGroupRoleCollection = new ADGroupRoleCollection();
			foreach (POS.DataLayer.ADGroupRole _aDGroupRole in POS.DataLayer.ADGroupRoleBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
			{
				_aDGroupRoleWCF = new ADGroupRole();
				
				_aDGroupRoleWCF.GroupRoleID = _aDGroupRole.GroupRoleID;
				_aDGroupRoleWCF.GroupID = _aDGroupRole.GroupID;
				_aDGroupRoleWCF.RoleID = _aDGroupRole.RoleID;
				
				aDGroupRoleCollection.Add(_aDGroupRoleWCF);
			}
			return aDGroupRoleCollection;
		}
Esempio n. 9
0
		/// <summary>
		/// This method will get row(s) from the database using the value of the field specified
		/// </summary>
		///
		/// <param name="field" type="string">Field of the class ADGroupRole</param>
		/// <param name="fieldValue" type="object">Value for the field specified.</param>
		/// <param name="fieldValue2" type="object">Value for the field specified.</param>
		/// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param>
		///
		/// <returns>List of object of class ADGroupRole in the form of an object of class ADGroupRoleCollection</returns>
		public ADGroupRoleCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
		{
			ADGroupRoleCollection aDGroupRoleCollection = new ADGroupRoleCollection();
			foreach (POS.DataLayer.ADGroupRole _aDGroupRole in POS.DataLayer.ADGroupRoleBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
			{
				_aDGroupRoleWCF = new ADGroupRole();
				
				_aDGroupRoleWCF.GroupRoleID = _aDGroupRole.GroupRoleID;
				_aDGroupRoleWCF.GroupID = _aDGroupRole.GroupID;
				_aDGroupRoleWCF.RoleID = _aDGroupRole.RoleID;
				
				aDGroupRoleCollection.Add(_aDGroupRoleWCF);
			}
			return aDGroupRoleCollection;
		}
Esempio n. 10
0
        /// <summary>
        /// Populates the fields for multiple objects from the columns found in an open reader.
        /// </summary>
        ///
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <returns>Object of ADGroupRoleCollection</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			3/7/2015 2:36:59 PM		Created function
        /// 
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static ADGroupRoleCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper)
        {

            ADGroupRoleCollection list = new ADGroupRoleCollection();

            if (rdr.Read())
            {
                ADGroupRole obj = new ADGroupRole();
                PopulateObjectFromReader(obj, rdr);
                list.Add(obj);
                while (rdr.Read())
                {
                    obj = new ADGroupRole();
                    PopulateObjectFromReader(obj, rdr);
                    list.Add(obj);
                }
                oDatabaseHelper.Dispose();
                return list;
            }
            else
            {
                oDatabaseHelper.Dispose();
                return null;
            }

        }
Esempio n. 11
0
        /// <summary>
        /// Populates the fields for multiple objects from the columns found in an open reader.
        /// </summary>
        ///
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <returns>Object of ADGroupRoleCollection</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			3/7/2015 2:36:59 PM		Created function
        /// 
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static ADGroupRoleCollection PopulateObjectsFromReader(IDataReader rdr)
        {
            ADGroupRoleCollection list = new ADGroupRoleCollection();

            while (rdr.Read())
            {
                ADGroupRole obj = new ADGroupRole();
                PopulateObjectFromReader(obj, rdr);
                list.Add(obj);
            }
            return list;

        }