Beispiel #1
0
        public static CustomList <UserWiseHiddenControls> GetUserWiseHiddenControls(String nameSpace, String formName, String userCode)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
            CustomList <UserWiseHiddenControls> UserWiseHiddenControlsCollection = new CustomList <UserWiseHiddenControls>();
            IDataReader  reader = null;
            const String spName = "sqGetHiddenControls";

            conManager.OpenDataReader(out reader, spName, nameSpace, formName, userCode);
            try
            {
                while (reader.Read())
                {
                    UserWiseHiddenControls newUserWiseHiddenControls = new UserWiseHiddenControls();
                    newUserWiseHiddenControls.SetData(reader);
                    UserWiseHiddenControlsCollection.Add(newUserWiseHiddenControls);
                }
                return(UserWiseHiddenControlsCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
        public static CustomList<UserWiseHiddenControls> GetUserWiseHiddenControls(String nameSpace, String formName, String userCode)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
            CustomList<UserWiseHiddenControls> UserWiseHiddenControlsCollection = new CustomList<UserWiseHiddenControls>();
            IDataReader reader = null;
            const String spName = "sqGetHiddenControls";

            conManager.OpenDataReader(out reader, spName, nameSpace, formName, userCode);
            try
            {
                while (reader.Read())
                {
                    UserWiseHiddenControls newUserWiseHiddenControls = new UserWiseHiddenControls();
                    newUserWiseHiddenControls.SetData(reader);
                    UserWiseHiddenControlsCollection.Add(newUserWiseHiddenControls);
                }
                return UserWiseHiddenControlsCollection;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }