コード例 #1
0
        ///<summary>
        /// This method will update one new row into the database using the property Information
        /// </summary>
        ///
        /// <param name="aGGroupRole" type="AGGroupRole">This AGGroupRole  will be updated in the database.</param>
        ///
        /// <returns>True if succeeded</returns>
        public bool Update(AGGroupRole aGGroupRole)
        {
            _aGGroupRole = POS.DataLayer.AGGroupRole.SelectOne(new POS.DataLayer.AGGroupRolePrimaryKey(aGGroupRole.GroupRoleID));

            _aGGroupRole.GroupID = aGGroupRole.GroupID;
            _aGGroupRole.RoleID  = aGGroupRole.RoleID;

            return(_aGGroupRole.Update());
        }
コード例 #2
0
        /// <summary>
        /// This method will insert one new row into the database using the property Information
        /// </summary>
        ///
        /// <param name="aGGroupRole" type="AGGroupRole">This AGGroupRole  will be inserted in the database.</param>
        ///
        /// <returns>True if succeeded</returns>
        public bool Insert(AGGroupRole aGGroupRole)
        {
            _aGGroupRole             = new POS.DataLayer.AGGroupRole();
            _aGGroupRole.GroupRoleID = aGGroupRole.GroupRoleID;
            _aGGroupRole.GroupID     = aGGroupRole.GroupID;
            _aGGroupRole.RoleID      = aGGroupRole.RoleID;

            return(_aGGroupRole.Insert());
        }
コード例 #3
0
        /// <summary>
        /// This method will return an object representing the record matching the primary key information specified.
        /// </summary>
        ///
        /// <param name="pk" type="AGGroupRolePrimaryKey">Primary Key information based on which data is to be fetched.</param>
        ///
        /// <returns>object of class AGGroupRole</returns>
        public AGGroupRole SelectOne(AGGroupRolePrimaryKey pk)
        {
            _aGGroupRoleWCF = new AGGroupRole();
            _aGGroupRole    = POS.DataLayer.AGGroupRoleBase.SelectOne(new POS.DataLayer.AGGroupRolePrimaryKey(pk.GroupRoleID));

            _aGGroupRoleWCF.GroupRoleID = _aGGroupRole.GroupRoleID;
            _aGGroupRoleWCF.GroupID     = _aGGroupRole.GroupID;
            _aGGroupRoleWCF.RoleID      = _aGGroupRole.RoleID;

            return(_aGGroupRoleWCF);
        }