Esempio n. 1
0
        /// <summary>
        /// Gets the Sub Domain based upon selected Domain
        /// </summary>
        /// <param name="domainId">int</param>
        /// <returns>List</returns>
        public List <SubDomain> GetSubDomain(int domainId)
        {
            List <BusinessEntities.SubDomain> lstSubDomain = null;

            try
            {
                Rave.HR.DataAccessLayer.Projects.Projects objSubDomainDAL = new Rave.HR.DataAccessLayer.Projects.Projects();
                DataTable dtSubDomain = new DataTable();
                dtSubDomain = objSubDomainDAL.GetSubDomain(domainId);

                lstSubDomain = new List <BusinessEntities.SubDomain>();
                BusinessEntities.SubDomain objSubDomain = null;
                foreach (DataRow drSubDomain in dtSubDomain.Rows)
                {
                    objSubDomain = new BusinessEntities.SubDomain();
                    objSubDomain.SubDomainName = drSubDomain["SubDomainName"].ToString();
                    objSubDomain.SubDomainId   = int.Parse(drSubDomain["ID"].ToString());
                    lstSubDomain.Add(objSubDomain);
                }
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, "GetCheckedDomainName", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER);
            }
            return(lstSubDomain);
        }