示例#1
0
        /// <summary>
        /// Gets the Project Name.
        /// </summary>
        /// <returns>List</returns>
        //public List<BusinessEntities.Projects> getProjectName()
        public List <BusinessEntities.Projects> GetProjectNames()
        {
            try
            {
                Rave.HR.DataAccessLayer.Projects.Projects objProjectNameDAL;
                List <BusinessEntities.Projects>          lstProjectName;
                BusinessEntities.Projects objProjectName;
                DataSet dsProjectName;

                objProjectNameDAL = new Rave.HR.DataAccessLayer.Projects.Projects();
                lstProjectName    = new List <BusinessEntities.Projects>();
                dsProjectName     = new DataSet();
                objProjectName    = null;

                //dsProjectName = objProjectNameDAL.getProjectName();
                dsProjectName = objProjectNameDAL.GetProjectNames();

                foreach (DataRow drProjectName in dsProjectName.Tables[0].Rows)
                {
                    objProjectName             = new BusinessEntities.Projects();
                    objProjectName.ProjectName = drProjectName["ProjectName"].ToString();
                    objProjectName.ProjectId   = int.Parse(drProjectName["ProjectID"].ToString());

                    lstProjectName.Add(objProjectName);
                }
                return(lstProjectName);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, "RaveHRProjects.cs", "getProjectName", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER);
            }
        }