Exemplo n.º 1
0
        public AccomTypeDTO[] GetAccomTypeWithAccomDetails(int AccomodationTypeId)
        {
            AccomTypeDTO[]     objAccomodationTypeData;
            AccomodationMaster objAccomMaster;

            objAccomMaster          = new AccomodationMaster();
            objAccomodationTypeData = GetData(AccomodationTypeId);
            if (objAccomodationTypeData != null && objAccomodationTypeData.Length > 0)
            {
                for (int i = 0; i < objAccomodationTypeData.Length; i++)
                {
                    objAccomodationTypeData[i].Accomodations = objAccomMaster.GetData(0, objAccomodationTypeData[i].AccomodationTypeId, 0);
                }
            }
            return(objAccomodationTypeData);
        }
Exemplo n.º 2
0
        /*
         *
         * change made by vijay... by adding an overloaded function
         * of GetAccomTypeWithAccomDetails which accepts
         * UserId as the argument to get the accomodations assigend to this
         * particular user
         *
         */
        private AccomTypeDTO[] GetAccomTypeWithAccomDetails(int AccomodationTypeId, int UserId)
        {
            AccomTypeDTO[]     objAccomodationTypeData;
            AccomodationMaster objAccomMaster;

            objAccomMaster = new AccomodationMaster();
            //
            //following line commented  by vijay to get accomodationtypes according to the rights of the user
            //

            //objAccomodationTypeData = GetData(AccomodationTypeId);

            objAccomodationTypeData = GetData(AccomodationTypeId, UserId);
            if (objAccomodationTypeData != null && objAccomodationTypeData.Length > 0)
            {
                for (int i = 0; i < objAccomodationTypeData.Length; i++)
                {
                    objAccomodationTypeData[i].Accomodations = objAccomMaster.GetData(0, objAccomodationTypeData[i].AccomodationTypeId, 0, UserId);
                }
            }
            return(objAccomodationTypeData);
        }