Example #1
0
        //--------------------------------------------------------------
        public static List <MediaTypes> Static_GetListAll(string ConStr, string TextOptionAll = "...")
        {
            MediaTypes        m_MediaTypes = new MediaTypes(ConStr);
            List <MediaTypes> RetVal       = m_MediaTypes.GetList();

            TextOptionAll = (TextOptionAll == null) ? "" : TextOptionAll.Trim();
            if (TextOptionAll.Length > 0)
            {
                m_MediaTypes.MediaTypeName = TextOptionAll;
                m_MediaTypes.MediaTypeDesc = TextOptionAll;
                RetVal.Insert(0, m_MediaTypes);
            }
            return(RetVal);
        }
Example #2
0
        //--------------------------------------------------------------
        public static List <MediaTypes> Static_GetList(string ConStr)
        {
            List <MediaTypes> RetVal = new List <MediaTypes>();

            try
            {
                MediaTypes m_MediaTypes = new MediaTypes(ConStr);
                RetVal = m_MediaTypes.GetList();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(RetVal);
        }
Example #3
0
        //--------------------------------------------------------------
        public MediaTypes Get(byte MediaTypeId)
        {
            MediaTypes RetVal = new MediaTypes(db.ConnectionString);

            try
            {
                List <MediaTypes> list = GetListByMediaTypeId(MediaTypeId);
                if (list.Count > 0)
                {
                    RetVal = (MediaTypes)list[0];
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(RetVal);
        }
Example #4
0
        //--------------------------------------------------------------
        public static List <MediaTypes> Static_GetListOrderBy(string ConStr, string OrderBy)
        {
            MediaTypes m_MediaTypes = new MediaTypes(ConStr);

            return(m_MediaTypes.GetListOrderBy(OrderBy));
        }