// return list of information
        public List <InfoDTO> Infos(int ID)
        {
            using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings[ConfigurationManager.AppSettings["connection"]].ConnectionString))
            {
                conn.Open();

                Object infoID;
                if (ID == 0)
                {
                    infoID = DBNull.Value;
                }
                else
                {
                    infoID = ID;
                }

                using (SqlCommand cmd = new SqlCommand("pInfoo", conn))
                {
                    cmd.CommandType = System.Data.CommandType.StoredProcedure;

                    cmd.Parameters.Add(new SqlParameter("@id", infoID));
                    // cmd.Parameters.Add(new SqlParameter("@parentId", infoID));
                    SqlDataReader dr = cmd.ExecuteReader();

                    List <InfoDTO> infoList = DataReader2Object.GetList <InfoDTO>(dr);
                    return(infoList);
                }
            }
        }
 // return info journal
 public List <InfoDTO> InfoJournal()
 {
     using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings[ConfigurationManager.AppSettings["connection"]].ConnectionString))
     {
         conn.Open();
         using (SqlCommand cmd = new SqlCommand("pInfoGet", conn))
         {
             cmd.CommandType = System.Data.CommandType.StoredProcedure;
             cmd.Parameters.Add(new SqlParameter("@view", "list"));
             SqlDataReader  dr       = cmd.ExecuteReader();
             List <InfoDTO> infoList = DataReader2Object.GetList <InfoDTO>(dr);
             return(infoList);
         }
     }
 }