Ejemplo n.º 1
0
        public static ProjectInfo GetProjectById(int projectId)
        {
            int         retValue = -1;
            ProjectInfo project  = new ProjectInfo();

            //Generated Code for query : dbo.GetAllVendors
            using (SqlDataReader dr = ProjManagementAdmin.GetProjectById(projectId, out retValue)) //Initialize and retrieve code for Datareader goes here
            {
                while (dr.Read())
                {
                    project.ProjectId       = Convert.ToInt32(dr["project_id"]);
                    project.ProjectName     = dr["project_name"].ToString();
                    project.ProjectCode     = dr["project_code"].ToString();
                    project.ProjectLeadId   = Convert.ToInt32(dr["project_lead_id"]);
                    project.ProjectLeadName = dr["project_lead_name"].ToString();
                    project.IsActive        = Convert.ToBoolean(dr["is_active"]);
                    project.CreatedDate     = Convert.ToDateTime(dr["created_date"]);
                    project.ChangedDate     = Convert.ToDateTime(dr["changed_date"]);
                    project.ChangedByName   = dr["changed_by"].ToString();
                }
                //dr.Close();
            }

            return(project);
        }