private UserPrivilege CreateObject(IDataReader oReader, bool IsDefault)
        {
            UserPrivilege objUserPrivilege = new UserPrivilege();

            NullManager reader = new NullManager(oReader);

            try
            {
                objUserPrivilege.UserID       = reader.GetInt32("UserID");
                objUserPrivilege.FriendlyName = reader.GetString("FriendlyName");
                objUserPrivilege.CompanyID    = reader.GetInt32("CompanyID");
                if (!IsDefault)
                {
                    objUserPrivilege.CanEdit   = (int)reader.GetByte("CanEdit");
                    objUserPrivilege.CanDelete = (int)reader.GetByte("CanDelete");
                    objUserPrivilege.CanAdd    = (int)reader.GetByte("CanAdd");
                    objUserPrivilege.CanView   = (int)reader.GetByte("CanView");
                }
            }
            catch (Exception Ex)
            {
                throw new Exception("Error while creating object" + Ex.Message);
            }
            return(objUserPrivilege);
        }
        private ModuleDictionary CreateObject(IDataReader oReader)
        {
            ModuleDictionary objModuleDictionary = new ModuleDictionary();

            NullManager reader = new NullManager(oReader);

            try
            {
                objModuleDictionary.TotalPrivilege = (int)reader.GetByte("TotalPrivilege");
                objModuleDictionary.MenuName       = reader.GetString("MenuName");
            }
            catch (Exception Ex)
            {
                throw new Exception("Error while creating object" + Ex.Message);
            }
            return(objModuleDictionary);
        }